diff --git a/.github/actions/setup_build_env/action.yml b/.github/actions/setup_build_env/action.yml
index 560b53749..a25f0ae44 100644
--- a/.github/actions/setup_build_env/action.yml
+++ b/.github/actions/setup_build_env/action.yml
@@ -18,7 +18,7 @@ inputs:
poetry-version:
description: 'Poetry version to install'
required: false
- default: '1.3.1'
+ default: '1.8.3'
run-poetry-install:
description: 'Whether to run poetry install on current dir'
required: false
diff --git a/.github/workflows/check_node_latest.yml b/.github/workflows/check_node_latest.yml
index 749b94efa..5910fa9ed 100644
--- a/.github/workflows/check_node_latest.yml
+++ b/.github/workflows/check_node_latest.yml
@@ -14,7 +14,7 @@ env:
jobs:
check_latest_node:
- runs-on: ubuntu-latest
+ runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ['3.12']
diff --git a/.github/workflows/check_outdated_dependencies.yml b/.github/workflows/check_outdated_dependencies.yml
new file mode 100644
index 000000000..fe8c42608
--- /dev/null
+++ b/.github/workflows/check_outdated_dependencies.yml
@@ -0,0 +1,88 @@
+name: check-outdated-dependencies
+
+on:
+ push: # This will trigger the action when a pull request is opened or updated.
+ branches:
+ - 'release/**' # This will trigger the action when any branch starting with "release/" is created.
+ workflow_dispatch: # Allow manual triggering if needed.
+
+jobs:
+ backend:
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v3
+
+ - uses: ./.github/actions/setup_build_env
+ with:
+ python-version: '3.9'
+ run-poetry-install: true
+ create-venv-at-path: .venv
+
+ - name: Check outdated backend dependencies
+ run: |
+ outdated=$(poetry show -oT)
+ echo "Outdated:"
+ echo "$outdated"
+
+ filtered_outdated=$(echo "$outdated" | grep -vE 'pyright|ruff' || true)
+
+ if [ ! -z "$filtered_outdated" ]; then
+ echo "Outdated dependencies found:"
+ echo "$filtered_outdated"
+ exit 1
+ else
+ echo "All dependencies are up to date. (pyright and ruff are ignored)"
+ fi
+
+
+ frontend:
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+ - uses: ./.github/actions/setup_build_env
+ with:
+ python-version: '3.10.11'
+ run-poetry-install: true
+ create-venv-at-path: .venv
+ - name: Clone Reflex Website Repo
+ uses: actions/checkout@v4
+ with:
+ repository: reflex-dev/reflex-web
+ ref: main
+ path: reflex-web
+ - name: Install Requirements for reflex-web
+ working-directory: ./reflex-web
+ run: poetry run uv pip install -r requirements.txt
+ - name: Install additional dependencies for DB access
+ run: poetry run uv pip install psycopg2-binary
+ - name: Init Website for reflex-web
+ working-directory: ./reflex-web
+ run: poetry run reflex init
+ - name: Run Website and Check for errors
+ run: |
+ poetry run bash scripts/integration.sh ./reflex-web dev
+ - name: Check outdated frontend dependencies
+ working-directory: ./reflex-web/.web
+ run: |
+ raw_outdated=$(/home/runner/.local/share/reflex/bun/bin/bun outdated)
+ outdated=$(echo "$raw_outdated" | grep -vE '\|\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\|' || true)
+ echo "Outdated:"
+ echo "$outdated"
+
+ # Ignore 3rd party dependencies that are not updated.
+ filtered_outdated=$(echo "$outdated" | grep -vE 'Package|@chakra-ui|lucide-react|@splinetool/runtime|ag-grid-react|framer-motion|react-markdown|remark-math|remark-gfm|rehype-katex|rehype-raw|remark-unwrap-images' || true)
+ no_extra=$(echo "$filtered_outdated" | grep -vE '\|\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-' || true)
+
+
+ if [ ! -z "$no_extra" ]; then
+ echo "Outdated dependencies found:"
+ echo "$filtered_outdated"
+ exit 1
+ else
+ echo "All dependencies are up to date. (3rd party packages are ignored)"
+ fi
+
diff --git a/.github/workflows/integration_app_harness.yml b/.github/workflows/integration_app_harness.yml
index c11e6e01c..9644e0a19 100644
--- a/.github/workflows/integration_app_harness.yml
+++ b/.github/workflows/integration_app_harness.yml
@@ -24,7 +24,7 @@ jobs:
matrix:
state_manager: ['redis', 'memory']
python-version: ['3.11.5', '3.12.0']
- runs-on: ubuntu-latest
+ runs-on: ubuntu-22.04
services:
# Label used to access the service container
redis:
diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml
index e9fecc81a..106ac1383 100644
--- a/.github/workflows/integration_tests.yml
+++ b/.github/workflows/integration_tests.yml
@@ -42,7 +42,7 @@ jobs:
fail-fast: false
matrix:
# Show OS combos first in GUI
- os: [ubuntu-latest, windows-latest, macos-12]
+ os: [ubuntu-latest, windows-latest]
python-version: ['3.9.18', '3.10.13', '3.11.5', '3.12.0']
exclude:
- os: windows-latest
@@ -122,7 +122,7 @@ jobs:
fail-fast: false
matrix:
# Show OS combos first in GUI
- os: [ubuntu-latest, windows-latest, macos-12]
+ os: [ubuntu-latest, windows-latest]
python-version: ['3.10.11', '3.11.4']
env:
@@ -161,4 +161,45 @@ jobs:
poetry run python benchmarks/benchmark_web_size.py --os "${{ matrix.os }}"
--python-version "${{ matrix.python-version }}" --commit-sha "${{ github.sha }}"
--pr-id "${{ github.event.pull_request.id }}" --branch-name "${{ github.head_ref || github.ref_name }}"
- --app-name "reflex-web" --path ./reflex-web/.web
\ No newline at end of file
+ --app-name "reflex-web" --path ./reflex-web/.web
+
+ reflex-web-macos:
+ if: github.event_name == 'push' && github.ref == 'refs/heads/main'
+ strategy:
+ fail-fast: false
+ matrix:
+ python-version: ['3.11.5', '3.12.0']
+ runs-on: macos-12
+ steps:
+ - uses: actions/checkout@v4
+ - uses: ./.github/actions/setup_build_env
+ with:
+ python-version: ${{ matrix.python-version }}
+ run-poetry-install: true
+ create-venv-at-path: .venv
+ - name: Clone Reflex Website Repo
+ uses: actions/checkout@v4
+ with:
+ repository: reflex-dev/reflex-web
+ ref: main
+ path: reflex-web
+ - name: Install Requirements for reflex-web
+ working-directory: ./reflex-web
+ run: poetry run uv pip install -r requirements.txt
+ - name: Install additional dependencies for DB access
+ run: poetry run uv pip install psycopg2-binary
+ - name: Init Website for reflex-web
+ working-directory: ./reflex-web
+ run: poetry run reflex init
+ - name: Run Website and Check for errors
+ run: |
+ # Check that npm is home
+ npm -v
+ poetry run bash scripts/integration.sh ./reflex-web prod
+ - name: Measure and upload .web size
+ run:
+ poetry run python benchmarks/benchmark_web_size.py --os "${{ matrix.os }}"
+ --python-version "${{ matrix.python-version }}" --commit-sha "${{ github.sha }}"
+ --pr-id "${{ github.event.pull_request.id }}" --branch-name "${{ github.head_ref || github.ref_name }}"
+ --app-name "reflex-web" --path ./reflex-web/.web
+
\ No newline at end of file
diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml
index 09e489949..c76918583 100644
--- a/.github/workflows/unit_tests.yml
+++ b/.github/workflows/unit_tests.yml
@@ -27,7 +27,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- os: [ubuntu-latest, windows-latest, macos-12]
+ os: [ubuntu-latest, windows-latest]
python-version: ['3.9.18', '3.10.13', '3.11.5', '3.12.0']
# Windows is a bit behind on Python version availability in Github
exclude:
@@ -41,6 +41,7 @@ jobs:
- os: windows-latest
python-version: '3.9.13'
runs-on: ${{ matrix.os }}
+
# Service containers to run with `runner-job`
services:
# Label used to access the service container
@@ -78,4 +79,30 @@ jobs:
export PYTHONUNBUFFERED=1
poetry run uv pip install "pydantic~=1.10"
poetry run pytest tests/units --cov --no-cov-on-fail --cov-report=
- - run: poetry run coverage html
+ - name: Generate coverage report
+ run: poetry run coverage html
+
+ unit-tests-macos:
+ timeout-minutes: 30
+ if: github.event_name == 'push' && github.ref == 'refs/heads/main'
+ strategy:
+ fail-fast: false
+ matrix:
+ python-version: ['3.9.18', '3.10.13', '3.11.5', '3.12.0']
+ runs-on: macos-12
+ steps:
+ - uses: actions/checkout@v4
+ - uses: ./.github/actions/setup_build_env
+ with:
+ python-version: ${{ matrix.python-version }}
+ run-poetry-install: true
+ create-venv-at-path: .venv
+ - name: Run unit tests
+ run: |
+ export PYTHONUNBUFFERED=1
+ poetry run pytest tests/units --cov --no-cov-on-fail --cov-report=
+ - name: Run unit tests w/ pydantic v1
+ run: |
+ export PYTHONUNBUFFERED=1
+ poetry run uv pip install "pydantic~=1.10"
+ poetry run pytest tests/units --cov --no-cov-on-fail --cov-report=
\ No newline at end of file
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 609364a6e..4d2e76b31 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -3,7 +3,7 @@ fail_fast: true
repos:
- repo: https://github.com/charliermarsh/ruff-pre-commit
- rev: v0.4.10
+ rev: v0.6.9
hooks:
- id: ruff-format
args: [reflex, tests]
@@ -25,7 +25,7 @@ repos:
rev: v1.1.313
hooks:
- id: pyright
- args: [integration, reflex, tests]
+ args: [reflex, tests]
language: system
- repo: https://github.com/terrencepreilly/darglint
diff --git a/README.md b/README.md
index c249aea9f..9c965b00f 100644
--- a/README.md
+++ b/README.md
@@ -17,7 +17,7 @@
---
-[English](https://github.com/reflex-dev/reflex/blob/main/README.md) | [简体中文](https://github.com/reflex-dev/reflex/blob/main/docs/zh/zh_cn/README.md) | [繁體中文](https://github.com/reflex-dev/reflex/blob/main/docs/zh/zh_tw/README.md) | [Türkçe](https://github.com/reflex-dev/reflex/blob/main/docs/tr/README.md) | [हिंदी](https://github.com/reflex-dev/reflex/blob/main/docs/in/README.md) | [Português (Brasil)](https://github.com/reflex-dev/reflex/blob/main/docs/pt/pt_br/README.md) | [Italiano](https://github.com/reflex-dev/reflex/blob/main/docs/it/README.md) | [Español](https://github.com/reflex-dev/reflex/blob/main/docs/es/README.md) | [한국어](https://github.com/reflex-dev/reflex/blob/main/docs/kr/README.md) | [日本語](https://github.com/reflex-dev/reflex/blob/main/docs/ja/README.md) | [Deutsch](https://github.com/reflex-dev/reflex/blob/main/docs/de/README.md) | [Persian (پارسی)](https://github.com/reflex-dev/reflex/blob/main/docs/pe/README.md)
+[English](https://github.com/reflex-dev/reflex/blob/main/README.md) | [简体中文](https://github.com/reflex-dev/reflex/blob/main/docs/zh/zh_cn/README.md) | [繁體中文](https://github.com/reflex-dev/reflex/blob/main/docs/zh/zh_tw/README.md) | [Türkçe](https://github.com/reflex-dev/reflex/blob/main/docs/tr/README.md) | [हिंदी](https://github.com/reflex-dev/reflex/blob/main/docs/in/README.md) | [Português (Brasil)](https://github.com/reflex-dev/reflex/blob/main/docs/pt/pt_br/README.md) | [Italiano](https://github.com/reflex-dev/reflex/blob/main/docs/it/README.md) | [Español](https://github.com/reflex-dev/reflex/blob/main/docs/es/README.md) | [한국어](https://github.com/reflex-dev/reflex/blob/main/docs/kr/README.md) | [日本語](https://github.com/reflex-dev/reflex/blob/main/docs/ja/README.md) | [Deutsch](https://github.com/reflex-dev/reflex/blob/main/docs/de/README.md) | [Persian (پارسی)](https://github.com/reflex-dev/reflex/blob/main/docs/pe/README.md) | [Tiếng Việt](https://github.com/reflex-dev/reflex/blob/main/docs/vi/README.md)
---
diff --git a/docs/vi/README.md b/docs/vi/README.md
new file mode 100644
index 000000000..df7a31530
--- /dev/null
+++ b/docs/vi/README.md
@@ -0,0 +1,267 @@
+```diff
++ Bạn đang tìm kiếm Pynecone? Bạn đã tìm đúng. Pynecone đã được đổi tên thành Reflex. +
+```
+
+
+

+

+
+
+
+### **✨ Ứng dụng web hiệu suất cao, tùy chỉnh bằng Python thuần. Deploy trong vài giây. ✨**
+[](https://badge.fury.io/py/reflex)
+
+[](https://reflex.dev/docs/getting-started/introduction)
+[](https://discord.gg/T5WSbC2YtQ)
+
+
+---
+
+[English](https://github.com/reflex-dev/reflex/blob/main/README.md) | [简体中文](https://github.com/reflex-dev/reflex/blob/main/docs/zh/zh_cn/README.md) | [繁體中文](https://github.com/reflex-dev/reflex/blob/main/docs/zh/zh_tw/README.md) | [Türkçe](https://github.com/reflex-dev/reflex/blob/main/docs/tr/README.md) | [हिंदी](https://github.com/reflex-dev/reflex/blob/main/docs/in/README.md) | [Português (Brasil)](https://github.com/reflex-dev/reflex/blob/main/docs/pt/pt_br/README.md) | [Italiano](https://github.com/reflex-dev/reflex/blob/main/docs/it/README.md) | [Español](https://github.com/reflex-dev/reflex/blob/main/docs/es/README.md) | [한국어](https://github.com/reflex-dev/reflex/blob/main/docs/kr/README.md) | [日本語](https://github.com/reflex-dev/reflex/blob/main/docs/ja/README.md) | [Deutsch](https://github.com/reflex-dev/reflex/blob/main/docs/de/README.md) | [Persian (پارسی)](https://github.com/reflex-dev/reflex/blob/main/docs/pe/README.md) | [Tiếng Việt](https://github.com/reflex-dev/reflex/blob/main/docs/vi/README.md)
+
+---
+
+# Reflex
+
+Reflex là một thư viện để xây dựng ứng dụng web toàn bộ bằng Python thuần.
+
+Các tính năng chính:
+* **Python thuần tuý** - Viết toàn bộ ứng dụng cả backend và frontend hoàn toàn bằng Python, không cần học JavaScript.
+* **Full Flexibility** - Reflex dễ dàng để bắt đầu, nhưng cũng có thể mở rộng lên các ứng dụng phức tạp.
+* **Deploy Instantly** - Sau khi xây dựng ứng dụng, bạn có thể triển khai bằng [một dòng lệnh](https://reflex.dev/docs/hosting/deploy-quick-start/) hoặc triển khai trên server của riêng bạn.
+
+Đọc [bài viết về kiến trúc hệ thống](https://reflex.dev/blog/2024-03-21-reflex-architecture/#the-reflex-architecture) để hiểu rõ các hoạt động của Reflex.
+
+## ⚙️ Cài đặt
+
+Mở cửa sổ lệnh và chạy (Yêu cầu Python phiên bản 3.9+):
+
+```bash
+pip install reflex
+```
+
+## 🥳 Tạo ứng dụng đầu tiên
+
+Cài đặt `reflex` cũng như cài đặt công cụ dòng lệnh `reflex`.
+
+Kiểm tra việc cài đặt đã thành công hay chưa bằng cách tạo mới một ứng dụng. (Thay `my_app_name` bằng tên ứng dụng của bạn):
+
+```bash
+mkdir my_app_name
+cd my_app_name
+reflex init
+```
+
+Lệnh này tạo ra một ứng dụng mẫu trong một thư mục mới.
+
+Bạn có thể chạy ứng dụng ở chế độ phát triển.
+
+```bash
+reflex run
+```
+
+Bạn có thể xem ứng dụng của bạn ở địa chỉ http://localhost:3000.
+
+Bạn có thể thay đổi mã nguồn ở `my_app_name/my_app_name.py`. Reflex nhanh chóng làm mới và bạn có thể thấy thay đổi trên ứng dụng của bạn ngay lập tức khi bạn lưu file.
+
+
+## 🫧 Ứng dụng ví dụ
+
+Bắt đầu với ví dụ: tạo một ứng dụng tạo ảnh bằng [DALL·E](https://platform.openai.com/docs/guides/images/image-generation?context=node). Để cho đơn giản, chúng ta sẽ sử dụng [OpenAI API](https://platform.openai.com/docs/api-reference/authentication), nhưng bạn có thể sử dụng model của chính bạn được triển khai trên local.
+
+
+
+
+

+
+
+
+
+Đây là toàn bộ đoạn mã để xây dựng ứng dụng trên. Nó được viết hoàn toàn trong một file Python!
+
+
+
+```python
+import reflex as rx
+import openai
+
+openai_client = openai.OpenAI()
+
+
+class State(rx.State):
+ """The app state."""
+
+ prompt = ""
+ image_url = ""
+ processing = False
+ complete = False
+
+ def get_image(self):
+ """Get the image from the prompt."""
+ if self.prompt == "":
+ return rx.window_alert("Prompt Empty")
+
+ self.processing, self.complete = True, False
+ yield
+ response = openai_client.images.generate(
+ prompt=self.prompt, n=1, size="1024x1024"
+ )
+ self.image_url = response.data[0].url
+ self.processing, self.complete = False, True
+
+
+def index():
+ return rx.center(
+ rx.vstack(
+ rx.heading("DALL-E", font_size="1.5em"),
+ rx.input(
+ placeholder="Enter a prompt..",
+ on_blur=State.set_prompt,
+ width="25em",
+ ),
+ rx.button(
+ "Generate Image",
+ on_click=State.get_image,
+ width="25em",
+ loading=State.processing
+ ),
+ rx.cond(
+ State.complete,
+ rx.image(src=State.image_url, width="20em"),
+ ),
+ align="center",
+ ),
+ width="100%",
+ height="100vh",
+ )
+
+# Add state and page to the app.
+app = rx.App()
+app.add_page(index, title="Reflex:DALL-E")
+```
+
+
+
+
+
+## Hãy phân tích chi tiết.
+
+
+

+
+
+
+### **Reflex UI**
+
+Bắt đầu với giao diện chính.
+
+```python
+def index():
+ return rx.center(
+ ...
+ )
+```
+
+Hàm `index` định nghĩa phần giao diện chính của ứng dụng.
+
+Chúng tôi sử dụng các component (thành phần) khác nhau như `center`, `vstack`, `input` và `button` để xây dựng giao diện phía trước.
+Các component có thể được lồng vào nhau để tạo ra các bố cục phức tạp. Và bạn cũng có thể sử dụng từ khoá `args` để tận dụng đầy đủ sức mạnh của CSS.
+
+Reflex có đến hơn [60 component được xây dựng sẵn](https://reflex.dev/docs/library) để giúp bạn bắt đầu. Chúng ta có thể tạo ra một component mới khá dễ dàng, thao khảo: [xây dựng component của riêng bạn](https://reflex.dev/docs/wrapping-react/overview/).
+
+### **State**
+
+Reflex biểu diễn giao diện bằng các hàm của state (trạng thái).
+
+```python
+class State(rx.State):
+ """The app state."""
+ prompt = ""
+ image_url = ""
+ processing = False
+ complete = False
+
+```
+
+Một state định nghĩa các biến (được gọi là vars) có thể thay đổi trong một ứng dụng và cho phép các hàm có thể thay đổi chúng.
+
+Tại đây state được cấu thành từ một `prompt` và `image_url`.
+Có cũng những biến boolean `processing` và `complete`
+để chỉ ra khi nào tắt nút (trong quá trình tạo hình ảnh)
+và khi nào hiển thị hình ảnh kết quả.
+
+### **Event Handlers**
+
+```python
+def get_image(self):
+ """Get the image from the prompt."""
+ if self.prompt == "":
+ return rx.window_alert("Prompt Empty")
+
+ self.processing, self.complete = True, False
+ yield
+ response = openai_client.images.generate(
+ prompt=self.prompt, n=1, size="1024x1024"
+ )
+ self.image_url = response.data[0].url
+ self.processing, self.complete = False, True
+```
+
+Với các state, chúng ta định nghĩa các hàm có thể thay đổi state vars được gọi là event handlers. Event handler là cách chúng ta có thể thay đổi state trong Reflex. Chúng có thể là phản hồi khi người dùng thao tác, chằng hạn khi nhấn vào nút hoặc khi đang nhập trong text box. Các hành động này được gọi là event.
+
+Ứng dụng DALL·E. của chúng ta có một event handler, `get_image` để lấy hình ảnh từ OpenAI API. Sử dụng từ khoá `yield` in ở giữa event handler để cập nhật giao diện. Hoặc giao diện có thể cập nhật ở cuối event handler.
+
+### **Routing**
+
+Cuối cùng, chúng ta định nghĩa một ứng dụng.
+
+```python
+app = rx.App()
+```
+
+Chúng ta thêm một trang ở đầu ứng dụng bằng index component. Chúng ta cũng thêm tiêu đề của ứng dụng để hiển thị lên trình duyệt.
+
+
+```python
+app.add_page(index, title="DALL-E")
+```
+
+Bạn có thể tạo một ứng dụng nhiều trang bằng cách thêm trang.
+
+## 📑 Tài liệu
+
+
+
+📑 [Docs](https://reflex.dev/docs/getting-started/introduction) | 🗞️ [Blog](https://reflex.dev/blog) | 📱 [Component Library](https://reflex.dev/docs/library) | 🖼️ [Gallery](https://reflex.dev/docs/gallery) | 🛸 [Deployment](https://reflex.dev/docs/hosting/deploy-quick-start)
+
+
+
+
+## ✅ Status
+
+Reflex phát hành vào tháng 12/2022 với tên là Pynecone.
+
+Đến tháng 02/2024, chúng tôi tạo ra dịch vụ dưới phiên bản alpha! Trong thời gian này mọi người có thể triển khai ứng dụng hoàn toàn miễn phí. Xem [roadmap](https://github.com/reflex-dev/reflex/issues/2727) để biết thêm chi tiết.
+
+Reflex ra phiên bản mới với các tính năng mới hàng tuần! Hãy :star: star và :eyes: watch repo này để thấy các cập nhật mới nhất.
+
+## Contributing
+
+Chúng tôi chào đón mọi đóng góp dù lớn hay nhỏ. Dưới đây là các cách để bắt đầu với cộng đồng Reflex.
+
+- **Discord**: [Discord](https://discord.gg/T5WSbC2YtQ) của chúng tôi là nơi tốt nhất để nhờ sự giúp đỡ và thảo luận các bạn có thể đóng góp.
+- **GitHub Discussions**: Là cách tốt nhất để thảo luận về các tính năng mà bạn có thể đóng góp hoặc những điều bạn chưa rõ.
+- **GitHub Issues**: [Issues](https://github.com/reflex-dev/reflex/issues) là nơi tốt nhất để thông báo. Ngoài ra bạn có thể sửa chữa các vấn đề bằng cách tạo PR.
+
+Chúng tôi luôn sẵn sàng tìm kiếm các contributor, bất kể kinh nghiệm. Để tham gia đóng góp, xin mời xem
+[CONTIBUTING.md](https://github.com/reflex-dev/reflex/blob/main/CONTRIBUTING.md)
+
+
+## Xin cảm ơn các Contributors:
+
+
+
+
+## License
+
+Reflex là mã nguồn mở và sử dụng giấy phép [Apache License 2.0](LICENSE).
diff --git a/poetry.lock b/poetry.lock
index 928731c26..2f77234d4 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -32,13 +32,13 @@ files = [
[[package]]
name = "anyio"
-version = "4.6.0"
+version = "4.6.2.post1"
description = "High level compatibility layer for multiple asynchronous event loop implementations"
optional = false
python-versions = ">=3.9"
files = [
- {file = "anyio-4.6.0-py3-none-any.whl", hash = "sha256:c7d2e9d63e31599eeb636c8c5c03a7e108d73b345f064f1c19fdc87b79036a9a"},
- {file = "anyio-4.6.0.tar.gz", hash = "sha256:137b4559cbb034c477165047febb6ff83f390fc3b20bf181c1fc0a728cb8beeb"},
+ {file = "anyio-4.6.2.post1-py3-none-any.whl", hash = "sha256:6d170c36fba3bdd840c73d3868c1e777e33676a69c3a72cf0a0d5d6d8009b61d"},
+ {file = "anyio-4.6.2.post1.tar.gz", hash = "sha256:4c8bc31ccdb51c7f7bd251f51c609e038d63e34219b44aa86e47576389880b4c"},
]
[package.dependencies]
@@ -49,7 +49,7 @@ typing-extensions = {version = ">=4.1", markers = "python_version < \"3.11\""}
[package.extras]
doc = ["Sphinx (>=7.4,<8.0)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme"]
-test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "uvloop (>=0.21.0b1)"]
+test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "truststore (>=0.9.1)", "uvloop (>=0.21.0b1)"]
trio = ["trio (>=0.26.1)"]
[[package]]
@@ -121,13 +121,13 @@ files = [
[[package]]
name = "build"
-version = "1.2.2"
+version = "1.2.2.post1"
description = "A simple, correct Python build frontend"
optional = false
python-versions = ">=3.8"
files = [
- {file = "build-1.2.2-py3-none-any.whl", hash = "sha256:277ccc71619d98afdd841a0e96ac9fe1593b823af481d3b0cea748e8894e0613"},
- {file = "build-1.2.2.tar.gz", hash = "sha256:119b2fb462adef986483438377a13b2f42064a2a3a4161f24a0cca698a07ac8c"},
+ {file = "build-1.2.2.post1-py3-none-any.whl", hash = "sha256:1d61c0887fa860c01971625baae8bdd338e517b836a2f70dd1f7aa3a6b2fc5b5"},
+ {file = "build-1.2.2.post1.tar.gz", hash = "sha256:b36993e92ca9375a219c99e606a122ff365a760a2d4bba0caa09bd5278b608b7"},
]
[package.dependencies]
@@ -247,101 +247,116 @@ files = [
[[package]]
name = "charset-normalizer"
-version = "3.3.2"
+version = "3.4.0"
description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet."
optional = false
python-versions = ">=3.7.0"
files = [
- {file = "charset-normalizer-3.3.2.tar.gz", hash = "sha256:f30c3cb33b24454a82faecaf01b19c18562b1e89558fb6c56de4d9118a032fd5"},
- {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:25baf083bf6f6b341f4121c2f3c548875ee6f5339300e08be3f2b2ba1721cdd3"},
- {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:06435b539f889b1f6f4ac1758871aae42dc3a8c0e24ac9e60c2384973ad73027"},
- {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9063e24fdb1e498ab71cb7419e24622516c4a04476b17a2dab57e8baa30d6e03"},
- {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6897af51655e3691ff853668779c7bad41579facacf5fd7253b0133308cf000d"},
- {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1d3193f4a680c64b4b6a9115943538edb896edc190f0b222e73761716519268e"},
- {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cd70574b12bb8a4d2aaa0094515df2463cb429d8536cfb6c7ce983246983e5a6"},
- {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8465322196c8b4d7ab6d1e049e4c5cb460d0394da4a27d23cc242fbf0034b6b5"},
- {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a9a8e9031d613fd2009c182b69c7b2c1ef8239a0efb1df3f7c8da66d5dd3d537"},
- {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:beb58fe5cdb101e3a055192ac291b7a21e3b7ef4f67fa1d74e331a7f2124341c"},
- {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:e06ed3eb3218bc64786f7db41917d4e686cc4856944f53d5bdf83a6884432e12"},
- {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:2e81c7b9c8979ce92ed306c249d46894776a909505d8f5a4ba55b14206e3222f"},
- {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:572c3763a264ba47b3cf708a44ce965d98555f618ca42c926a9c1616d8f34269"},
- {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:fd1abc0d89e30cc4e02e4064dc67fcc51bd941eb395c502aac3ec19fab46b519"},
- {file = "charset_normalizer-3.3.2-cp310-cp310-win32.whl", hash = "sha256:3d47fa203a7bd9c5b6cee4736ee84ca03b8ef23193c0d1ca99b5089f72645c73"},
- {file = "charset_normalizer-3.3.2-cp310-cp310-win_amd64.whl", hash = "sha256:10955842570876604d404661fbccbc9c7e684caf432c09c715ec38fbae45ae09"},
- {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:802fe99cca7457642125a8a88a084cef28ff0cf9407060f7b93dca5aa25480db"},
- {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:573f6eac48f4769d667c4442081b1794f52919e7edada77495aaed9236d13a96"},
- {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:549a3a73da901d5bc3ce8d24e0600d1fa85524c10287f6004fbab87672bf3e1e"},
- {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f27273b60488abe721a075bcca6d7f3964f9f6f067c8c4c605743023d7d3944f"},
- {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1ceae2f17a9c33cb48e3263960dc5fc8005351ee19db217e9b1bb15d28c02574"},
- {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:65f6f63034100ead094b8744b3b97965785388f308a64cf8d7c34f2f2e5be0c4"},
- {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:753f10e867343b4511128c6ed8c82f7bec3bd026875576dfd88483c5c73b2fd8"},
- {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4a78b2b446bd7c934f5dcedc588903fb2f5eec172f3d29e52a9096a43722adfc"},
- {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:e537484df0d8f426ce2afb2d0f8e1c3d0b114b83f8850e5f2fbea0e797bd82ae"},
- {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:eb6904c354526e758fda7167b33005998fb68c46fbc10e013ca97f21ca5c8887"},
- {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:deb6be0ac38ece9ba87dea880e438f25ca3eddfac8b002a2ec3d9183a454e8ae"},
- {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:4ab2fe47fae9e0f9dee8c04187ce5d09f48eabe611be8259444906793ab7cbce"},
- {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:80402cd6ee291dcb72644d6eac93785fe2c8b9cb30893c1af5b8fdd753b9d40f"},
- {file = "charset_normalizer-3.3.2-cp311-cp311-win32.whl", hash = "sha256:7cd13a2e3ddeed6913a65e66e94b51d80a041145a026c27e6bb76c31a853c6ab"},
- {file = "charset_normalizer-3.3.2-cp311-cp311-win_amd64.whl", hash = "sha256:663946639d296df6a2bb2aa51b60a2454ca1cb29835324c640dafb5ff2131a77"},
- {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:0b2b64d2bb6d3fb9112bafa732def486049e63de9618b5843bcdd081d8144cd8"},
- {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:ddbb2551d7e0102e7252db79ba445cdab71b26640817ab1e3e3648dad515003b"},
- {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:55086ee1064215781fff39a1af09518bc9255b50d6333f2e4c74ca09fac6a8f6"},
- {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8f4a014bc36d3c57402e2977dada34f9c12300af536839dc38c0beab8878f38a"},
- {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a10af20b82360ab00827f916a6058451b723b4e65030c5a18577c8b2de5b3389"},
- {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8d756e44e94489e49571086ef83b2bb8ce311e730092d2c34ca8f7d925cb20aa"},
- {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:90d558489962fd4918143277a773316e56c72da56ec7aa3dc3dbbe20fdfed15b"},
- {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6ac7ffc7ad6d040517be39eb591cac5ff87416c2537df6ba3cba3bae290c0fed"},
- {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:7ed9e526742851e8d5cc9e6cf41427dfc6068d4f5a3bb03659444b4cabf6bc26"},
- {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:8bdb58ff7ba23002a4c5808d608e4e6c687175724f54a5dade5fa8c67b604e4d"},
- {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_ppc64le.whl", hash = "sha256:6b3251890fff30ee142c44144871185dbe13b11bab478a88887a639655be1068"},
- {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_s390x.whl", hash = "sha256:b4a23f61ce87adf89be746c8a8974fe1c823c891d8f86eb218bb957c924bb143"},
- {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:efcb3f6676480691518c177e3b465bcddf57cea040302f9f4e6e191af91174d4"},
- {file = "charset_normalizer-3.3.2-cp312-cp312-win32.whl", hash = "sha256:d965bba47ddeec8cd560687584e88cf699fd28f192ceb452d1d7ee807c5597b7"},
- {file = "charset_normalizer-3.3.2-cp312-cp312-win_amd64.whl", hash = "sha256:96b02a3dc4381e5494fad39be677abcb5e6634bf7b4fa83a6dd3112607547001"},
- {file = "charset_normalizer-3.3.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:95f2a5796329323b8f0512e09dbb7a1860c46a39da62ecb2324f116fa8fdc85c"},
- {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c002b4ffc0be611f0d9da932eb0f704fe2602a9a949d1f738e4c34c75b0863d5"},
- {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a981a536974bbc7a512cf44ed14938cf01030a99e9b3a06dd59578882f06f985"},
- {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3287761bc4ee9e33561a7e058c72ac0938c4f57fe49a09eae428fd88aafe7bb6"},
- {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:42cb296636fcc8b0644486d15c12376cb9fa75443e00fb25de0b8602e64c1714"},
- {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0a55554a2fa0d408816b3b5cedf0045f4b8e1a6065aec45849de2d6f3f8e9786"},
- {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:c083af607d2515612056a31f0a8d9e0fcb5876b7bfc0abad3ecd275bc4ebc2d5"},
- {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:87d1351268731db79e0f8e745d92493ee2841c974128ef629dc518b937d9194c"},
- {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:bd8f7df7d12c2db9fab40bdd87a7c09b1530128315d047a086fa3ae3435cb3a8"},
- {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:c180f51afb394e165eafe4ac2936a14bee3eb10debc9d9e4db8958fe36afe711"},
- {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:8c622a5fe39a48f78944a87d4fb8a53ee07344641b0562c540d840748571b811"},
- {file = "charset_normalizer-3.3.2-cp37-cp37m-win32.whl", hash = "sha256:db364eca23f876da6f9e16c9da0df51aa4f104a972735574842618b8c6d999d4"},
- {file = "charset_normalizer-3.3.2-cp37-cp37m-win_amd64.whl", hash = "sha256:86216b5cee4b06df986d214f664305142d9c76df9b6512be2738aa72a2048f99"},
- {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:6463effa3186ea09411d50efc7d85360b38d5f09b870c48e4600f63af490e56a"},
- {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6c4caeef8fa63d06bd437cd4bdcf3ffefe6738fb1b25951440d80dc7df8c03ac"},
- {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:37e55c8e51c236f95b033f6fb391d7d7970ba5fe7ff453dad675e88cf303377a"},
- {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fb69256e180cb6c8a894fee62b3afebae785babc1ee98b81cdf68bbca1987f33"},
- {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ae5f4161f18c61806f411a13b0310bea87f987c7d2ecdbdaad0e94eb2e404238"},
- {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b2b0a0c0517616b6869869f8c581d4eb2dd83a4d79e0ebcb7d373ef9956aeb0a"},
- {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:45485e01ff4d3630ec0d9617310448a8702f70e9c01906b0d0118bdf9d124cf2"},
- {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:eb00ed941194665c332bf8e078baf037d6c35d7c4f3102ea2d4f16ca94a26dc8"},
- {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:2127566c664442652f024c837091890cb1942c30937add288223dc895793f898"},
- {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:a50aebfa173e157099939b17f18600f72f84eed3049e743b68ad15bd69b6bf99"},
- {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:4d0d1650369165a14e14e1e47b372cfcb31d6ab44e6e33cb2d4e57265290044d"},
- {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:923c0c831b7cfcb071580d3f46c4baf50f174be571576556269530f4bbd79d04"},
- {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:06a81e93cd441c56a9b65d8e1d043daeb97a3d0856d177d5c90ba85acb3db087"},
- {file = "charset_normalizer-3.3.2-cp38-cp38-win32.whl", hash = "sha256:6ef1d82a3af9d3eecdba2321dc1b3c238245d890843e040e41e470ffa64c3e25"},
- {file = "charset_normalizer-3.3.2-cp38-cp38-win_amd64.whl", hash = "sha256:eb8821e09e916165e160797a6c17edda0679379a4be5c716c260e836e122f54b"},
- {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:c235ebd9baae02f1b77bcea61bce332cb4331dc3617d254df3323aa01ab47bd4"},
- {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:5b4c145409bef602a690e7cfad0a15a55c13320ff7a3ad7ca59c13bb8ba4d45d"},
- {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:68d1f8a9e9e37c1223b656399be5d6b448dea850bed7d0f87a8311f1ff3dabb0"},
- {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:22afcb9f253dac0696b5a4be4a1c0f8762f8239e21b99680099abd9b2b1b2269"},
- {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e27ad930a842b4c5eb8ac0016b0a54f5aebbe679340c26101df33424142c143c"},
- {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1f79682fbe303db92bc2b1136016a38a42e835d932bab5b3b1bfcfbf0640e519"},
- {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b261ccdec7821281dade748d088bb6e9b69e6d15b30652b74cbbac25e280b796"},
- {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:122c7fa62b130ed55f8f285bfd56d5f4b4a5b503609d181f9ad85e55c89f4185"},
- {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:d0eccceffcb53201b5bfebb52600a5fb483a20b61da9dbc885f8b103cbe7598c"},
- {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:9f96df6923e21816da7e0ad3fd47dd8f94b2a5ce594e00677c0013018b813458"},
- {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:7f04c839ed0b6b98b1a7501a002144b76c18fb1c1850c8b98d458ac269e26ed2"},
- {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:34d1c8da1e78d2e001f363791c98a272bb734000fcef47a491c1e3b0505657a8"},
- {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:ff8fa367d09b717b2a17a052544193ad76cd49979c805768879cb63d9ca50561"},
- {file = "charset_normalizer-3.3.2-cp39-cp39-win32.whl", hash = "sha256:aed38f6e4fb3f5d6bf81bfa990a07806be9d83cf7bacef998ab1a9bd660a581f"},
- {file = "charset_normalizer-3.3.2-cp39-cp39-win_amd64.whl", hash = "sha256:b01b88d45a6fcb69667cd6d2f7a9aeb4bf53760d7fc536bf679ec94fe9f3ff3d"},
- {file = "charset_normalizer-3.3.2-py3-none-any.whl", hash = "sha256:3e4d1f6587322d2788836a99c69062fbb091331ec940e02d12d179c1d53e25fc"},
+ {file = "charset_normalizer-3.4.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:4f9fc98dad6c2eaa32fc3af1417d95b5e3d08aff968df0cd320066def971f9a6"},
+ {file = "charset_normalizer-3.4.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0de7b687289d3c1b3e8660d0741874abe7888100efe14bd0f9fd7141bcbda92b"},
+ {file = "charset_normalizer-3.4.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:5ed2e36c3e9b4f21dd9422f6893dec0abf2cca553af509b10cd630f878d3eb99"},
+ {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:40d3ff7fc90b98c637bda91c89d51264a3dcf210cade3a2c6f838c7268d7a4ca"},
+ {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1110e22af8ca26b90bd6364fe4c763329b0ebf1ee213ba32b68c73de5752323d"},
+ {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:86f4e8cca779080f66ff4f191a685ced73d2f72d50216f7112185dc02b90b9b7"},
+ {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7f683ddc7eedd742e2889d2bfb96d69573fde1d92fcb811979cdb7165bb9c7d3"},
+ {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:27623ba66c183eca01bf9ff833875b459cad267aeeb044477fedac35e19ba907"},
+ {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:f606a1881d2663630ea5b8ce2efe2111740df4b687bd78b34a8131baa007f79b"},
+ {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:0b309d1747110feb25d7ed6b01afdec269c647d382c857ef4663bbe6ad95a912"},
+ {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:136815f06a3ae311fae551c3df1f998a1ebd01ddd424aa5603a4336997629e95"},
+ {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:14215b71a762336254351b00ec720a8e85cada43b987da5a042e4ce3e82bd68e"},
+ {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:79983512b108e4a164b9c8d34de3992f76d48cadc9554c9e60b43f308988aabe"},
+ {file = "charset_normalizer-3.4.0-cp310-cp310-win32.whl", hash = "sha256:c94057af19bc953643a33581844649a7fdab902624d2eb739738a30e2b3e60fc"},
+ {file = "charset_normalizer-3.4.0-cp310-cp310-win_amd64.whl", hash = "sha256:55f56e2ebd4e3bc50442fbc0888c9d8c94e4e06a933804e2af3e89e2f9c1c749"},
+ {file = "charset_normalizer-3.4.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:0d99dd8ff461990f12d6e42c7347fd9ab2532fb70e9621ba520f9e8637161d7c"},
+ {file = "charset_normalizer-3.4.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c57516e58fd17d03ebe67e181a4e4e2ccab1168f8c2976c6a334d4f819fe5944"},
+ {file = "charset_normalizer-3.4.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:6dba5d19c4dfab08e58d5b36304b3f92f3bd5d42c1a3fa37b5ba5cdf6dfcbcee"},
+ {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bf4475b82be41b07cc5e5ff94810e6a01f276e37c2d55571e3fe175e467a1a1c"},
+ {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ce031db0408e487fd2775d745ce30a7cd2923667cf3b69d48d219f1d8f5ddeb6"},
+ {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8ff4e7cdfdb1ab5698e675ca622e72d58a6fa2a8aa58195de0c0061288e6e3ea"},
+ {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3710a9751938947e6327ea9f3ea6332a09bf0ba0c09cae9cb1f250bd1f1549bc"},
+ {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:82357d85de703176b5587dbe6ade8ff67f9f69a41c0733cf2425378b49954de5"},
+ {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:47334db71978b23ebcf3c0f9f5ee98b8d65992b65c9c4f2d34c2eaf5bcaf0594"},
+ {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:8ce7fd6767a1cc5a92a639b391891bf1c268b03ec7e021c7d6d902285259685c"},
+ {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:f1a2f519ae173b5b6a2c9d5fa3116ce16e48b3462c8b96dfdded11055e3d6365"},
+ {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:63bc5c4ae26e4bc6be6469943b8253c0fd4e4186c43ad46e713ea61a0ba49129"},
+ {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:bcb4f8ea87d03bc51ad04add8ceaf9b0f085ac045ab4d74e73bbc2dc033f0236"},
+ {file = "charset_normalizer-3.4.0-cp311-cp311-win32.whl", hash = "sha256:9ae4ef0b3f6b41bad6366fb0ea4fc1d7ed051528e113a60fa2a65a9abb5b1d99"},
+ {file = "charset_normalizer-3.4.0-cp311-cp311-win_amd64.whl", hash = "sha256:cee4373f4d3ad28f1ab6290684d8e2ebdb9e7a1b74fdc39e4c211995f77bec27"},
+ {file = "charset_normalizer-3.4.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:0713f3adb9d03d49d365b70b84775d0a0d18e4ab08d12bc46baa6132ba78aaf6"},
+ {file = "charset_normalizer-3.4.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:de7376c29d95d6719048c194a9cf1a1b0393fbe8488a22008610b0361d834ecf"},
+ {file = "charset_normalizer-3.4.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:4a51b48f42d9358460b78725283f04bddaf44a9358197b889657deba38f329db"},
+ {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b295729485b06c1a0683af02a9e42d2caa9db04a373dc38a6a58cdd1e8abddf1"},
+ {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ee803480535c44e7f5ad00788526da7d85525cfefaf8acf8ab9a310000be4b03"},
+ {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3d59d125ffbd6d552765510e3f31ed75ebac2c7470c7274195b9161a32350284"},
+ {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8cda06946eac330cbe6598f77bb54e690b4ca93f593dee1568ad22b04f347c15"},
+ {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:07afec21bbbbf8a5cc3651aa96b980afe2526e7f048fdfb7f1014d84acc8b6d8"},
+ {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:6b40e8d38afe634559e398cc32b1472f376a4099c75fe6299ae607e404c033b2"},
+ {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:b8dcd239c743aa2f9c22ce674a145e0a25cb1566c495928440a181ca1ccf6719"},
+ {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:84450ba661fb96e9fd67629b93d2941c871ca86fc38d835d19d4225ff946a631"},
+ {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:44aeb140295a2f0659e113b31cfe92c9061622cadbc9e2a2f7b8ef6b1e29ef4b"},
+ {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:1db4e7fefefd0f548d73e2e2e041f9df5c59e178b4c72fbac4cc6f535cfb1565"},
+ {file = "charset_normalizer-3.4.0-cp312-cp312-win32.whl", hash = "sha256:5726cf76c982532c1863fb64d8c6dd0e4c90b6ece9feb06c9f202417a31f7dd7"},
+ {file = "charset_normalizer-3.4.0-cp312-cp312-win_amd64.whl", hash = "sha256:b197e7094f232959f8f20541ead1d9862ac5ebea1d58e9849c1bf979255dfac9"},
+ {file = "charset_normalizer-3.4.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:dd4eda173a9fcccb5f2e2bd2a9f423d180194b1bf17cf59e3269899235b2a114"},
+ {file = "charset_normalizer-3.4.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:e9e3c4c9e1ed40ea53acf11e2a386383c3304212c965773704e4603d589343ed"},
+ {file = "charset_normalizer-3.4.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:92a7e36b000bf022ef3dbb9c46bfe2d52c047d5e3f3343f43204263c5addc250"},
+ {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:54b6a92d009cbe2fb11054ba694bc9e284dad30a26757b1e372a1fdddaf21920"},
+ {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1ffd9493de4c922f2a38c2bf62b831dcec90ac673ed1ca182fe11b4d8e9f2a64"},
+ {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:35c404d74c2926d0287fbd63ed5d27eb911eb9e4a3bb2c6d294f3cfd4a9e0c23"},
+ {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4796efc4faf6b53a18e3d46343535caed491776a22af773f366534056c4e1fbc"},
+ {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e7fdd52961feb4c96507aa649550ec2a0d527c086d284749b2f582f2d40a2e0d"},
+ {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:92db3c28b5b2a273346bebb24857fda45601aef6ae1c011c0a997106581e8a88"},
+ {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:ab973df98fc99ab39080bfb0eb3a925181454d7c3ac8a1e695fddfae696d9e90"},
+ {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:4b67fdab07fdd3c10bb21edab3cbfe8cf5696f453afce75d815d9d7223fbe88b"},
+ {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:aa41e526a5d4a9dfcfbab0716c7e8a1b215abd3f3df5a45cf18a12721d31cb5d"},
+ {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:ffc519621dce0c767e96b9c53f09c5d215578e10b02c285809f76509a3931482"},
+ {file = "charset_normalizer-3.4.0-cp313-cp313-win32.whl", hash = "sha256:f19c1585933c82098c2a520f8ec1227f20e339e33aca8fa6f956f6691b784e67"},
+ {file = "charset_normalizer-3.4.0-cp313-cp313-win_amd64.whl", hash = "sha256:707b82d19e65c9bd28b81dde95249b07bf9f5b90ebe1ef17d9b57473f8a64b7b"},
+ {file = "charset_normalizer-3.4.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:dbe03226baf438ac4fda9e2d0715022fd579cb641c4cf639fa40d53b2fe6f3e2"},
+ {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dd9a8bd8900e65504a305bf8ae6fa9fbc66de94178c420791d0293702fce2df7"},
+ {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b8831399554b92b72af5932cdbbd4ddc55c55f631bb13ff8fe4e6536a06c5c51"},
+ {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a14969b8691f7998e74663b77b4c36c0337cb1df552da83d5c9004a93afdb574"},
+ {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dcaf7c1524c0542ee2fc82cc8ec337f7a9f7edee2532421ab200d2b920fc97cf"},
+ {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:425c5f215d0eecee9a56cdb703203dda90423247421bf0d67125add85d0c4455"},
+ {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:d5b054862739d276e09928de37c79ddeec42a6e1bfc55863be96a36ba22926f6"},
+ {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_i686.whl", hash = "sha256:f3e73a4255342d4eb26ef6df01e3962e73aa29baa3124a8e824c5d3364a65748"},
+ {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_ppc64le.whl", hash = "sha256:2f6c34da58ea9c1a9515621f4d9ac379871a8f21168ba1b5e09d74250de5ad62"},
+ {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_s390x.whl", hash = "sha256:f09cb5a7bbe1ecae6e87901a2eb23e0256bb524a79ccc53eb0b7629fbe7677c4"},
+ {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:0099d79bdfcf5c1f0c2c72f91516702ebf8b0b8ddd8905f97a8aecf49712c621"},
+ {file = "charset_normalizer-3.4.0-cp37-cp37m-win32.whl", hash = "sha256:9c98230f5042f4945f957d006edccc2af1e03ed5e37ce7c373f00a5a4daa6149"},
+ {file = "charset_normalizer-3.4.0-cp37-cp37m-win_amd64.whl", hash = "sha256:62f60aebecfc7f4b82e3f639a7d1433a20ec32824db2199a11ad4f5e146ef5ee"},
+ {file = "charset_normalizer-3.4.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:af73657b7a68211996527dbfeffbb0864e043d270580c5aef06dc4b659a4b578"},
+ {file = "charset_normalizer-3.4.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:cab5d0b79d987c67f3b9e9c53f54a61360422a5a0bc075f43cab5621d530c3b6"},
+ {file = "charset_normalizer-3.4.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:9289fd5dddcf57bab41d044f1756550f9e7cf0c8e373b8cdf0ce8773dc4bd417"},
+ {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6b493a043635eb376e50eedf7818f2f322eabbaa974e948bd8bdd29eb7ef2a51"},
+ {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9fa2566ca27d67c86569e8c85297aaf413ffab85a8960500f12ea34ff98e4c41"},
+ {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a8e538f46104c815be19c975572d74afb53f29650ea2025bbfaef359d2de2f7f"},
+ {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6fd30dc99682dc2c603c2b315bded2799019cea829f8bf57dc6b61efde6611c8"},
+ {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2006769bd1640bdf4d5641c69a3d63b71b81445473cac5ded39740a226fa88ab"},
+ {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:dc15e99b2d8a656f8e666854404f1ba54765871104e50c8e9813af8a7db07f12"},
+ {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:ab2e5bef076f5a235c3774b4f4028a680432cded7cad37bba0fd90d64b187d19"},
+ {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:4ec9dd88a5b71abfc74e9df5ebe7921c35cbb3b641181a531ca65cdb5e8e4dea"},
+ {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:43193c5cda5d612f247172016c4bb71251c784d7a4d9314677186a838ad34858"},
+ {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:aa693779a8b50cd97570e5a0f343538a8dbd3e496fa5dcb87e29406ad0299654"},
+ {file = "charset_normalizer-3.4.0-cp38-cp38-win32.whl", hash = "sha256:7706f5850360ac01d80c89bcef1640683cc12ed87f42579dab6c5d3ed6888613"},
+ {file = "charset_normalizer-3.4.0-cp38-cp38-win_amd64.whl", hash = "sha256:c3e446d253bd88f6377260d07c895816ebf33ffffd56c1c792b13bff9c3e1ade"},
+ {file = "charset_normalizer-3.4.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:980b4f289d1d90ca5efcf07958d3eb38ed9c0b7676bf2831a54d4f66f9c27dfa"},
+ {file = "charset_normalizer-3.4.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:f28f891ccd15c514a0981f3b9db9aa23d62fe1a99997512b0491d2ed323d229a"},
+ {file = "charset_normalizer-3.4.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a8aacce6e2e1edcb6ac625fb0f8c3a9570ccc7bfba1f63419b3769ccf6a00ed0"},
+ {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bd7af3717683bea4c87acd8c0d3d5b44d56120b26fd3f8a692bdd2d5260c620a"},
+ {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5ff2ed8194587faf56555927b3aa10e6fb69d931e33953943bc4f837dfee2242"},
+ {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e91f541a85298cf35433bf66f3fab2a4a2cff05c127eeca4af174f6d497f0d4b"},
+ {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:309a7de0a0ff3040acaebb35ec45d18db4b28232f21998851cfa709eeff49d62"},
+ {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:285e96d9d53422efc0d7a17c60e59f37fbf3dfa942073f666db4ac71e8d726d0"},
+ {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:5d447056e2ca60382d460a604b6302d8db69476fd2015c81e7c35417cfabe4cd"},
+ {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:20587d20f557fe189b7947d8e7ec5afa110ccf72a3128d61a2a387c3313f46be"},
+ {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:130272c698667a982a5d0e626851ceff662565379baf0ff2cc58067b81d4f11d"},
+ {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:ab22fbd9765e6954bc0bcff24c25ff71dcbfdb185fcdaca49e81bac68fe724d3"},
+ {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:7782afc9b6b42200f7362858f9e73b1f8316afb276d316336c0ec3bd73312742"},
+ {file = "charset_normalizer-3.4.0-cp39-cp39-win32.whl", hash = "sha256:2de62e8801ddfff069cd5c504ce3bc9672b23266597d4e4f50eda28846c322f2"},
+ {file = "charset_normalizer-3.4.0-cp39-cp39-win_amd64.whl", hash = "sha256:95c3c157765b031331dd4db3c775e58deaee050a3042fcad72cbc4189d7c8dca"},
+ {file = "charset_normalizer-3.4.0-py3-none-any.whl", hash = "sha256:fe9f97feb71aa9896b81973a7bbada8c49501dc73e58a10fcef6663af95e5079"},
+ {file = "charset_normalizer-3.4.0.tar.gz", hash = "sha256:223217c3d4f82c3ac5e29032b3f1c2eb0fb591b72161f86d93f5719079dae93e"},
]
[[package]]
@@ -371,83 +386,73 @@ files = [
[[package]]
name = "coverage"
-version = "7.6.1"
+version = "7.6.4"
description = "Code coverage measurement for Python"
optional = false
-python-versions = ">=3.8"
+python-versions = ">=3.9"
files = [
- {file = "coverage-7.6.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b06079abebbc0e89e6163b8e8f0e16270124c154dc6e4a47b413dd538859af16"},
- {file = "coverage-7.6.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:cf4b19715bccd7ee27b6b120e7e9dd56037b9c0681dcc1adc9ba9db3d417fa36"},
- {file = "coverage-7.6.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e61c0abb4c85b095a784ef23fdd4aede7a2628478e7baba7c5e3deba61070a02"},
- {file = "coverage-7.6.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fd21f6ae3f08b41004dfb433fa895d858f3f5979e7762d052b12aef444e29afc"},
- {file = "coverage-7.6.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8f59d57baca39b32db42b83b2a7ba6f47ad9c394ec2076b084c3f029b7afca23"},
- {file = "coverage-7.6.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:a1ac0ae2b8bd743b88ed0502544847c3053d7171a3cff9228af618a068ed9c34"},
- {file = "coverage-7.6.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:e6a08c0be454c3b3beb105c0596ebdc2371fab6bb90c0c0297f4e58fd7e1012c"},
- {file = "coverage-7.6.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:f5796e664fe802da4f57a168c85359a8fbf3eab5e55cd4e4569fbacecc903959"},
- {file = "coverage-7.6.1-cp310-cp310-win32.whl", hash = "sha256:7bb65125fcbef8d989fa1dd0e8a060999497629ca5b0efbca209588a73356232"},
- {file = "coverage-7.6.1-cp310-cp310-win_amd64.whl", hash = "sha256:3115a95daa9bdba70aea750db7b96b37259a81a709223c8448fa97727d546fe0"},
- {file = "coverage-7.6.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:7dea0889685db8550f839fa202744652e87c60015029ce3f60e006f8c4462c93"},
- {file = "coverage-7.6.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:ed37bd3c3b063412f7620464a9ac1314d33100329f39799255fb8d3027da50d3"},
- {file = "coverage-7.6.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d85f5e9a5f8b73e2350097c3756ef7e785f55bd71205defa0bfdaf96c31616ff"},
- {file = "coverage-7.6.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9bc572be474cafb617672c43fe989d6e48d3c83af02ce8de73fff1c6bb3c198d"},
- {file = "coverage-7.6.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0c0420b573964c760df9e9e86d1a9a622d0d27f417e1a949a8a66dd7bcee7bc6"},
- {file = "coverage-7.6.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1f4aa8219db826ce6be7099d559f8ec311549bfc4046f7f9fe9b5cea5c581c56"},
- {file = "coverage-7.6.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:fc5a77d0c516700ebad189b587de289a20a78324bc54baee03dd486f0855d234"},
- {file = "coverage-7.6.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:b48f312cca9621272ae49008c7f613337c53fadca647d6384cc129d2996d1133"},
- {file = "coverage-7.6.1-cp311-cp311-win32.whl", hash = "sha256:1125ca0e5fd475cbbba3bb67ae20bd2c23a98fac4e32412883f9bcbaa81c314c"},
- {file = "coverage-7.6.1-cp311-cp311-win_amd64.whl", hash = "sha256:8ae539519c4c040c5ffd0632784e21b2f03fc1340752af711f33e5be83a9d6c6"},
- {file = "coverage-7.6.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:95cae0efeb032af8458fc27d191f85d1717b1d4e49f7cb226cf526ff28179778"},
- {file = "coverage-7.6.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:5621a9175cf9d0b0c84c2ef2b12e9f5f5071357c4d2ea6ca1cf01814f45d2391"},
- {file = "coverage-7.6.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:260933720fdcd75340e7dbe9060655aff3af1f0c5d20f46b57f262ab6c86a5e8"},
- {file = "coverage-7.6.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:07e2ca0ad381b91350c0ed49d52699b625aab2b44b65e1b4e02fa9df0e92ad2d"},
- {file = "coverage-7.6.1-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c44fee9975f04b33331cb8eb272827111efc8930cfd582e0320613263ca849ca"},
- {file = "coverage-7.6.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:877abb17e6339d96bf08e7a622d05095e72b71f8afd8a9fefc82cf30ed944163"},
- {file = "coverage-7.6.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:3e0cadcf6733c09154b461f1ca72d5416635e5e4ec4e536192180d34ec160f8a"},
- {file = "coverage-7.6.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:c3c02d12f837d9683e5ab2f3d9844dc57655b92c74e286c262e0fc54213c216d"},
- {file = "coverage-7.6.1-cp312-cp312-win32.whl", hash = "sha256:e05882b70b87a18d937ca6768ff33cc3f72847cbc4de4491c8e73880766718e5"},
- {file = "coverage-7.6.1-cp312-cp312-win_amd64.whl", hash = "sha256:b5d7b556859dd85f3a541db6a4e0167b86e7273e1cdc973e5b175166bb634fdb"},
- {file = "coverage-7.6.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:a4acd025ecc06185ba2b801f2de85546e0b8ac787cf9d3b06e7e2a69f925b106"},
- {file = "coverage-7.6.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a6d3adcf24b624a7b778533480e32434a39ad8fa30c315208f6d3e5542aeb6e9"},
- {file = "coverage-7.6.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d0c212c49b6c10e6951362f7c6df3329f04c2b1c28499563d4035d964ab8e08c"},
- {file = "coverage-7.6.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6e81d7a3e58882450ec4186ca59a3f20a5d4440f25b1cff6f0902ad890e6748a"},
- {file = "coverage-7.6.1-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:78b260de9790fd81e69401c2dc8b17da47c8038176a79092a89cb2b7d945d060"},
- {file = "coverage-7.6.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a78d169acd38300060b28d600344a803628c3fd585c912cacc9ea8790fe96862"},
- {file = "coverage-7.6.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:2c09f4ce52cb99dd7505cd0fc8e0e37c77b87f46bc9c1eb03fe3bc9991085388"},
- {file = "coverage-7.6.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:6878ef48d4227aace338d88c48738a4258213cd7b74fd9a3d4d7582bb1d8a155"},
- {file = "coverage-7.6.1-cp313-cp313-win32.whl", hash = "sha256:44df346d5215a8c0e360307d46ffaabe0f5d3502c8a1cefd700b34baf31d411a"},
- {file = "coverage-7.6.1-cp313-cp313-win_amd64.whl", hash = "sha256:8284cf8c0dd272a247bc154eb6c95548722dce90d098c17a883ed36e67cdb129"},
- {file = "coverage-7.6.1-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:d3296782ca4eab572a1a4eca686d8bfb00226300dcefdf43faa25b5242ab8a3e"},
- {file = "coverage-7.6.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:502753043567491d3ff6d08629270127e0c31d4184c4c8d98f92c26f65019962"},
- {file = "coverage-7.6.1-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6a89ecca80709d4076b95f89f308544ec8f7b4727e8a547913a35f16717856cb"},
- {file = "coverage-7.6.1-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a318d68e92e80af8b00fa99609796fdbcdfef3629c77c6283566c6f02c6d6704"},
- {file = "coverage-7.6.1-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:13b0a73a0896988f053e4fbb7de6d93388e6dd292b0d87ee51d106f2c11b465b"},
- {file = "coverage-7.6.1-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:4421712dbfc5562150f7554f13dde997a2e932a6b5f352edcce948a815efee6f"},
- {file = "coverage-7.6.1-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:166811d20dfea725e2e4baa71fffd6c968a958577848d2131f39b60043400223"},
- {file = "coverage-7.6.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:225667980479a17db1048cb2bf8bfb39b8e5be8f164b8f6628b64f78a72cf9d3"},
- {file = "coverage-7.6.1-cp313-cp313t-win32.whl", hash = "sha256:170d444ab405852903b7d04ea9ae9b98f98ab6d7e63e1115e82620807519797f"},
- {file = "coverage-7.6.1-cp313-cp313t-win_amd64.whl", hash = "sha256:b9f222de8cded79c49bf184bdbc06630d4c58eec9459b939b4a690c82ed05657"},
- {file = "coverage-7.6.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6db04803b6c7291985a761004e9060b2bca08da6d04f26a7f2294b8623a0c1a0"},
- {file = "coverage-7.6.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:f1adfc8ac319e1a348af294106bc6a8458a0f1633cc62a1446aebc30c5fa186a"},
- {file = "coverage-7.6.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a95324a9de9650a729239daea117df21f4b9868ce32e63f8b650ebe6cef5595b"},
- {file = "coverage-7.6.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b43c03669dc4618ec25270b06ecd3ee4fa94c7f9b3c14bae6571ca00ef98b0d3"},
- {file = "coverage-7.6.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8929543a7192c13d177b770008bc4e8119f2e1f881d563fc6b6305d2d0ebe9de"},
- {file = "coverage-7.6.1-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:a09ece4a69cf399510c8ab25e0950d9cf2b42f7b3cb0374f95d2e2ff594478a6"},
- {file = "coverage-7.6.1-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:9054a0754de38d9dbd01a46621636689124d666bad1936d76c0341f7d71bf569"},
- {file = "coverage-7.6.1-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:0dbde0f4aa9a16fa4d754356a8f2e36296ff4d83994b2c9d8398aa32f222f989"},
- {file = "coverage-7.6.1-cp38-cp38-win32.whl", hash = "sha256:da511e6ad4f7323ee5702e6633085fb76c2f893aaf8ce4c51a0ba4fc07580ea7"},
- {file = "coverage-7.6.1-cp38-cp38-win_amd64.whl", hash = "sha256:3f1156e3e8f2872197af3840d8ad307a9dd18e615dc64d9ee41696f287c57ad8"},
- {file = "coverage-7.6.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:abd5fd0db5f4dc9289408aaf34908072f805ff7792632250dcb36dc591d24255"},
- {file = "coverage-7.6.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:547f45fa1a93154bd82050a7f3cddbc1a7a4dd2a9bf5cb7d06f4ae29fe94eaf8"},
- {file = "coverage-7.6.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:645786266c8f18a931b65bfcefdbf6952dd0dea98feee39bd188607a9d307ed2"},
- {file = "coverage-7.6.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9e0b2df163b8ed01d515807af24f63de04bebcecbd6c3bfeff88385789fdf75a"},
- {file = "coverage-7.6.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:609b06f178fe8e9f89ef676532760ec0b4deea15e9969bf754b37f7c40326dbc"},
- {file = "coverage-7.6.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:702855feff378050ae4f741045e19a32d57d19f3e0676d589df0575008ea5004"},
- {file = "coverage-7.6.1-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:2bdb062ea438f22d99cba0d7829c2ef0af1d768d1e4a4f528087224c90b132cb"},
- {file = "coverage-7.6.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:9c56863d44bd1c4fe2abb8a4d6f5371d197f1ac0ebdee542f07f35895fc07f36"},
- {file = "coverage-7.6.1-cp39-cp39-win32.whl", hash = "sha256:6e2cd258d7d927d09493c8df1ce9174ad01b381d4729a9d8d4e38670ca24774c"},
- {file = "coverage-7.6.1-cp39-cp39-win_amd64.whl", hash = "sha256:06a737c882bd26d0d6ee7269b20b12f14a8704807a01056c80bb881a4b2ce6ca"},
- {file = "coverage-7.6.1-pp38.pp39.pp310-none-any.whl", hash = "sha256:e9a6e0eb86070e8ccaedfbd9d38fec54864f3125ab95419970575b42af7541df"},
- {file = "coverage-7.6.1.tar.gz", hash = "sha256:953510dfb7b12ab69d20135a0662397f077c59b1e6379a768e97c59d852ee51d"},
+ {file = "coverage-7.6.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:5f8ae553cba74085db385d489c7a792ad66f7f9ba2ee85bfa508aeb84cf0ba07"},
+ {file = "coverage-7.6.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8165b796df0bd42e10527a3f493c592ba494f16ef3c8b531288e3d0d72c1f6f0"},
+ {file = "coverage-7.6.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c7c8b95bf47db6d19096a5e052ffca0a05f335bc63cef281a6e8fe864d450a72"},
+ {file = "coverage-7.6.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8ed9281d1b52628e81393f5eaee24a45cbd64965f41857559c2b7ff19385df51"},
+ {file = "coverage-7.6.4-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0809082ee480bb8f7416507538243c8863ac74fd8a5d2485c46f0f7499f2b491"},
+ {file = "coverage-7.6.4-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:d541423cdd416b78626b55f123412fcf979d22a2c39fce251b350de38c15c15b"},
+ {file = "coverage-7.6.4-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:58809e238a8a12a625c70450b48e8767cff9eb67c62e6154a642b21ddf79baea"},
+ {file = "coverage-7.6.4-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:c9b8e184898ed014884ca84c70562b4a82cbc63b044d366fedc68bc2b2f3394a"},
+ {file = "coverage-7.6.4-cp310-cp310-win32.whl", hash = "sha256:6bd818b7ea14bc6e1f06e241e8234508b21edf1b242d49831831a9450e2f35fa"},
+ {file = "coverage-7.6.4-cp310-cp310-win_amd64.whl", hash = "sha256:06babbb8f4e74b063dbaeb74ad68dfce9186c595a15f11f5d5683f748fa1d172"},
+ {file = "coverage-7.6.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:73d2b73584446e66ee633eaad1a56aad577c077f46c35ca3283cd687b7715b0b"},
+ {file = "coverage-7.6.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:51b44306032045b383a7a8a2c13878de375117946d68dcb54308111f39775a25"},
+ {file = "coverage-7.6.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0b3fb02fe73bed561fa12d279a417b432e5b50fe03e8d663d61b3d5990f29546"},
+ {file = "coverage-7.6.4-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ed8fe9189d2beb6edc14d3ad19800626e1d9f2d975e436f84e19efb7fa19469b"},
+ {file = "coverage-7.6.4-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b369ead6527d025a0fe7bd3864e46dbee3aa8f652d48df6174f8d0bac9e26e0e"},
+ {file = "coverage-7.6.4-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:ade3ca1e5f0ff46b678b66201f7ff477e8fa11fb537f3b55c3f0568fbfe6e718"},
+ {file = "coverage-7.6.4-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:27fb4a050aaf18772db513091c9c13f6cb94ed40eacdef8dad8411d92d9992db"},
+ {file = "coverage-7.6.4-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:4f704f0998911abf728a7783799444fcbbe8261c4a6c166f667937ae6a8aa522"},
+ {file = "coverage-7.6.4-cp311-cp311-win32.whl", hash = "sha256:29155cd511ee058e260db648b6182c419422a0d2e9a4fa44501898cf918866cf"},
+ {file = "coverage-7.6.4-cp311-cp311-win_amd64.whl", hash = "sha256:8902dd6a30173d4ef09954bfcb24b5d7b5190cf14a43170e386979651e09ba19"},
+ {file = "coverage-7.6.4-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:12394842a3a8affa3ba62b0d4ab7e9e210c5e366fbac3e8b2a68636fb19892c2"},
+ {file = "coverage-7.6.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:2b6b4c83d8e8ea79f27ab80778c19bc037759aea298da4b56621f4474ffeb117"},
+ {file = "coverage-7.6.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1d5b8007f81b88696d06f7df0cb9af0d3b835fe0c8dbf489bad70b45f0e45613"},
+ {file = "coverage-7.6.4-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b57b768feb866f44eeed9f46975f3d6406380275c5ddfe22f531a2bf187eda27"},
+ {file = "coverage-7.6.4-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5915fcdec0e54ee229926868e9b08586376cae1f5faa9bbaf8faf3561b393d52"},
+ {file = "coverage-7.6.4-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:0b58c672d14f16ed92a48db984612f5ce3836ae7d72cdd161001cc54512571f2"},
+ {file = "coverage-7.6.4-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:2fdef0d83a2d08d69b1f2210a93c416d54e14d9eb398f6ab2f0a209433db19e1"},
+ {file = "coverage-7.6.4-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:8cf717ee42012be8c0cb205dbbf18ffa9003c4cbf4ad078db47b95e10748eec5"},
+ {file = "coverage-7.6.4-cp312-cp312-win32.whl", hash = "sha256:7bb92c539a624cf86296dd0c68cd5cc286c9eef2d0c3b8b192b604ce9de20a17"},
+ {file = "coverage-7.6.4-cp312-cp312-win_amd64.whl", hash = "sha256:1032e178b76a4e2b5b32e19d0fd0abbce4b58e77a1ca695820d10e491fa32b08"},
+ {file = "coverage-7.6.4-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:023bf8ee3ec6d35af9c1c6ccc1d18fa69afa1cb29eaac57cb064dbb262a517f9"},
+ {file = "coverage-7.6.4-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:b0ac3d42cb51c4b12df9c5f0dd2f13a4f24f01943627120ec4d293c9181219ba"},
+ {file = "coverage-7.6.4-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f8fe4984b431f8621ca53d9380901f62bfb54ff759a1348cd140490ada7b693c"},
+ {file = "coverage-7.6.4-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5fbd612f8a091954a0c8dd4c0b571b973487277d26476f8480bfa4b2a65b5d06"},
+ {file = "coverage-7.6.4-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dacbc52de979f2823a819571f2e3a350a7e36b8cb7484cdb1e289bceaf35305f"},
+ {file = "coverage-7.6.4-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:dab4d16dfef34b185032580e2f2f89253d302facba093d5fa9dbe04f569c4f4b"},
+ {file = "coverage-7.6.4-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:862264b12ebb65ad8d863d51f17758b1684560b66ab02770d4f0baf2ff75da21"},
+ {file = "coverage-7.6.4-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:5beb1ee382ad32afe424097de57134175fea3faf847b9af002cc7895be4e2a5a"},
+ {file = "coverage-7.6.4-cp313-cp313-win32.whl", hash = "sha256:bf20494da9653f6410213424f5f8ad0ed885e01f7e8e59811f572bdb20b8972e"},
+ {file = "coverage-7.6.4-cp313-cp313-win_amd64.whl", hash = "sha256:182e6cd5c040cec0a1c8d415a87b67ed01193ed9ad458ee427741c7d8513d963"},
+ {file = "coverage-7.6.4-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:a181e99301a0ae128493a24cfe5cfb5b488c4e0bf2f8702091473d033494d04f"},
+ {file = "coverage-7.6.4-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:df57bdbeffe694e7842092c5e2e0bc80fff7f43379d465f932ef36f027179806"},
+ {file = "coverage-7.6.4-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0bcd1069e710600e8e4cf27f65c90c7843fa8edfb4520fb0ccb88894cad08b11"},
+ {file = "coverage-7.6.4-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:99b41d18e6b2a48ba949418db48159d7a2e81c5cc290fc934b7d2380515bd0e3"},
+ {file = "coverage-7.6.4-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a6b1e54712ba3474f34b7ef7a41e65bd9037ad47916ccb1cc78769bae324c01a"},
+ {file = "coverage-7.6.4-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:53d202fd109416ce011578f321460795abfe10bb901b883cafd9b3ef851bacfc"},
+ {file = "coverage-7.6.4-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:c48167910a8f644671de9f2083a23630fbf7a1cb70ce939440cd3328e0919f70"},
+ {file = "coverage-7.6.4-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:cc8ff50b50ce532de2fa7a7daae9dd12f0a699bfcd47f20945364e5c31799fef"},
+ {file = "coverage-7.6.4-cp313-cp313t-win32.whl", hash = "sha256:b8d3a03d9bfcaf5b0141d07a88456bb6a4c3ce55c080712fec8418ef3610230e"},
+ {file = "coverage-7.6.4-cp313-cp313t-win_amd64.whl", hash = "sha256:f3ddf056d3ebcf6ce47bdaf56142af51bb7fad09e4af310241e9db7a3a8022e1"},
+ {file = "coverage-7.6.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:9cb7fa111d21a6b55cbf633039f7bc2749e74932e3aa7cb7333f675a58a58bf3"},
+ {file = "coverage-7.6.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:11a223a14e91a4693d2d0755c7a043db43d96a7450b4f356d506c2562c48642c"},
+ {file = "coverage-7.6.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a413a096c4cbac202433c850ee43fa326d2e871b24554da8327b01632673a076"},
+ {file = "coverage-7.6.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:00a1d69c112ff5149cabe60d2e2ee948752c975d95f1e1096742e6077affd376"},
+ {file = "coverage-7.6.4-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1f76846299ba5c54d12c91d776d9605ae33f8ae2b9d1d3c3703cf2db1a67f2c0"},
+ {file = "coverage-7.6.4-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:fe439416eb6380de434886b00c859304338f8b19f6f54811984f3420a2e03858"},
+ {file = "coverage-7.6.4-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:0294ca37f1ba500667b1aef631e48d875ced93ad5e06fa665a3295bdd1d95111"},
+ {file = "coverage-7.6.4-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:6f01ba56b1c0e9d149f9ac85a2f999724895229eb36bd997b61e62999e9b0901"},
+ {file = "coverage-7.6.4-cp39-cp39-win32.whl", hash = "sha256:bc66f0bf1d7730a17430a50163bb264ba9ded56739112368ba985ddaa9c3bd09"},
+ {file = "coverage-7.6.4-cp39-cp39-win_amd64.whl", hash = "sha256:c481b47f6b5845064c65a7bc78bc0860e635a9b055af0df46fdf1c58cebf8e8f"},
+ {file = "coverage-7.6.4-pp39.pp310-none-any.whl", hash = "sha256:3c65d37f3a9ebb703e710befdc489a38683a5b152242664b973a7b7b22348a4e"},
+ {file = "coverage-7.6.4.tar.gz", hash = "sha256:29fc0f17b1d3fea332f8001d4558f8214af7f1d87a345f3a133c901d60347c73"},
]
[package.dependencies]
@@ -458,38 +463,38 @@ toml = ["tomli"]
[[package]]
name = "cryptography"
-version = "43.0.1"
+version = "43.0.3"
description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers."
optional = false
python-versions = ">=3.7"
files = [
- {file = "cryptography-43.0.1-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:8385d98f6a3bf8bb2d65a73e17ed87a3ba84f6991c155691c51112075f9ffc5d"},
- {file = "cryptography-43.0.1-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:27e613d7077ac613e399270253259d9d53872aaf657471473ebfc9a52935c062"},
- {file = "cryptography-43.0.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:68aaecc4178e90719e95298515979814bda0cbada1256a4485414860bd7ab962"},
- {file = "cryptography-43.0.1-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:de41fd81a41e53267cb020bb3a7212861da53a7d39f863585d13ea11049cf277"},
- {file = "cryptography-43.0.1-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:f98bf604c82c416bc829e490c700ca1553eafdf2912a91e23a79d97d9801372a"},
- {file = "cryptography-43.0.1-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:61ec41068b7b74268fa86e3e9e12b9f0c21fcf65434571dbb13d954bceb08042"},
- {file = "cryptography-43.0.1-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:014f58110f53237ace6a408b5beb6c427b64e084eb451ef25a28308270086494"},
- {file = "cryptography-43.0.1-cp37-abi3-win32.whl", hash = "sha256:2bd51274dcd59f09dd952afb696bf9c61a7a49dfc764c04dd33ef7a6b502a1e2"},
- {file = "cryptography-43.0.1-cp37-abi3-win_amd64.whl", hash = "sha256:666ae11966643886c2987b3b721899d250855718d6d9ce41b521252a17985f4d"},
- {file = "cryptography-43.0.1-cp39-abi3-macosx_10_9_universal2.whl", hash = "sha256:ac119bb76b9faa00f48128b7f5679e1d8d437365c5d26f1c2c3f0da4ce1b553d"},
- {file = "cryptography-43.0.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1bbcce1a551e262dfbafb6e6252f1ae36a248e615ca44ba302df077a846a8806"},
- {file = "cryptography-43.0.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:58d4e9129985185a06d849aa6df265bdd5a74ca6e1b736a77959b498e0505b85"},
- {file = "cryptography-43.0.1-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:d03a475165f3134f773d1388aeb19c2d25ba88b6a9733c5c590b9ff7bbfa2e0c"},
- {file = "cryptography-43.0.1-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:511f4273808ab590912a93ddb4e3914dfd8a388fed883361b02dea3791f292e1"},
- {file = "cryptography-43.0.1-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:80eda8b3e173f0f247f711eef62be51b599b5d425c429b5d4ca6a05e9e856baa"},
- {file = "cryptography-43.0.1-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:38926c50cff6f533f8a2dae3d7f19541432610d114a70808f0926d5aaa7121e4"},
- {file = "cryptography-43.0.1-cp39-abi3-win32.whl", hash = "sha256:a575913fb06e05e6b4b814d7f7468c2c660e8bb16d8d5a1faf9b33ccc569dd47"},
- {file = "cryptography-43.0.1-cp39-abi3-win_amd64.whl", hash = "sha256:d75601ad10b059ec832e78823b348bfa1a59f6b8d545db3a24fd44362a1564cb"},
- {file = "cryptography-43.0.1-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:ea25acb556320250756e53f9e20a4177515f012c9eaea17eb7587a8c4d8ae034"},
- {file = "cryptography-43.0.1-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:c1332724be35d23a854994ff0b66530119500b6053d0bd3363265f7e5e77288d"},
- {file = "cryptography-43.0.1-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:fba1007b3ef89946dbbb515aeeb41e30203b004f0b4b00e5e16078b518563289"},
- {file = "cryptography-43.0.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:5b43d1ea6b378b54a1dc99dd8a2b5be47658fe9a7ce0a58ff0b55f4b43ef2b84"},
- {file = "cryptography-43.0.1-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:88cce104c36870d70c49c7c8fd22885875d950d9ee6ab54df2745f83ba0dc365"},
- {file = "cryptography-43.0.1-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:9d3cdb25fa98afdd3d0892d132b8d7139e2c087da1712041f6b762e4f807cc96"},
- {file = "cryptography-43.0.1-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:e710bf40870f4db63c3d7d929aa9e09e4e7ee219e703f949ec4073b4294f6172"},
- {file = "cryptography-43.0.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:7c05650fe8023c5ed0d46793d4b7d7e6cd9c04e68eabe5b0aeea836e37bdcec2"},
- {file = "cryptography-43.0.1.tar.gz", hash = "sha256:203e92a75716d8cfb491dc47c79e17d0d9207ccffcbcb35f598fbe463ae3444d"},
+ {file = "cryptography-43.0.3-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:bf7a1932ac4176486eab36a19ed4c0492da5d97123f1406cf15e41b05e787d2e"},
+ {file = "cryptography-43.0.3-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:63efa177ff54aec6e1c0aefaa1a241232dcd37413835a9b674b6e3f0ae2bfd3e"},
+ {file = "cryptography-43.0.3-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7e1ce50266f4f70bf41a2c6dc4358afadae90e2a1e5342d3c08883df1675374f"},
+ {file = "cryptography-43.0.3-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:443c4a81bb10daed9a8f334365fe52542771f25aedaf889fd323a853ce7377d6"},
+ {file = "cryptography-43.0.3-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:74f57f24754fe349223792466a709f8e0c093205ff0dca557af51072ff47ab18"},
+ {file = "cryptography-43.0.3-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:9762ea51a8fc2a88b70cf2995e5675b38d93bf36bd67d91721c309df184f49bd"},
+ {file = "cryptography-43.0.3-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:81ef806b1fef6b06dcebad789f988d3b37ccaee225695cf3e07648eee0fc6b73"},
+ {file = "cryptography-43.0.3-cp37-abi3-win32.whl", hash = "sha256:cbeb489927bd7af4aa98d4b261af9a5bc025bd87f0e3547e11584be9e9427be2"},
+ {file = "cryptography-43.0.3-cp37-abi3-win_amd64.whl", hash = "sha256:f46304d6f0c6ab8e52770addfa2fc41e6629495548862279641972b6215451cd"},
+ {file = "cryptography-43.0.3-cp39-abi3-macosx_10_9_universal2.whl", hash = "sha256:8ac43ae87929a5982f5948ceda07001ee5e83227fd69cf55b109144938d96984"},
+ {file = "cryptography-43.0.3-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:846da004a5804145a5f441b8530b4bf35afbf7da70f82409f151695b127213d5"},
+ {file = "cryptography-43.0.3-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0f996e7268af62598f2fc1204afa98a3b5712313a55c4c9d434aef49cadc91d4"},
+ {file = "cryptography-43.0.3-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:f7b178f11ed3664fd0e995a47ed2b5ff0a12d893e41dd0494f406d1cf555cab7"},
+ {file = "cryptography-43.0.3-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:c2e6fc39c4ab499049df3bdf567f768a723a5e8464816e8f009f121a5a9f4405"},
+ {file = "cryptography-43.0.3-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:e1be4655c7ef6e1bbe6b5d0403526601323420bcf414598955968c9ef3eb7d16"},
+ {file = "cryptography-43.0.3-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:df6b6c6d742395dd77a23ea3728ab62f98379eff8fb61be2744d4679ab678f73"},
+ {file = "cryptography-43.0.3-cp39-abi3-win32.whl", hash = "sha256:d56e96520b1020449bbace2b78b603442e7e378a9b3bd68de65c782db1507995"},
+ {file = "cryptography-43.0.3-cp39-abi3-win_amd64.whl", hash = "sha256:0c580952eef9bf68c4747774cde7ec1d85a6e61de97281f2dba83c7d2c806362"},
+ {file = "cryptography-43.0.3-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:d03b5621a135bffecad2c73e9f4deb1a0f977b9a8ffe6f8e002bf6c9d07b918c"},
+ {file = "cryptography-43.0.3-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:a2a431ee15799d6db9fe80c82b055bae5a752bef645bba795e8e52687c69efe3"},
+ {file = "cryptography-43.0.3-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:281c945d0e28c92ca5e5930664c1cefd85efe80e5c0d2bc58dd63383fda29f83"},
+ {file = "cryptography-43.0.3-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:f18c716be16bc1fea8e95def49edf46b82fccaa88587a45f8dc0ff6ab5d8e0a7"},
+ {file = "cryptography-43.0.3-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:4a02ded6cd4f0a5562a8887df8b3bd14e822a90f97ac5e544c162899bc467664"},
+ {file = "cryptography-43.0.3-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:53a583b6637ab4c4e3591a15bc9db855b8d9dee9a669b550f311480acab6eb08"},
+ {file = "cryptography-43.0.3-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:1ec0bcf7e17c0c5669d881b1cd38c4972fade441b27bda1051665faaa89bdcaa"},
+ {file = "cryptography-43.0.3-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:2ce6fae5bdad59577b44e4dfed356944fbf1d925269114c28be377692643b4ff"},
+ {file = "cryptography-43.0.3.tar.gz", hash = "sha256:315b9001266a492a6ff443b61238f956b214dbec9910a081ba5b6646a055a805"},
]
[package.dependencies]
@@ -502,7 +507,7 @@ nox = ["nox"]
pep8test = ["check-sdist", "click", "mypy", "ruff"]
sdist = ["build"]
ssh = ["bcrypt (>=3.1.5)"]
-test = ["certifi", "cryptography-vectors (==43.0.1)", "pretend", "pytest (>=6.2.0)", "pytest-benchmark", "pytest-cov", "pytest-xdist"]
+test = ["certifi", "cryptography-vectors (==43.0.3)", "pretend", "pytest (>=6.2.0)", "pytest-benchmark", "pytest-cov", "pytest-xdist"]
test-randomorder = ["pytest-randomly"]
[[package]]
@@ -518,13 +523,13 @@ files = [
[[package]]
name = "distlib"
-version = "0.3.8"
+version = "0.3.9"
description = "Distribution utilities"
optional = false
python-versions = "*"
files = [
- {file = "distlib-0.3.8-py2.py3-none-any.whl", hash = "sha256:034db59a0b96f8ca18035f36290806a9a6e6bd9d1ff91e45a7f172eb17e51784"},
- {file = "distlib-0.3.8.tar.gz", hash = "sha256:1530ea13e350031b6312d8580ddb6b27a104275a31106523b8f123787f494f64"},
+ {file = "distlib-0.3.9-py2.py3-none-any.whl", hash = "sha256:47f8c22fd27c27e25a65601af709b38e4f0a45ea4fc2e710f65755fa8caaaf87"},
+ {file = "distlib-0.3.9.tar.gz", hash = "sha256:a60f20dea646b8a33f3e7772f74dc0b2d0772d2837ee1342a00645c81edf9403"},
]
[[package]]
@@ -565,18 +570,18 @@ test = ["pytest (>=6)"]
[[package]]
name = "fastapi"
-version = "0.115.0"
+version = "0.115.2"
description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production"
optional = false
python-versions = ">=3.8"
files = [
- {file = "fastapi-0.115.0-py3-none-any.whl", hash = "sha256:17ea427674467486e997206a5ab25760f6b09e069f099b96f5b55a32fb6f1631"},
- {file = "fastapi-0.115.0.tar.gz", hash = "sha256:f93b4ca3529a8ebc6fc3fcf710e5efa8de3df9b41570958abf1d97d843138004"},
+ {file = "fastapi-0.115.2-py3-none-any.whl", hash = "sha256:61704c71286579cc5a598763905928f24ee98bfcc07aabe84cfefb98812bbc86"},
+ {file = "fastapi-0.115.2.tar.gz", hash = "sha256:3995739e0b09fa12f984bce8fa9ae197b35d433750d3d312422d846e283697ee"},
]
[package.dependencies]
pydantic = ">=1.7.4,<1.8 || >1.8,<1.8.1 || >1.8.1,<2.0.0 || >2.0.0,<2.0.1 || >2.0.1,<2.1.0 || >2.1.0,<3.0.0"
-starlette = ">=0.37.2,<0.39.0"
+starlette = ">=0.37.2,<0.41.0"
typing-extensions = ">=4.8.0"
[package.extras]
@@ -601,69 +606,84 @@ typing = ["typing-extensions (>=4.12.2)"]
[[package]]
name = "greenlet"
-version = "3.0.3"
+version = "3.1.1"
description = "Lightweight in-process concurrent programming"
optional = false
python-versions = ">=3.7"
files = [
- {file = "greenlet-3.0.3-cp310-cp310-macosx_11_0_universal2.whl", hash = "sha256:9da2bd29ed9e4f15955dd1595ad7bc9320308a3b766ef7f837e23ad4b4aac31a"},
- {file = "greenlet-3.0.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d353cadd6083fdb056bb46ed07e4340b0869c305c8ca54ef9da3421acbdf6881"},
- {file = "greenlet-3.0.3-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:dca1e2f3ca00b84a396bc1bce13dd21f680f035314d2379c4160c98153b2059b"},
- {file = "greenlet-3.0.3-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3ed7fb269f15dc662787f4119ec300ad0702fa1b19d2135a37c2c4de6fadfd4a"},
- {file = "greenlet-3.0.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dd4f49ae60e10adbc94b45c0b5e6a179acc1736cf7a90160b404076ee283cf83"},
- {file = "greenlet-3.0.3-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:73a411ef564e0e097dbe7e866bb2dda0f027e072b04da387282b02c308807405"},
- {file = "greenlet-3.0.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:7f362975f2d179f9e26928c5b517524e89dd48530a0202570d55ad6ca5d8a56f"},
- {file = "greenlet-3.0.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:649dde7de1a5eceb258f9cb00bdf50e978c9db1b996964cd80703614c86495eb"},
- {file = "greenlet-3.0.3-cp310-cp310-win_amd64.whl", hash = "sha256:68834da854554926fbedd38c76e60c4a2e3198c6fbed520b106a8986445caaf9"},
- {file = "greenlet-3.0.3-cp311-cp311-macosx_11_0_universal2.whl", hash = "sha256:b1b5667cced97081bf57b8fa1d6bfca67814b0afd38208d52538316e9422fc61"},
- {file = "greenlet-3.0.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:52f59dd9c96ad2fc0d5724107444f76eb20aaccb675bf825df6435acb7703559"},
- {file = "greenlet-3.0.3-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:afaff6cf5200befd5cec055b07d1c0a5a06c040fe5ad148abcd11ba6ab9b114e"},
- {file = "greenlet-3.0.3-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:fe754d231288e1e64323cfad462fcee8f0288654c10bdf4f603a39ed923bef33"},
- {file = "greenlet-3.0.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2797aa5aedac23af156bbb5a6aa2cd3427ada2972c828244eb7d1b9255846379"},
- {file = "greenlet-3.0.3-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b7f009caad047246ed379e1c4dbcb8b020f0a390667ea74d2387be2998f58a22"},
- {file = "greenlet-3.0.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:c5e1536de2aad7bf62e27baf79225d0d64360d4168cf2e6becb91baf1ed074f3"},
- {file = "greenlet-3.0.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:894393ce10ceac937e56ec00bb71c4c2f8209ad516e96033e4b3b1de270e200d"},
- {file = "greenlet-3.0.3-cp311-cp311-win_amd64.whl", hash = "sha256:1ea188d4f49089fc6fb283845ab18a2518d279c7cd9da1065d7a84e991748728"},
- {file = "greenlet-3.0.3-cp312-cp312-macosx_11_0_universal2.whl", hash = "sha256:70fb482fdf2c707765ab5f0b6655e9cfcf3780d8d87355a063547b41177599be"},
- {file = "greenlet-3.0.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d4d1ac74f5c0c0524e4a24335350edad7e5f03b9532da7ea4d3c54d527784f2e"},
- {file = "greenlet-3.0.3-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:149e94a2dd82d19838fe4b2259f1b6b9957d5ba1b25640d2380bea9c5df37676"},
- {file = "greenlet-3.0.3-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:15d79dd26056573940fcb8c7413d84118086f2ec1a8acdfa854631084393efcc"},
- {file = "greenlet-3.0.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:881b7db1ebff4ba09aaaeae6aa491daeb226c8150fc20e836ad00041bcb11230"},
- {file = "greenlet-3.0.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:fcd2469d6a2cf298f198f0487e0a5b1a47a42ca0fa4dfd1b6862c999f018ebbf"},
- {file = "greenlet-3.0.3-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:1f672519db1796ca0d8753f9e78ec02355e862d0998193038c7073045899f305"},
- {file = "greenlet-3.0.3-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:2516a9957eed41dd8f1ec0c604f1cdc86758b587d964668b5b196a9db5bfcde6"},
- {file = "greenlet-3.0.3-cp312-cp312-win_amd64.whl", hash = "sha256:bba5387a6975598857d86de9eac14210a49d554a77eb8261cc68b7d082f78ce2"},
- {file = "greenlet-3.0.3-cp37-cp37m-macosx_11_0_universal2.whl", hash = "sha256:5b51e85cb5ceda94e79d019ed36b35386e8c37d22f07d6a751cb659b180d5274"},
- {file = "greenlet-3.0.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:daf3cb43b7cf2ba96d614252ce1684c1bccee6b2183a01328c98d36fcd7d5cb0"},
- {file = "greenlet-3.0.3-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:99bf650dc5d69546e076f413a87481ee1d2d09aaaaaca058c9251b6d8c14783f"},
- {file = "greenlet-3.0.3-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2dd6e660effd852586b6a8478a1d244b8dc90ab5b1321751d2ea15deb49ed414"},
- {file = "greenlet-3.0.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e3391d1e16e2a5a1507d83e4a8b100f4ee626e8eca43cf2cadb543de69827c4c"},
- {file = "greenlet-3.0.3-cp37-cp37m-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e1f145462f1fa6e4a4ae3c0f782e580ce44d57c8f2c7aae1b6fa88c0b2efdb41"},
- {file = "greenlet-3.0.3-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:1a7191e42732df52cb5f39d3527217e7ab73cae2cb3694d241e18f53d84ea9a7"},
- {file = "greenlet-3.0.3-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:0448abc479fab28b00cb472d278828b3ccca164531daab4e970a0458786055d6"},
- {file = "greenlet-3.0.3-cp37-cp37m-win32.whl", hash = "sha256:b542be2440edc2d48547b5923c408cbe0fc94afb9f18741faa6ae970dbcb9b6d"},
- {file = "greenlet-3.0.3-cp37-cp37m-win_amd64.whl", hash = "sha256:01bc7ea167cf943b4c802068e178bbf70ae2e8c080467070d01bfa02f337ee67"},
- {file = "greenlet-3.0.3-cp38-cp38-macosx_11_0_universal2.whl", hash = "sha256:1996cb9306c8595335bb157d133daf5cf9f693ef413e7673cb07e3e5871379ca"},
- {file = "greenlet-3.0.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3ddc0f794e6ad661e321caa8d2f0a55ce01213c74722587256fb6566049a8b04"},
- {file = "greenlet-3.0.3-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c9db1c18f0eaad2f804728c67d6c610778456e3e1cc4ab4bbd5eeb8e6053c6fc"},
- {file = "greenlet-3.0.3-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7170375bcc99f1a2fbd9c306f5be8764eaf3ac6b5cb968862cad4c7057756506"},
- {file = "greenlet-3.0.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6b66c9c1e7ccabad3a7d037b2bcb740122a7b17a53734b7d72a344ce39882a1b"},
- {file = "greenlet-3.0.3-cp38-cp38-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:098d86f528c855ead3479afe84b49242e174ed262456c342d70fc7f972bc13c4"},
- {file = "greenlet-3.0.3-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:81bb9c6d52e8321f09c3d165b2a78c680506d9af285bfccbad9fb7ad5a5da3e5"},
- {file = "greenlet-3.0.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:fd096eb7ffef17c456cfa587523c5f92321ae02427ff955bebe9e3c63bc9f0da"},
- {file = "greenlet-3.0.3-cp38-cp38-win32.whl", hash = "sha256:d46677c85c5ba00a9cb6f7a00b2bfa6f812192d2c9f7d9c4f6a55b60216712f3"},
- {file = "greenlet-3.0.3-cp38-cp38-win_amd64.whl", hash = "sha256:419b386f84949bf0e7c73e6032e3457b82a787c1ab4a0e43732898a761cc9dbf"},
- {file = "greenlet-3.0.3-cp39-cp39-macosx_11_0_universal2.whl", hash = "sha256:da70d4d51c8b306bb7a031d5cff6cc25ad253affe89b70352af5f1cb68e74b53"},
- {file = "greenlet-3.0.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:086152f8fbc5955df88382e8a75984e2bb1c892ad2e3c80a2508954e52295257"},
- {file = "greenlet-3.0.3-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d73a9fe764d77f87f8ec26a0c85144d6a951a6c438dfe50487df5595c6373eac"},
- {file = "greenlet-3.0.3-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b7dcbe92cc99f08c8dd11f930de4d99ef756c3591a5377d1d9cd7dd5e896da71"},
- {file = "greenlet-3.0.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1551a8195c0d4a68fac7a4325efac0d541b48def35feb49d803674ac32582f61"},
- {file = "greenlet-3.0.3-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:64d7675ad83578e3fc149b617a444fab8efdafc9385471f868eb5ff83e446b8b"},
- {file = "greenlet-3.0.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b37eef18ea55f2ffd8f00ff8fe7c8d3818abd3e25fb73fae2ca3b672e333a7a6"},
- {file = "greenlet-3.0.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:77457465d89b8263bca14759d7c1684df840b6811b2499838cc5b040a8b5b113"},
- {file = "greenlet-3.0.3-cp39-cp39-win32.whl", hash = "sha256:57e8974f23e47dac22b83436bdcf23080ade568ce77df33159e019d161ce1d1e"},
- {file = "greenlet-3.0.3-cp39-cp39-win_amd64.whl", hash = "sha256:c5ee858cfe08f34712f548c3c363e807e7186f03ad7a5039ebadb29e8c6be067"},
- {file = "greenlet-3.0.3.tar.gz", hash = "sha256:43374442353259554ce33599da8b692d5aa96f8976d567d4badf263371fbe491"},
+ {file = "greenlet-3.1.1-cp310-cp310-macosx_11_0_universal2.whl", hash = "sha256:0bbae94a29c9e5c7e4a2b7f0aae5c17e8e90acbfd3bf6270eeba60c39fce3563"},
+ {file = "greenlet-3.1.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0fde093fb93f35ca72a556cf72c92ea3ebfda3d79fc35bb19fbe685853869a83"},
+ {file = "greenlet-3.1.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:36b89d13c49216cadb828db8dfa6ce86bbbc476a82d3a6c397f0efae0525bdd0"},
+ {file = "greenlet-3.1.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:94b6150a85e1b33b40b1464a3f9988dcc5251d6ed06842abff82e42632fac120"},
+ {file = "greenlet-3.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:93147c513fac16385d1036b7e5b102c7fbbdb163d556b791f0f11eada7ba65dc"},
+ {file = "greenlet-3.1.1-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:da7a9bff22ce038e19bf62c4dd1ec8391062878710ded0a845bcf47cc0200617"},
+ {file = "greenlet-3.1.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:b2795058c23988728eec1f36a4e5e4ebad22f8320c85f3587b539b9ac84128d7"},
+ {file = "greenlet-3.1.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:ed10eac5830befbdd0c32f83e8aa6288361597550ba669b04c48f0f9a2c843c6"},
+ {file = "greenlet-3.1.1-cp310-cp310-win_amd64.whl", hash = "sha256:77c386de38a60d1dfb8e55b8c1101d68c79dfdd25c7095d51fec2dd800892b80"},
+ {file = "greenlet-3.1.1-cp311-cp311-macosx_11_0_universal2.whl", hash = "sha256:e4d333e558953648ca09d64f13e6d8f0523fa705f51cae3f03b5983489958c70"},
+ {file = "greenlet-3.1.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:09fc016b73c94e98e29af67ab7b9a879c307c6731a2c9da0db5a7d9b7edd1159"},
+ {file = "greenlet-3.1.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d5e975ca70269d66d17dd995dafc06f1b06e8cb1ec1e9ed54c1d1e4a7c4cf26e"},
+ {file = "greenlet-3.1.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3b2813dc3de8c1ee3f924e4d4227999285fd335d1bcc0d2be6dc3f1f6a318ec1"},
+ {file = "greenlet-3.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e347b3bfcf985a05e8c0b7d462ba6f15b1ee1c909e2dcad795e49e91b152c383"},
+ {file = "greenlet-3.1.1-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9e8f8c9cb53cdac7ba9793c276acd90168f416b9ce36799b9b885790f8ad6c0a"},
+ {file = "greenlet-3.1.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:62ee94988d6b4722ce0028644418d93a52429e977d742ca2ccbe1c4f4a792511"},
+ {file = "greenlet-3.1.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:1776fd7f989fc6b8d8c8cb8da1f6b82c5814957264d1f6cf818d475ec2bf6395"},
+ {file = "greenlet-3.1.1-cp311-cp311-win_amd64.whl", hash = "sha256:48ca08c771c268a768087b408658e216133aecd835c0ded47ce955381105ba39"},
+ {file = "greenlet-3.1.1-cp312-cp312-macosx_11_0_universal2.whl", hash = "sha256:4afe7ea89de619adc868e087b4d2359282058479d7cfb94970adf4b55284574d"},
+ {file = "greenlet-3.1.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f406b22b7c9a9b4f8aa9d2ab13d6ae0ac3e85c9a809bd590ad53fed2bf70dc79"},
+ {file = "greenlet-3.1.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c3a701fe5a9695b238503ce5bbe8218e03c3bcccf7e204e455e7462d770268aa"},
+ {file = "greenlet-3.1.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2846930c65b47d70b9d178e89c7e1a69c95c1f68ea5aa0a58646b7a96df12441"},
+ {file = "greenlet-3.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:99cfaa2110534e2cf3ba31a7abcac9d328d1d9f1b95beede58294a60348fba36"},
+ {file = "greenlet-3.1.1-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1443279c19fca463fc33e65ef2a935a5b09bb90f978beab37729e1c3c6c25fe9"},
+ {file = "greenlet-3.1.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:b7cede291382a78f7bb5f04a529cb18e068dd29e0fb27376074b6d0317bf4dd0"},
+ {file = "greenlet-3.1.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:23f20bb60ae298d7d8656c6ec6db134bca379ecefadb0b19ce6f19d1f232a942"},
+ {file = "greenlet-3.1.1-cp312-cp312-win_amd64.whl", hash = "sha256:7124e16b4c55d417577c2077be379514321916d5790fa287c9ed6f23bd2ffd01"},
+ {file = "greenlet-3.1.1-cp313-cp313-macosx_11_0_universal2.whl", hash = "sha256:05175c27cb459dcfc05d026c4232f9de8913ed006d42713cb8a5137bd49375f1"},
+ {file = "greenlet-3.1.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:935e943ec47c4afab8965954bf49bfa639c05d4ccf9ef6e924188f762145c0ff"},
+ {file = "greenlet-3.1.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:667a9706c970cb552ede35aee17339a18e8f2a87a51fba2ed39ceeeb1004798a"},
+ {file = "greenlet-3.1.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b8a678974d1f3aa55f6cc34dc480169d58f2e6d8958895d68845fa4ab566509e"},
+ {file = "greenlet-3.1.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:efc0f674aa41b92da8c49e0346318c6075d734994c3c4e4430b1c3f853e498e4"},
+ {file = "greenlet-3.1.1-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0153404a4bb921f0ff1abeb5ce8a5131da56b953eda6e14b88dc6bbc04d2049e"},
+ {file = "greenlet-3.1.1-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:275f72decf9932639c1c6dd1013a1bc266438eb32710016a1c742df5da6e60a1"},
+ {file = "greenlet-3.1.1-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:c4aab7f6381f38a4b42f269057aee279ab0fc7bf2e929e3d4abfae97b682a12c"},
+ {file = "greenlet-3.1.1-cp313-cp313-win_amd64.whl", hash = "sha256:b42703b1cf69f2aa1df7d1030b9d77d3e584a70755674d60e710f0af570f3761"},
+ {file = "greenlet-3.1.1-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f1695e76146579f8c06c1509c7ce4dfe0706f49c6831a817ac04eebb2fd02011"},
+ {file = "greenlet-3.1.1-cp313-cp313t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7876452af029456b3f3549b696bb36a06db7c90747740c5302f74a9e9fa14b13"},
+ {file = "greenlet-3.1.1-cp313-cp313t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4ead44c85f8ab905852d3de8d86f6f8baf77109f9da589cb4fa142bd3b57b475"},
+ {file = "greenlet-3.1.1-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8320f64b777d00dd7ccdade271eaf0cad6636343293a25074cc5566160e4de7b"},
+ {file = "greenlet-3.1.1-cp313-cp313t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6510bf84a6b643dabba74d3049ead221257603a253d0a9873f55f6a59a65f822"},
+ {file = "greenlet-3.1.1-cp313-cp313t-musllinux_1_1_aarch64.whl", hash = "sha256:04b013dc07c96f83134b1e99888e7a79979f1a247e2a9f59697fa14b5862ed01"},
+ {file = "greenlet-3.1.1-cp313-cp313t-musllinux_1_1_x86_64.whl", hash = "sha256:411f015496fec93c1c8cd4e5238da364e1da7a124bcb293f085bf2860c32c6f6"},
+ {file = "greenlet-3.1.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:47da355d8687fd65240c364c90a31569a133b7b60de111c255ef5b606f2ae291"},
+ {file = "greenlet-3.1.1-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:98884ecf2ffb7d7fe6bd517e8eb99d31ff7855a840fa6d0d63cd07c037f6a981"},
+ {file = "greenlet-3.1.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f1d4aeb8891338e60d1ab6127af1fe45def5259def8094b9c7e34690c8858803"},
+ {file = "greenlet-3.1.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:db32b5348615a04b82240cc67983cb315309e88d444a288934ee6ceaebcad6cc"},
+ {file = "greenlet-3.1.1-cp37-cp37m-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:dcc62f31eae24de7f8dce72134c8651c58000d3b1868e01392baea7c32c247de"},
+ {file = "greenlet-3.1.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:1d3755bcb2e02de341c55b4fca7a745a24a9e7212ac953f6b3a48d117d7257aa"},
+ {file = "greenlet-3.1.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:b8da394b34370874b4572676f36acabac172602abf054cbc4ac910219f3340af"},
+ {file = "greenlet-3.1.1-cp37-cp37m-win32.whl", hash = "sha256:a0dfc6c143b519113354e780a50381508139b07d2177cb6ad6a08278ec655798"},
+ {file = "greenlet-3.1.1-cp37-cp37m-win_amd64.whl", hash = "sha256:54558ea205654b50c438029505def3834e80f0869a70fb15b871c29b4575ddef"},
+ {file = "greenlet-3.1.1-cp38-cp38-macosx_11_0_universal2.whl", hash = "sha256:346bed03fe47414091be4ad44786d1bd8bef0c3fcad6ed3dee074a032ab408a9"},
+ {file = "greenlet-3.1.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dfc59d69fc48664bc693842bd57acfdd490acafda1ab52c7836e3fc75c90a111"},
+ {file = "greenlet-3.1.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d21e10da6ec19b457b82636209cbe2331ff4306b54d06fa04b7c138ba18c8a81"},
+ {file = "greenlet-3.1.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:37b9de5a96111fc15418819ab4c4432e4f3c2ede61e660b1e33971eba26ef9ba"},
+ {file = "greenlet-3.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6ef9ea3f137e5711f0dbe5f9263e8c009b7069d8a1acea822bd5e9dae0ae49c8"},
+ {file = "greenlet-3.1.1-cp38-cp38-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:85f3ff71e2e60bd4b4932a043fbbe0f499e263c628390b285cb599154a3b03b1"},
+ {file = "greenlet-3.1.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:95ffcf719966dd7c453f908e208e14cde192e09fde6c7186c8f1896ef778d8cd"},
+ {file = "greenlet-3.1.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:03a088b9de532cbfe2ba2034b2b85e82df37874681e8c470d6fb2f8c04d7e4b7"},
+ {file = "greenlet-3.1.1-cp38-cp38-win32.whl", hash = "sha256:8b8b36671f10ba80e159378df9c4f15c14098c4fd73a36b9ad715f057272fbef"},
+ {file = "greenlet-3.1.1-cp38-cp38-win_amd64.whl", hash = "sha256:7017b2be767b9d43cc31416aba48aab0d2309ee31b4dbf10a1d38fb7972bdf9d"},
+ {file = "greenlet-3.1.1-cp39-cp39-macosx_11_0_universal2.whl", hash = "sha256:396979749bd95f018296af156201d6211240e7a23090f50a8d5d18c370084dc3"},
+ {file = "greenlet-3.1.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ca9d0ff5ad43e785350894d97e13633a66e2b50000e8a183a50a88d834752d42"},
+ {file = "greenlet-3.1.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f6ff3b14f2df4c41660a7dec01045a045653998784bf8cfcb5a525bdffffbc8f"},
+ {file = "greenlet-3.1.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:94ebba31df2aa506d7b14866fed00ac141a867e63143fe5bca82a8e503b36437"},
+ {file = "greenlet-3.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:73aaad12ac0ff500f62cebed98d8789198ea0e6f233421059fa68a5aa7220145"},
+ {file = "greenlet-3.1.1-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:63e4844797b975b9af3a3fb8f7866ff08775f5426925e1e0bbcfe7932059a12c"},
+ {file = "greenlet-3.1.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:7939aa3ca7d2a1593596e7ac6d59391ff30281ef280d8632fa03d81f7c5f955e"},
+ {file = "greenlet-3.1.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:d0028e725ee18175c6e422797c407874da24381ce0690d6b9396c204c7f7276e"},
+ {file = "greenlet-3.1.1-cp39-cp39-win32.whl", hash = "sha256:5e06afd14cbaf9e00899fae69b24a32f2196c19de08fcb9f4779dd4f004e5e7c"},
+ {file = "greenlet-3.1.1-cp39-cp39-win_amd64.whl", hash = "sha256:3319aa75e0e0639bc15ff54ca327e8dc7a6fe404003496e3c6925cd3142e0e22"},
+ {file = "greenlet-3.1.1.tar.gz", hash = "sha256:4ce3ac6cdb6adf7946475d7ef31777c26d94bccc377e070a7986bd2d5c515467"},
]
[package.extras]
@@ -993,71 +1013,72 @@ testing = ["coverage", "pytest", "pytest-cov", "pytest-regressions"]
[[package]]
name = "markupsafe"
-version = "2.1.5"
+version = "3.0.2"
description = "Safely add untrusted strings to HTML/XML markup."
optional = false
-python-versions = ">=3.7"
+python-versions = ">=3.9"
files = [
- {file = "MarkupSafe-2.1.5-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:a17a92de5231666cfbe003f0e4b9b3a7ae3afb1ec2845aadc2bacc93ff85febc"},
- {file = "MarkupSafe-2.1.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:72b6be590cc35924b02c78ef34b467da4ba07e4e0f0454a2c5907f473fc50ce5"},
- {file = "MarkupSafe-2.1.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e61659ba32cf2cf1481e575d0462554625196a1f2fc06a1c777d3f48e8865d46"},
- {file = "MarkupSafe-2.1.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2174c595a0d73a3080ca3257b40096db99799265e1c27cc5a610743acd86d62f"},
- {file = "MarkupSafe-2.1.5-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ae2ad8ae6ebee9d2d94b17fb62763125f3f374c25618198f40cbb8b525411900"},
- {file = "MarkupSafe-2.1.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:075202fa5b72c86ad32dc7d0b56024ebdbcf2048c0ba09f1cde31bfdd57bcfff"},
- {file = "MarkupSafe-2.1.5-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:598e3276b64aff0e7b3451b72e94fa3c238d452e7ddcd893c3ab324717456bad"},
- {file = "MarkupSafe-2.1.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:fce659a462a1be54d2ffcacea5e3ba2d74daa74f30f5f143fe0c58636e355fdd"},
- {file = "MarkupSafe-2.1.5-cp310-cp310-win32.whl", hash = "sha256:d9fad5155d72433c921b782e58892377c44bd6252b5af2f67f16b194987338a4"},
- {file = "MarkupSafe-2.1.5-cp310-cp310-win_amd64.whl", hash = "sha256:bf50cd79a75d181c9181df03572cdce0fbb75cc353bc350712073108cba98de5"},
- {file = "MarkupSafe-2.1.5-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:629ddd2ca402ae6dbedfceeba9c46d5f7b2a61d9749597d4307f943ef198fc1f"},
- {file = "MarkupSafe-2.1.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:5b7b716f97b52c5a14bffdf688f971b2d5ef4029127f1ad7a513973cfd818df2"},
- {file = "MarkupSafe-2.1.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6ec585f69cec0aa07d945b20805be741395e28ac1627333b1c5b0105962ffced"},
- {file = "MarkupSafe-2.1.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b91c037585eba9095565a3556f611e3cbfaa42ca1e865f7b8015fe5c7336d5a5"},
- {file = "MarkupSafe-2.1.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7502934a33b54030eaf1194c21c692a534196063db72176b0c4028e140f8f32c"},
- {file = "MarkupSafe-2.1.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:0e397ac966fdf721b2c528cf028494e86172b4feba51d65f81ffd65c63798f3f"},
- {file = "MarkupSafe-2.1.5-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:c061bb86a71b42465156a3ee7bd58c8c2ceacdbeb95d05a99893e08b8467359a"},
- {file = "MarkupSafe-2.1.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:3a57fdd7ce31c7ff06cdfbf31dafa96cc533c21e443d57f5b1ecc6cdc668ec7f"},
- {file = "MarkupSafe-2.1.5-cp311-cp311-win32.whl", hash = "sha256:397081c1a0bfb5124355710fe79478cdbeb39626492b15d399526ae53422b906"},
- {file = "MarkupSafe-2.1.5-cp311-cp311-win_amd64.whl", hash = "sha256:2b7c57a4dfc4f16f7142221afe5ba4e093e09e728ca65c51f5620c9aaeb9a617"},
- {file = "MarkupSafe-2.1.5-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:8dec4936e9c3100156f8a2dc89c4b88d5c435175ff03413b443469c7c8c5f4d1"},
- {file = "MarkupSafe-2.1.5-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:3c6b973f22eb18a789b1460b4b91bf04ae3f0c4234a0a6aa6b0a92f6f7b951d4"},
- {file = "MarkupSafe-2.1.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ac07bad82163452a6884fe8fa0963fb98c2346ba78d779ec06bd7a6262132aee"},
- {file = "MarkupSafe-2.1.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f5dfb42c4604dddc8e4305050aa6deb084540643ed5804d7455b5df8fe16f5e5"},
- {file = "MarkupSafe-2.1.5-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ea3d8a3d18833cf4304cd2fc9cbb1efe188ca9b5efef2bdac7adc20594a0e46b"},
- {file = "MarkupSafe-2.1.5-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:d050b3361367a06d752db6ead6e7edeb0009be66bc3bae0ee9d97fb326badc2a"},
- {file = "MarkupSafe-2.1.5-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:bec0a414d016ac1a18862a519e54b2fd0fc8bbfd6890376898a6c0891dd82e9f"},
- {file = "MarkupSafe-2.1.5-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:58c98fee265677f63a4385256a6d7683ab1832f3ddd1e66fe948d5880c21a169"},
- {file = "MarkupSafe-2.1.5-cp312-cp312-win32.whl", hash = "sha256:8590b4ae07a35970728874632fed7bd57b26b0102df2d2b233b6d9d82f6c62ad"},
- {file = "MarkupSafe-2.1.5-cp312-cp312-win_amd64.whl", hash = "sha256:823b65d8706e32ad2df51ed89496147a42a2a6e01c13cfb6ffb8b1e92bc910bb"},
- {file = "MarkupSafe-2.1.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:c8b29db45f8fe46ad280a7294f5c3ec36dbac9491f2d1c17345be8e69cc5928f"},
- {file = "MarkupSafe-2.1.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ec6a563cff360b50eed26f13adc43e61bc0c04d94b8be985e6fb24b81f6dcfdf"},
- {file = "MarkupSafe-2.1.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a549b9c31bec33820e885335b451286e2969a2d9e24879f83fe904a5ce59d70a"},
- {file = "MarkupSafe-2.1.5-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4f11aa001c540f62c6166c7726f71f7573b52c68c31f014c25cc7901deea0b52"},
- {file = "MarkupSafe-2.1.5-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:7b2e5a267c855eea6b4283940daa6e88a285f5f2a67f2220203786dfa59b37e9"},
- {file = "MarkupSafe-2.1.5-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:2d2d793e36e230fd32babe143b04cec8a8b3eb8a3122d2aceb4a371e6b09b8df"},
- {file = "MarkupSafe-2.1.5-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:ce409136744f6521e39fd8e2a24c53fa18ad67aa5bc7c2cf83645cce5b5c4e50"},
- {file = "MarkupSafe-2.1.5-cp37-cp37m-win32.whl", hash = "sha256:4096e9de5c6fdf43fb4f04c26fb114f61ef0bf2e5604b6ee3019d51b69e8c371"},
- {file = "MarkupSafe-2.1.5-cp37-cp37m-win_amd64.whl", hash = "sha256:4275d846e41ecefa46e2015117a9f491e57a71ddd59bbead77e904dc02b1bed2"},
- {file = "MarkupSafe-2.1.5-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:656f7526c69fac7f600bd1f400991cc282b417d17539a1b228617081106feb4a"},
- {file = "MarkupSafe-2.1.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:97cafb1f3cbcd3fd2b6fbfb99ae11cdb14deea0736fc2b0952ee177f2b813a46"},
- {file = "MarkupSafe-2.1.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1f3fbcb7ef1f16e48246f704ab79d79da8a46891e2da03f8783a5b6fa41a9532"},
- {file = "MarkupSafe-2.1.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fa9db3f79de01457b03d4f01b34cf91bc0048eb2c3846ff26f66687c2f6d16ab"},
- {file = "MarkupSafe-2.1.5-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ffee1f21e5ef0d712f9033568f8344d5da8cc2869dbd08d87c84656e6a2d2f68"},
- {file = "MarkupSafe-2.1.5-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:5dedb4db619ba5a2787a94d877bc8ffc0566f92a01c0ef214865e54ecc9ee5e0"},
- {file = "MarkupSafe-2.1.5-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:30b600cf0a7ac9234b2638fbc0fb6158ba5bdcdf46aeb631ead21248b9affbc4"},
- {file = "MarkupSafe-2.1.5-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:8dd717634f5a044f860435c1d8c16a270ddf0ef8588d4887037c5028b859b0c3"},
- {file = "MarkupSafe-2.1.5-cp38-cp38-win32.whl", hash = "sha256:daa4ee5a243f0f20d528d939d06670a298dd39b1ad5f8a72a4275124a7819eff"},
- {file = "MarkupSafe-2.1.5-cp38-cp38-win_amd64.whl", hash = "sha256:619bc166c4f2de5caa5a633b8b7326fbe98e0ccbfacabd87268a2b15ff73a029"},
- {file = "MarkupSafe-2.1.5-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:7a68b554d356a91cce1236aa7682dc01df0edba8d043fd1ce607c49dd3c1edcf"},
- {file = "MarkupSafe-2.1.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:db0b55e0f3cc0be60c1f19efdde9a637c32740486004f20d1cff53c3c0ece4d2"},
- {file = "MarkupSafe-2.1.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3e53af139f8579a6d5f7b76549125f0d94d7e630761a2111bc431fd820e163b8"},
- {file = "MarkupSafe-2.1.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:17b950fccb810b3293638215058e432159d2b71005c74371d784862b7e4683f3"},
- {file = "MarkupSafe-2.1.5-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4c31f53cdae6ecfa91a77820e8b151dba54ab528ba65dfd235c80b086d68a465"},
- {file = "MarkupSafe-2.1.5-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:bff1b4290a66b490a2f4719358c0cdcd9bafb6b8f061e45c7a2460866bf50c2e"},
- {file = "MarkupSafe-2.1.5-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:bc1667f8b83f48511b94671e0e441401371dfd0f0a795c7daa4a3cd1dde55bea"},
- {file = "MarkupSafe-2.1.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5049256f536511ee3f7e1b3f87d1d1209d327e818e6ae1365e8653d7e3abb6a6"},
- {file = "MarkupSafe-2.1.5-cp39-cp39-win32.whl", hash = "sha256:00e046b6dd71aa03a41079792f8473dc494d564611a8f89bbbd7cb93295ebdcf"},
- {file = "MarkupSafe-2.1.5-cp39-cp39-win_amd64.whl", hash = "sha256:fa173ec60341d6bb97a89f5ea19c85c5643c1e7dedebc22f5181eb73573142c5"},
- {file = "MarkupSafe-2.1.5.tar.gz", hash = "sha256:d283d37a890ba4c1ae73ffadf8046435c76e7bc2247bbb63c00bd1a709c6544b"},
+ {file = "MarkupSafe-3.0.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:7e94c425039cde14257288fd61dcfb01963e658efbc0ff54f5306b06054700f8"},
+ {file = "MarkupSafe-3.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9e2d922824181480953426608b81967de705c3cef4d1af983af849d7bd619158"},
+ {file = "MarkupSafe-3.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:38a9ef736c01fccdd6600705b09dc574584b89bea478200c5fbf112a6b0d5579"},
+ {file = "MarkupSafe-3.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bbcb445fa71794da8f178f0f6d66789a28d7319071af7a496d4d507ed566270d"},
+ {file = "MarkupSafe-3.0.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:57cb5a3cf367aeb1d316576250f65edec5bb3be939e9247ae594b4bcbc317dfb"},
+ {file = "MarkupSafe-3.0.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:3809ede931876f5b2ec92eef964286840ed3540dadf803dd570c3b7e13141a3b"},
+ {file = "MarkupSafe-3.0.2-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:e07c3764494e3776c602c1e78e298937c3315ccc9043ead7e685b7f2b8d47b3c"},
+ {file = "MarkupSafe-3.0.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:b424c77b206d63d500bcb69fa55ed8d0e6a3774056bdc4839fc9298a7edca171"},
+ {file = "MarkupSafe-3.0.2-cp310-cp310-win32.whl", hash = "sha256:fcabf5ff6eea076f859677f5f0b6b5c1a51e70a376b0579e0eadef8db48c6b50"},
+ {file = "MarkupSafe-3.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:6af100e168aa82a50e186c82875a5893c5597a0c1ccdb0d8b40240b1f28b969a"},
+ {file = "MarkupSafe-3.0.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:9025b4018f3a1314059769c7bf15441064b2207cb3f065e6ea1e7359cb46db9d"},
+ {file = "MarkupSafe-3.0.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:93335ca3812df2f366e80509ae119189886b0f3c2b81325d39efdb84a1e2ae93"},
+ {file = "MarkupSafe-3.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2cb8438c3cbb25e220c2ab33bb226559e7afb3baec11c4f218ffa7308603c832"},
+ {file = "MarkupSafe-3.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a123e330ef0853c6e822384873bef7507557d8e4a082961e1defa947aa59ba84"},
+ {file = "MarkupSafe-3.0.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1e084f686b92e5b83186b07e8a17fc09e38fff551f3602b249881fec658d3eca"},
+ {file = "MarkupSafe-3.0.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d8213e09c917a951de9d09ecee036d5c7d36cb6cb7dbaece4c71a60d79fb9798"},
+ {file = "MarkupSafe-3.0.2-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:5b02fb34468b6aaa40dfc198d813a641e3a63b98c2b05a16b9f80b7ec314185e"},
+ {file = "MarkupSafe-3.0.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:0bff5e0ae4ef2e1ae4fdf2dfd5b76c75e5c2fa4132d05fc1b0dabcd20c7e28c4"},
+ {file = "MarkupSafe-3.0.2-cp311-cp311-win32.whl", hash = "sha256:6c89876f41da747c8d3677a2b540fb32ef5715f97b66eeb0c6b66f5e3ef6f59d"},
+ {file = "MarkupSafe-3.0.2-cp311-cp311-win_amd64.whl", hash = "sha256:70a87b411535ccad5ef2f1df5136506a10775d267e197e4cf531ced10537bd6b"},
+ {file = "MarkupSafe-3.0.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:9778bd8ab0a994ebf6f84c2b949e65736d5575320a17ae8984a77fab08db94cf"},
+ {file = "MarkupSafe-3.0.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:846ade7b71e3536c4e56b386c2a47adf5741d2d8b94ec9dc3e92e5e1ee1e2225"},
+ {file = "MarkupSafe-3.0.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1c99d261bd2d5f6b59325c92c73df481e05e57f19837bdca8413b9eac4bd8028"},
+ {file = "MarkupSafe-3.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e17c96c14e19278594aa4841ec148115f9c7615a47382ecb6b82bd8fea3ab0c8"},
+ {file = "MarkupSafe-3.0.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:88416bd1e65dcea10bc7569faacb2c20ce071dd1f87539ca2ab364bf6231393c"},
+ {file = "MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:2181e67807fc2fa785d0592dc2d6206c019b9502410671cc905d132a92866557"},
+ {file = "MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:52305740fe773d09cffb16f8ed0427942901f00adedac82ec8b67752f58a1b22"},
+ {file = "MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ad10d3ded218f1039f11a75f8091880239651b52e9bb592ca27de44eed242a48"},
+ {file = "MarkupSafe-3.0.2-cp312-cp312-win32.whl", hash = "sha256:0f4ca02bea9a23221c0182836703cbf8930c5e9454bacce27e767509fa286a30"},
+ {file = "MarkupSafe-3.0.2-cp312-cp312-win_amd64.whl", hash = "sha256:8e06879fc22a25ca47312fbe7c8264eb0b662f6db27cb2d3bbbc74b1df4b9b87"},
+ {file = "MarkupSafe-3.0.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:ba9527cdd4c926ed0760bc301f6728ef34d841f405abf9d4f959c478421e4efd"},
+ {file = "MarkupSafe-3.0.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:f8b3d067f2e40fe93e1ccdd6b2e1d16c43140e76f02fb1319a05cf2b79d99430"},
+ {file = "MarkupSafe-3.0.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:569511d3b58c8791ab4c2e1285575265991e6d8f8700c7be0e88f86cb0672094"},
+ {file = "MarkupSafe-3.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:15ab75ef81add55874e7ab7055e9c397312385bd9ced94920f2802310c930396"},
+ {file = "MarkupSafe-3.0.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f3818cb119498c0678015754eba762e0d61e5b52d34c8b13d770f0719f7b1d79"},
+ {file = "MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:cdb82a876c47801bb54a690c5ae105a46b392ac6099881cdfb9f6e95e4014c6a"},
+ {file = "MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:cabc348d87e913db6ab4aa100f01b08f481097838bdddf7c7a84b7575b7309ca"},
+ {file = "MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:444dcda765c8a838eaae23112db52f1efaf750daddb2d9ca300bcae1039adc5c"},
+ {file = "MarkupSafe-3.0.2-cp313-cp313-win32.whl", hash = "sha256:bcf3e58998965654fdaff38e58584d8937aa3096ab5354d493c77d1fdd66d7a1"},
+ {file = "MarkupSafe-3.0.2-cp313-cp313-win_amd64.whl", hash = "sha256:e6a2a455bd412959b57a172ce6328d2dd1f01cb2135efda2e4576e8a23fa3b0f"},
+ {file = "MarkupSafe-3.0.2-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:b5a6b3ada725cea8a5e634536b1b01c30bcdcd7f9c6fff4151548d5bf6b3a36c"},
+ {file = "MarkupSafe-3.0.2-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:a904af0a6162c73e3edcb969eeeb53a63ceeb5d8cf642fade7d39e7963a22ddb"},
+ {file = "MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4aa4e5faecf353ed117801a068ebab7b7e09ffb6e1d5e412dc852e0da018126c"},
+ {file = "MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c0ef13eaeee5b615fb07c9a7dadb38eac06a0608b41570d8ade51c56539e509d"},
+ {file = "MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d16a81a06776313e817c951135cf7340a3e91e8c1ff2fac444cfd75fffa04afe"},
+ {file = "MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:6381026f158fdb7c72a168278597a5e3a5222e83ea18f543112b2662a9b699c5"},
+ {file = "MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:3d79d162e7be8f996986c064d1c7c817f6df3a77fe3d6859f6f9e7be4b8c213a"},
+ {file = "MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:131a3c7689c85f5ad20f9f6fb1b866f402c445b220c19fe4308c0b147ccd2ad9"},
+ {file = "MarkupSafe-3.0.2-cp313-cp313t-win32.whl", hash = "sha256:ba8062ed2cf21c07a9e295d5b8a2a5ce678b913b45fdf68c32d95d6c1291e0b6"},
+ {file = "MarkupSafe-3.0.2-cp313-cp313t-win_amd64.whl", hash = "sha256:e444a31f8db13eb18ada366ab3cf45fd4b31e4db1236a4448f68778c1d1a5a2f"},
+ {file = "MarkupSafe-3.0.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:eaa0a10b7f72326f1372a713e73c3f739b524b3af41feb43e4921cb529f5929a"},
+ {file = "MarkupSafe-3.0.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:48032821bbdf20f5799ff537c7ac3d1fba0ba032cfc06194faffa8cda8b560ff"},
+ {file = "MarkupSafe-3.0.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1a9d3f5f0901fdec14d8d2f66ef7d035f2157240a433441719ac9a3fba440b13"},
+ {file = "MarkupSafe-3.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:88b49a3b9ff31e19998750c38e030fc7bb937398b1f78cfa599aaef92d693144"},
+ {file = "MarkupSafe-3.0.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cfad01eed2c2e0c01fd0ecd2ef42c492f7f93902e39a42fc9ee1692961443a29"},
+ {file = "MarkupSafe-3.0.2-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:1225beacc926f536dc82e45f8a4d68502949dc67eea90eab715dea3a21c1b5f0"},
+ {file = "MarkupSafe-3.0.2-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:3169b1eefae027567d1ce6ee7cae382c57fe26e82775f460f0b2778beaad66c0"},
+ {file = "MarkupSafe-3.0.2-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:eb7972a85c54febfb25b5c4b4f3af4dcc731994c7da0d8a0b4a6eb0640e1d178"},
+ {file = "MarkupSafe-3.0.2-cp39-cp39-win32.whl", hash = "sha256:8c4e8c3ce11e1f92f6536ff07154f9d49677ebaaafc32db9db4620bc11ed480f"},
+ {file = "MarkupSafe-3.0.2-cp39-cp39-win_amd64.whl", hash = "sha256:6e296a513ca3d94054c2c881cc913116e90fd030ad1c656b3869762b754f5f8a"},
+ {file = "markupsafe-3.0.2.tar.gz", hash = "sha256:ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0"},
]
[[package]]
@@ -1174,64 +1195,64 @@ files = [
[[package]]
name = "numpy"
-version = "2.1.1"
+version = "2.1.2"
description = "Fundamental package for array computing in Python"
optional = false
python-versions = ">=3.10"
files = [
- {file = "numpy-2.1.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:c8a0e34993b510fc19b9a2ce7f31cb8e94ecf6e924a40c0c9dd4f62d0aac47d9"},
- {file = "numpy-2.1.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:7dd86dfaf7c900c0bbdcb8b16e2f6ddf1eb1fe39c6c8cca6e94844ed3152a8fd"},
- {file = "numpy-2.1.1-cp310-cp310-macosx_14_0_arm64.whl", hash = "sha256:5889dd24f03ca5a5b1e8a90a33b5a0846d8977565e4ae003a63d22ecddf6782f"},
- {file = "numpy-2.1.1-cp310-cp310-macosx_14_0_x86_64.whl", hash = "sha256:59ca673ad11d4b84ceb385290ed0ebe60266e356641428c845b39cd9df6713ab"},
- {file = "numpy-2.1.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:13ce49a34c44b6de5241f0b38b07e44c1b2dcacd9e36c30f9c2fcb1bb5135db7"},
- {file = "numpy-2.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:913cc1d311060b1d409e609947fa1b9753701dac96e6581b58afc36b7ee35af6"},
- {file = "numpy-2.1.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:caf5d284ddea7462c32b8d4a6b8af030b6c9fd5332afb70e7414d7fdded4bfd0"},
- {file = "numpy-2.1.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:57eb525e7c2a8fdee02d731f647146ff54ea8c973364f3b850069ffb42799647"},
- {file = "numpy-2.1.1-cp310-cp310-win32.whl", hash = "sha256:9a8e06c7a980869ea67bbf551283bbed2856915f0a792dc32dd0f9dd2fb56728"},
- {file = "numpy-2.1.1-cp310-cp310-win_amd64.whl", hash = "sha256:d10c39947a2d351d6d466b4ae83dad4c37cd6c3cdd6d5d0fa797da56f710a6ae"},
- {file = "numpy-2.1.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:0d07841fd284718feffe7dd17a63a2e6c78679b2d386d3e82f44f0108c905550"},
- {file = "numpy-2.1.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:b5613cfeb1adfe791e8e681128f5f49f22f3fcaa942255a6124d58ca59d9528f"},
- {file = "numpy-2.1.1-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:0b8cc2715a84b7c3b161f9ebbd942740aaed913584cae9cdc7f8ad5ad41943d0"},
- {file = "numpy-2.1.1-cp311-cp311-macosx_14_0_x86_64.whl", hash = "sha256:b49742cdb85f1f81e4dc1b39dcf328244f4d8d1ded95dea725b316bd2cf18c95"},
- {file = "numpy-2.1.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e8d5f8a8e3bc87334f025194c6193e408903d21ebaeb10952264943a985066ca"},
- {file = "numpy-2.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d51fc141ddbe3f919e91a096ec739f49d686df8af254b2053ba21a910ae518bf"},
- {file = "numpy-2.1.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:98ce7fb5b8063cfdd86596b9c762bf2b5e35a2cdd7e967494ab78a1fa7f8b86e"},
- {file = "numpy-2.1.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:24c2ad697bd8593887b019817ddd9974a7f429c14a5469d7fad413f28340a6d2"},
- {file = "numpy-2.1.1-cp311-cp311-win32.whl", hash = "sha256:397bc5ce62d3fb73f304bec332171535c187e0643e176a6e9421a6e3eacef06d"},
- {file = "numpy-2.1.1-cp311-cp311-win_amd64.whl", hash = "sha256:ae8ce252404cdd4de56dcfce8b11eac3c594a9c16c231d081fb705cf23bd4d9e"},
- {file = "numpy-2.1.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:7c803b7934a7f59563db459292e6aa078bb38b7ab1446ca38dd138646a38203e"},
- {file = "numpy-2.1.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6435c48250c12f001920f0751fe50c0348f5f240852cfddc5e2f97e007544cbe"},
- {file = "numpy-2.1.1-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:3269c9eb8745e8d975980b3a7411a98976824e1fdef11f0aacf76147f662b15f"},
- {file = "numpy-2.1.1-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:fac6e277a41163d27dfab5f4ec1f7a83fac94e170665a4a50191b545721c6521"},
- {file = "numpy-2.1.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fcd8f556cdc8cfe35e70efb92463082b7f43dd7e547eb071ffc36abc0ca4699b"},
- {file = "numpy-2.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d2b9cd92c8f8e7b313b80e93cedc12c0112088541dcedd9197b5dee3738c1201"},
- {file = "numpy-2.1.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:afd9c680df4de71cd58582b51e88a61feed4abcc7530bcd3d48483f20fc76f2a"},
- {file = "numpy-2.1.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:8661c94e3aad18e1ea17a11f60f843a4933ccaf1a25a7c6a9182af70610b2313"},
- {file = "numpy-2.1.1-cp312-cp312-win32.whl", hash = "sha256:950802d17a33c07cba7fd7c3dcfa7d64705509206be1606f196d179e539111ed"},
- {file = "numpy-2.1.1-cp312-cp312-win_amd64.whl", hash = "sha256:3fc5eabfc720db95d68e6646e88f8b399bfedd235994016351b1d9e062c4b270"},
- {file = "numpy-2.1.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:046356b19d7ad1890c751b99acad5e82dc4a02232013bd9a9a712fddf8eb60f5"},
- {file = "numpy-2.1.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:6e5a9cb2be39350ae6c8f79410744e80154df658d5bea06e06e0ac5bb75480d5"},
- {file = "numpy-2.1.1-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:d4c57b68c8ef5e1ebf47238e99bf27657511ec3f071c465f6b1bccbef12d4136"},
- {file = "numpy-2.1.1-cp313-cp313-macosx_14_0_x86_64.whl", hash = "sha256:8ae0fd135e0b157365ac7cc31fff27f07a5572bdfc38f9c2d43b2aff416cc8b0"},
- {file = "numpy-2.1.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:981707f6b31b59c0c24bcda52e5605f9701cb46da4b86c2e8023656ad3e833cb"},
- {file = "numpy-2.1.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2ca4b53e1e0b279142113b8c5eb7d7a877e967c306edc34f3b58e9be12fda8df"},
- {file = "numpy-2.1.1-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:e097507396c0be4e547ff15b13dc3866f45f3680f789c1a1301b07dadd3fbc78"},
- {file = "numpy-2.1.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:f7506387e191fe8cdb267f912469a3cccc538ab108471291636a96a54e599556"},
- {file = "numpy-2.1.1-cp313-cp313-win32.whl", hash = "sha256:251105b7c42abe40e3a689881e1793370cc9724ad50d64b30b358bbb3a97553b"},
- {file = "numpy-2.1.1-cp313-cp313-win_amd64.whl", hash = "sha256:f212d4f46b67ff604d11fff7cc62d36b3e8714edf68e44e9760e19be38c03eb0"},
- {file = "numpy-2.1.1-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:920b0911bb2e4414c50e55bd658baeb78281a47feeb064ab40c2b66ecba85553"},
- {file = "numpy-2.1.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:bab7c09454460a487e631ffc0c42057e3d8f2a9ddccd1e60c7bb8ed774992480"},
- {file = "numpy-2.1.1-cp313-cp313t-macosx_14_0_arm64.whl", hash = "sha256:cea427d1350f3fd0d2818ce7350095c1a2ee33e30961d2f0fef48576ddbbe90f"},
- {file = "numpy-2.1.1-cp313-cp313t-macosx_14_0_x86_64.whl", hash = "sha256:e30356d530528a42eeba51420ae8bf6c6c09559051887196599d96ee5f536468"},
- {file = "numpy-2.1.1-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e8dfa9e94fc127c40979c3eacbae1e61fda4fe71d84869cc129e2721973231ef"},
- {file = "numpy-2.1.1-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:910b47a6d0635ec1bd53b88f86120a52bf56dcc27b51f18c7b4a2e2224c29f0f"},
- {file = "numpy-2.1.1-cp313-cp313t-musllinux_1_1_x86_64.whl", hash = "sha256:13cc11c00000848702322af4de0147ced365c81d66053a67c2e962a485b3717c"},
- {file = "numpy-2.1.1-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:53e27293b3a2b661c03f79aa51c3987492bd4641ef933e366e0f9f6c9bf257ec"},
- {file = "numpy-2.1.1-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:7be6a07520b88214ea85d8ac8b7d6d8a1839b0b5cb87412ac9f49fa934eb15d5"},
- {file = "numpy-2.1.1-pp310-pypy310_pp73-macosx_14_0_x86_64.whl", hash = "sha256:52ac2e48f5ad847cd43c4755520a2317f3380213493b9d8a4c5e37f3b87df504"},
- {file = "numpy-2.1.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:50a95ca3560a6058d6ea91d4629a83a897ee27c00630aed9d933dff191f170cd"},
- {file = "numpy-2.1.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:99f4a9ee60eed1385a86e82288971a51e71df052ed0b2900ed30bc840c0f2e39"},
- {file = "numpy-2.1.1.tar.gz", hash = "sha256:d0cf7d55b1051387807405b3898efafa862997b4cba8aa5dbe657be794afeafd"},
+ {file = "numpy-2.1.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:30d53720b726ec36a7f88dc873f0eec8447fbc93d93a8f079dfac2629598d6ee"},
+ {file = "numpy-2.1.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e8d3ca0a72dd8846eb6f7dfe8f19088060fcb76931ed592d29128e0219652884"},
+ {file = "numpy-2.1.2-cp310-cp310-macosx_14_0_arm64.whl", hash = "sha256:fc44e3c68ff00fd991b59092a54350e6e4911152682b4782f68070985aa9e648"},
+ {file = "numpy-2.1.2-cp310-cp310-macosx_14_0_x86_64.whl", hash = "sha256:7c1c60328bd964b53f8b835df69ae8198659e2b9302ff9ebb7de4e5a5994db3d"},
+ {file = "numpy-2.1.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6cdb606a7478f9ad91c6283e238544451e3a95f30fb5467fbf715964341a8a86"},
+ {file = "numpy-2.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d666cb72687559689e9906197e3bec7b736764df6a2e58ee265e360663e9baf7"},
+ {file = "numpy-2.1.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:c6eef7a2dbd0abfb0d9eaf78b73017dbfd0b54051102ff4e6a7b2980d5ac1a03"},
+ {file = "numpy-2.1.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:12edb90831ff481f7ef5f6bc6431a9d74dc0e5ff401559a71e5e4611d4f2d466"},
+ {file = "numpy-2.1.2-cp310-cp310-win32.whl", hash = "sha256:a65acfdb9c6ebb8368490dbafe83c03c7e277b37e6857f0caeadbbc56e12f4fb"},
+ {file = "numpy-2.1.2-cp310-cp310-win_amd64.whl", hash = "sha256:860ec6e63e2c5c2ee5e9121808145c7bf86c96cca9ad396c0bd3e0f2798ccbe2"},
+ {file = "numpy-2.1.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b42a1a511c81cc78cbc4539675713bbcf9d9c3913386243ceff0e9429ca892fe"},
+ {file = "numpy-2.1.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:faa88bc527d0f097abdc2c663cddf37c05a1c2f113716601555249805cf573f1"},
+ {file = "numpy-2.1.2-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:c82af4b2ddd2ee72d1fc0c6695048d457e00b3582ccde72d8a1c991b808bb20f"},
+ {file = "numpy-2.1.2-cp311-cp311-macosx_14_0_x86_64.whl", hash = "sha256:13602b3174432a35b16c4cfb5de9a12d229727c3dd47a6ce35111f2ebdf66ff4"},
+ {file = "numpy-2.1.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1ebec5fd716c5a5b3d8dfcc439be82a8407b7b24b230d0ad28a81b61c2f4659a"},
+ {file = "numpy-2.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e2b49c3c0804e8ecb05d59af8386ec2f74877f7ca8fd9c1e00be2672e4d399b1"},
+ {file = "numpy-2.1.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:2cbba4b30bf31ddbe97f1c7205ef976909a93a66bb1583e983adbd155ba72ac2"},
+ {file = "numpy-2.1.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:8e00ea6fc82e8a804433d3e9cedaa1051a1422cb6e443011590c14d2dea59146"},
+ {file = "numpy-2.1.2-cp311-cp311-win32.whl", hash = "sha256:5006b13a06e0b38d561fab5ccc37581f23c9511879be7693bd33c7cd15ca227c"},
+ {file = "numpy-2.1.2-cp311-cp311-win_amd64.whl", hash = "sha256:f1eb068ead09f4994dec71c24b2844f1e4e4e013b9629f812f292f04bd1510d9"},
+ {file = "numpy-2.1.2-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:d7bf0a4f9f15b32b5ba53147369e94296f5fffb783db5aacc1be15b4bf72f43b"},
+ {file = "numpy-2.1.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:b1d0fcae4f0949f215d4632be684a539859b295e2d0cb14f78ec231915d644db"},
+ {file = "numpy-2.1.2-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:f751ed0a2f250541e19dfca9f1eafa31a392c71c832b6bb9e113b10d050cb0f1"},
+ {file = "numpy-2.1.2-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:bd33f82e95ba7ad632bc57837ee99dba3d7e006536200c4e9124089e1bf42426"},
+ {file = "numpy-2.1.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1b8cde4f11f0a975d1fd59373b32e2f5a562ade7cde4f85b7137f3de8fbb29a0"},
+ {file = "numpy-2.1.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6d95f286b8244b3649b477ac066c6906fbb2905f8ac19b170e2175d3d799f4df"},
+ {file = "numpy-2.1.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:ab4754d432e3ac42d33a269c8567413bdb541689b02d93788af4131018cbf366"},
+ {file = "numpy-2.1.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:e585c8ae871fd38ac50598f4763d73ec5497b0de9a0ab4ef5b69f01c6a046142"},
+ {file = "numpy-2.1.2-cp312-cp312-win32.whl", hash = "sha256:9c6c754df29ce6a89ed23afb25550d1c2d5fdb9901d9c67a16e0b16eaf7e2550"},
+ {file = "numpy-2.1.2-cp312-cp312-win_amd64.whl", hash = "sha256:456e3b11cb79ac9946c822a56346ec80275eaf2950314b249b512896c0d2505e"},
+ {file = "numpy-2.1.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:a84498e0d0a1174f2b3ed769b67b656aa5460c92c9554039e11f20a05650f00d"},
+ {file = "numpy-2.1.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:4d6ec0d4222e8ffdab1744da2560f07856421b367928026fb540e1945f2eeeaf"},
+ {file = "numpy-2.1.2-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:259ec80d54999cc34cd1eb8ded513cb053c3bf4829152a2e00de2371bd406f5e"},
+ {file = "numpy-2.1.2-cp313-cp313-macosx_14_0_x86_64.whl", hash = "sha256:675c741d4739af2dc20cd6c6a5c4b7355c728167845e3c6b0e824e4e5d36a6c3"},
+ {file = "numpy-2.1.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:05b2d4e667895cc55e3ff2b56077e4c8a5604361fc21a042845ea3ad67465aa8"},
+ {file = "numpy-2.1.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:43cca367bf94a14aca50b89e9bc2061683116cfe864e56740e083392f533ce7a"},
+ {file = "numpy-2.1.2-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:76322dcdb16fccf2ac56f99048af32259dcc488d9b7e25b51e5eca5147a3fb98"},
+ {file = "numpy-2.1.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:32e16a03138cabe0cb28e1007ee82264296ac0983714094380b408097a418cfe"},
+ {file = "numpy-2.1.2-cp313-cp313-win32.whl", hash = "sha256:242b39d00e4944431a3cd2db2f5377e15b5785920421993770cddb89992c3f3a"},
+ {file = "numpy-2.1.2-cp313-cp313-win_amd64.whl", hash = "sha256:f2ded8d9b6f68cc26f8425eda5d3877b47343e68ca23d0d0846f4d312ecaa445"},
+ {file = "numpy-2.1.2-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:2ffef621c14ebb0188a8633348504a35c13680d6da93ab5cb86f4e54b7e922b5"},
+ {file = "numpy-2.1.2-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:ad369ed238b1959dfbade9018a740fb9392c5ac4f9b5173f420bd4f37ba1f7a0"},
+ {file = "numpy-2.1.2-cp313-cp313t-macosx_14_0_arm64.whl", hash = "sha256:d82075752f40c0ddf57e6e02673a17f6cb0f8eb3f587f63ca1eaab5594da5b17"},
+ {file = "numpy-2.1.2-cp313-cp313t-macosx_14_0_x86_64.whl", hash = "sha256:1600068c262af1ca9580a527d43dc9d959b0b1d8e56f8a05d830eea39b7c8af6"},
+ {file = "numpy-2.1.2-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a26ae94658d3ba3781d5e103ac07a876b3e9b29db53f68ed7df432fd033358a8"},
+ {file = "numpy-2.1.2-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:13311c2db4c5f7609b462bc0f43d3c465424d25c626d95040f073e30f7570e35"},
+ {file = "numpy-2.1.2-cp313-cp313t-musllinux_1_1_x86_64.whl", hash = "sha256:2abbf905a0b568706391ec6fa15161fad0fb5d8b68d73c461b3c1bab6064dd62"},
+ {file = "numpy-2.1.2-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:ef444c57d664d35cac4e18c298c47d7b504c66b17c2ea91312e979fcfbdfb08a"},
+ {file = "numpy-2.1.2-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:bdd407c40483463898b84490770199d5714dcc9dd9b792f6c6caccc523c00952"},
+ {file = "numpy-2.1.2-pp310-pypy310_pp73-macosx_14_0_x86_64.whl", hash = "sha256:da65fb46d4cbb75cb417cddf6ba5e7582eb7bb0b47db4b99c9fe5787ce5d91f5"},
+ {file = "numpy-2.1.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1c193d0b0238638e6fc5f10f1b074a6993cb13b0b431f64079a509d63d3aa8b7"},
+ {file = "numpy-2.1.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:a7d80b2e904faa63068ead63107189164ca443b42dd1930299e0d1cb041cec2e"},
+ {file = "numpy-2.1.2.tar.gz", hash = "sha256:13532a088217fa624c99b843eeb54640de23b3414b14aa66d023805eb731066c"},
]
[[package]]
@@ -1347,95 +1368,90 @@ xml = ["lxml (>=4.9.2)"]
[[package]]
name = "pillow"
-version = "10.4.0"
+version = "11.0.0"
description = "Python Imaging Library (Fork)"
optional = false
-python-versions = ">=3.8"
+python-versions = ">=3.9"
files = [
- {file = "pillow-10.4.0-cp310-cp310-macosx_10_10_x86_64.whl", hash = "sha256:4d9667937cfa347525b319ae34375c37b9ee6b525440f3ef48542fcf66f2731e"},
- {file = "pillow-10.4.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:543f3dc61c18dafb755773efc89aae60d06b6596a63914107f75459cf984164d"},
- {file = "pillow-10.4.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7928ecbf1ece13956b95d9cbcfc77137652b02763ba384d9ab508099a2eca856"},
- {file = "pillow-10.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e4d49b85c4348ea0b31ea63bc75a9f3857869174e2bf17e7aba02945cd218e6f"},
- {file = "pillow-10.4.0-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:6c762a5b0997f5659a5ef2266abc1d8851ad7749ad9a6a5506eb23d314e4f46b"},
- {file = "pillow-10.4.0-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:a985e028fc183bf12a77a8bbf36318db4238a3ded7fa9df1b9a133f1cb79f8fc"},
- {file = "pillow-10.4.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:812f7342b0eee081eaec84d91423d1b4650bb9828eb53d8511bcef8ce5aecf1e"},
- {file = "pillow-10.4.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:ac1452d2fbe4978c2eec89fb5a23b8387aba707ac72810d9490118817d9c0b46"},
- {file = "pillow-10.4.0-cp310-cp310-win32.whl", hash = "sha256:bcd5e41a859bf2e84fdc42f4edb7d9aba0a13d29a2abadccafad99de3feff984"},
- {file = "pillow-10.4.0-cp310-cp310-win_amd64.whl", hash = "sha256:ecd85a8d3e79cd7158dec1c9e5808e821feea088e2f69a974db5edf84dc53141"},
- {file = "pillow-10.4.0-cp310-cp310-win_arm64.whl", hash = "sha256:ff337c552345e95702c5fde3158acb0625111017d0e5f24bf3acdb9cc16b90d1"},
- {file = "pillow-10.4.0-cp311-cp311-macosx_10_10_x86_64.whl", hash = "sha256:0a9ec697746f268507404647e531e92889890a087e03681a3606d9b920fbee3c"},
- {file = "pillow-10.4.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:dfe91cb65544a1321e631e696759491ae04a2ea11d36715eca01ce07284738be"},
- {file = "pillow-10.4.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5dc6761a6efc781e6a1544206f22c80c3af4c8cf461206d46a1e6006e4429ff3"},
- {file = "pillow-10.4.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5e84b6cc6a4a3d76c153a6b19270b3526a5a8ed6b09501d3af891daa2a9de7d6"},
- {file = "pillow-10.4.0-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:bbc527b519bd3aa9d7f429d152fea69f9ad37c95f0b02aebddff592688998abe"},
- {file = "pillow-10.4.0-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:76a911dfe51a36041f2e756b00f96ed84677cdeb75d25c767f296c1c1eda1319"},
- {file = "pillow-10.4.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:59291fb29317122398786c2d44427bbd1a6d7ff54017075b22be9d21aa59bd8d"},
- {file = "pillow-10.4.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:416d3a5d0e8cfe4f27f574362435bc9bae57f679a7158e0096ad2beb427b8696"},
- {file = "pillow-10.4.0-cp311-cp311-win32.whl", hash = "sha256:7086cc1d5eebb91ad24ded9f58bec6c688e9f0ed7eb3dbbf1e4800280a896496"},
- {file = "pillow-10.4.0-cp311-cp311-win_amd64.whl", hash = "sha256:cbed61494057c0f83b83eb3a310f0bf774b09513307c434d4366ed64f4128a91"},
- {file = "pillow-10.4.0-cp311-cp311-win_arm64.whl", hash = "sha256:f5f0c3e969c8f12dd2bb7e0b15d5c468b51e5017e01e2e867335c81903046a22"},
- {file = "pillow-10.4.0-cp312-cp312-macosx_10_10_x86_64.whl", hash = "sha256:673655af3eadf4df6b5457033f086e90299fdd7a47983a13827acf7459c15d94"},
- {file = "pillow-10.4.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:866b6942a92f56300012f5fbac71f2d610312ee65e22f1aa2609e491284e5597"},
- {file = "pillow-10.4.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:29dbdc4207642ea6aad70fbde1a9338753d33fb23ed6956e706936706f52dd80"},
- {file = "pillow-10.4.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bf2342ac639c4cf38799a44950bbc2dfcb685f052b9e262f446482afaf4bffca"},
- {file = "pillow-10.4.0-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:f5b92f4d70791b4a67157321c4e8225d60b119c5cc9aee8ecf153aace4aad4ef"},
- {file = "pillow-10.4.0-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:86dcb5a1eb778d8b25659d5e4341269e8590ad6b4e8b44d9f4b07f8d136c414a"},
- {file = "pillow-10.4.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:780c072c2e11c9b2c7ca37f9a2ee8ba66f44367ac3e5c7832afcfe5104fd6d1b"},
- {file = "pillow-10.4.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:37fb69d905be665f68f28a8bba3c6d3223c8efe1edf14cc4cfa06c241f8c81d9"},
- {file = "pillow-10.4.0-cp312-cp312-win32.whl", hash = "sha256:7dfecdbad5c301d7b5bde160150b4db4c659cee2b69589705b6f8a0c509d9f42"},
- {file = "pillow-10.4.0-cp312-cp312-win_amd64.whl", hash = "sha256:1d846aea995ad352d4bdcc847535bd56e0fd88d36829d2c90be880ef1ee4668a"},
- {file = "pillow-10.4.0-cp312-cp312-win_arm64.whl", hash = "sha256:e553cad5179a66ba15bb18b353a19020e73a7921296a7979c4a2b7f6a5cd57f9"},
- {file = "pillow-10.4.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:8bc1a764ed8c957a2e9cacf97c8b2b053b70307cf2996aafd70e91a082e70df3"},
- {file = "pillow-10.4.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:6209bb41dc692ddfee4942517c19ee81b86c864b626dbfca272ec0f7cff5d9fb"},
- {file = "pillow-10.4.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bee197b30783295d2eb680b311af15a20a8b24024a19c3a26431ff83eb8d1f70"},
- {file = "pillow-10.4.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1ef61f5dd14c300786318482456481463b9d6b91ebe5ef12f405afbba77ed0be"},
- {file = "pillow-10.4.0-cp313-cp313-manylinux_2_28_aarch64.whl", hash = "sha256:297e388da6e248c98bc4a02e018966af0c5f92dfacf5a5ca22fa01cb3179bca0"},
- {file = "pillow-10.4.0-cp313-cp313-manylinux_2_28_x86_64.whl", hash = "sha256:e4db64794ccdf6cb83a59d73405f63adbe2a1887012e308828596100a0b2f6cc"},
- {file = "pillow-10.4.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:bd2880a07482090a3bcb01f4265f1936a903d70bc740bfcb1fd4e8a2ffe5cf5a"},
- {file = "pillow-10.4.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:4b35b21b819ac1dbd1233317adeecd63495f6babf21b7b2512d244ff6c6ce309"},
- {file = "pillow-10.4.0-cp313-cp313-win32.whl", hash = "sha256:551d3fd6e9dc15e4c1eb6fc4ba2b39c0c7933fa113b220057a34f4bb3268a060"},
- {file = "pillow-10.4.0-cp313-cp313-win_amd64.whl", hash = "sha256:030abdbe43ee02e0de642aee345efa443740aa4d828bfe8e2eb11922ea6a21ea"},
- {file = "pillow-10.4.0-cp313-cp313-win_arm64.whl", hash = "sha256:5b001114dd152cfd6b23befeb28d7aee43553e2402c9f159807bf55f33af8a8d"},
- {file = "pillow-10.4.0-cp38-cp38-macosx_10_10_x86_64.whl", hash = "sha256:8d4d5063501b6dd4024b8ac2f04962d661222d120381272deea52e3fc52d3736"},
- {file = "pillow-10.4.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:7c1ee6f42250df403c5f103cbd2768a28fe1a0ea1f0f03fe151c8741e1469c8b"},
- {file = "pillow-10.4.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b15e02e9bb4c21e39876698abf233c8c579127986f8207200bc8a8f6bb27acf2"},
- {file = "pillow-10.4.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7a8d4bade9952ea9a77d0c3e49cbd8b2890a399422258a77f357b9cc9be8d680"},
- {file = "pillow-10.4.0-cp38-cp38-manylinux_2_28_aarch64.whl", hash = "sha256:43efea75eb06b95d1631cb784aa40156177bf9dd5b4b03ff38979e048258bc6b"},
- {file = "pillow-10.4.0-cp38-cp38-manylinux_2_28_x86_64.whl", hash = "sha256:950be4d8ba92aca4b2bb0741285a46bfae3ca699ef913ec8416c1b78eadd64cd"},
- {file = "pillow-10.4.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:d7480af14364494365e89d6fddc510a13e5a2c3584cb19ef65415ca57252fb84"},
- {file = "pillow-10.4.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:73664fe514b34c8f02452ffb73b7a92c6774e39a647087f83d67f010eb9a0cf0"},
- {file = "pillow-10.4.0-cp38-cp38-win32.whl", hash = "sha256:e88d5e6ad0d026fba7bdab8c3f225a69f063f116462c49892b0149e21b6c0a0e"},
- {file = "pillow-10.4.0-cp38-cp38-win_amd64.whl", hash = "sha256:5161eef006d335e46895297f642341111945e2c1c899eb406882a6c61a4357ab"},
- {file = "pillow-10.4.0-cp39-cp39-macosx_10_10_x86_64.whl", hash = "sha256:0ae24a547e8b711ccaaf99c9ae3cd975470e1a30caa80a6aaee9a2f19c05701d"},
- {file = "pillow-10.4.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:298478fe4f77a4408895605f3482b6cc6222c018b2ce565c2b6b9c354ac3229b"},
- {file = "pillow-10.4.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:134ace6dc392116566980ee7436477d844520a26a4b1bd4053f6f47d096997fd"},
- {file = "pillow-10.4.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:930044bb7679ab003b14023138b50181899da3f25de50e9dbee23b61b4de2126"},
- {file = "pillow-10.4.0-cp39-cp39-manylinux_2_28_aarch64.whl", hash = "sha256:c76e5786951e72ed3686e122d14c5d7012f16c8303a674d18cdcd6d89557fc5b"},
- {file = "pillow-10.4.0-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:b2724fdb354a868ddf9a880cb84d102da914e99119211ef7ecbdc613b8c96b3c"},
- {file = "pillow-10.4.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:dbc6ae66518ab3c5847659e9988c3b60dc94ffb48ef9168656e0019a93dbf8a1"},
- {file = "pillow-10.4.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:06b2f7898047ae93fad74467ec3d28fe84f7831370e3c258afa533f81ef7f3df"},
- {file = "pillow-10.4.0-cp39-cp39-win32.whl", hash = "sha256:7970285ab628a3779aecc35823296a7869f889b8329c16ad5a71e4901a3dc4ef"},
- {file = "pillow-10.4.0-cp39-cp39-win_amd64.whl", hash = "sha256:961a7293b2457b405967af9c77dcaa43cc1a8cd50d23c532e62d48ab6cdd56f5"},
- {file = "pillow-10.4.0-cp39-cp39-win_arm64.whl", hash = "sha256:32cda9e3d601a52baccb2856b8ea1fc213c90b340c542dcef77140dfa3278a9e"},
- {file = "pillow-10.4.0-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:5b4815f2e65b30f5fbae9dfffa8636d992d49705723fe86a3661806e069352d4"},
- {file = "pillow-10.4.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:8f0aef4ef59694b12cadee839e2ba6afeab89c0f39a3adc02ed51d109117b8da"},
- {file = "pillow-10.4.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9f4727572e2918acaa9077c919cbbeb73bd2b3ebcfe033b72f858fc9fbef0026"},
- {file = "pillow-10.4.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ff25afb18123cea58a591ea0244b92eb1e61a1fd497bf6d6384f09bc3262ec3e"},
- {file = "pillow-10.4.0-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:dc3e2db6ba09ffd7d02ae9141cfa0ae23393ee7687248d46a7507b75d610f4f5"},
- {file = "pillow-10.4.0-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:02a2be69f9c9b8c1e97cf2713e789d4e398c751ecfd9967c18d0ce304efbf885"},
- {file = "pillow-10.4.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:0755ffd4a0c6f267cccbae2e9903d95477ca2f77c4fcf3a3a09570001856c8a5"},
- {file = "pillow-10.4.0-pp39-pypy39_pp73-macosx_10_15_x86_64.whl", hash = "sha256:a02364621fe369e06200d4a16558e056fe2805d3468350df3aef21e00d26214b"},
- {file = "pillow-10.4.0-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:1b5dea9831a90e9d0721ec417a80d4cbd7022093ac38a568db2dd78363b00908"},
- {file = "pillow-10.4.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9b885f89040bb8c4a1573566bbb2f44f5c505ef6e74cec7ab9068c900047f04b"},
- {file = "pillow-10.4.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:87dd88ded2e6d74d31e1e0a99a726a6765cda32d00ba72dc37f0651f306daaa8"},
- {file = "pillow-10.4.0-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:2db98790afc70118bd0255c2eeb465e9767ecf1f3c25f9a1abb8ffc8cfd1fe0a"},
- {file = "pillow-10.4.0-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:f7baece4ce06bade126fb84b8af1c33439a76d8a6fd818970215e0560ca28c27"},
- {file = "pillow-10.4.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:cfdd747216947628af7b259d274771d84db2268ca062dd5faf373639d00113a3"},
- {file = "pillow-10.4.0.tar.gz", hash = "sha256:166c1cd4d24309b30d61f79f4a9114b7b2313d7450912277855ff5dfd7cd4a06"},
+ {file = "pillow-11.0.0-cp310-cp310-macosx_10_10_x86_64.whl", hash = "sha256:6619654954dc4936fcff82db8eb6401d3159ec6be81e33c6000dfd76ae189947"},
+ {file = "pillow-11.0.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:b3c5ac4bed7519088103d9450a1107f76308ecf91d6dabc8a33a2fcfb18d0fba"},
+ {file = "pillow-11.0.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a65149d8ada1055029fcb665452b2814fe7d7082fcb0c5bed6db851cb69b2086"},
+ {file = "pillow-11.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:88a58d8ac0cc0e7f3a014509f0455248a76629ca9b604eca7dc5927cc593c5e9"},
+ {file = "pillow-11.0.0-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:c26845094b1af3c91852745ae78e3ea47abf3dbcd1cf962f16b9a5fbe3ee8488"},
+ {file = "pillow-11.0.0-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:1a61b54f87ab5786b8479f81c4b11f4d61702830354520837f8cc791ebba0f5f"},
+ {file = "pillow-11.0.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:674629ff60030d144b7bca2b8330225a9b11c482ed408813924619c6f302fdbb"},
+ {file = "pillow-11.0.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:598b4e238f13276e0008299bd2482003f48158e2b11826862b1eb2ad7c768b97"},
+ {file = "pillow-11.0.0-cp310-cp310-win32.whl", hash = "sha256:9a0f748eaa434a41fccf8e1ee7a3eed68af1b690e75328fd7a60af123c193b50"},
+ {file = "pillow-11.0.0-cp310-cp310-win_amd64.whl", hash = "sha256:a5629742881bcbc1f42e840af185fd4d83a5edeb96475a575f4da50d6ede337c"},
+ {file = "pillow-11.0.0-cp310-cp310-win_arm64.whl", hash = "sha256:ee217c198f2e41f184f3869f3e485557296d505b5195c513b2bfe0062dc537f1"},
+ {file = "pillow-11.0.0-cp311-cp311-macosx_10_10_x86_64.whl", hash = "sha256:1c1d72714f429a521d8d2d018badc42414c3077eb187a59579f28e4270b4b0fc"},
+ {file = "pillow-11.0.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:499c3a1b0d6fc8213519e193796eb1a86a1be4b1877d678b30f83fd979811d1a"},
+ {file = "pillow-11.0.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c8b2351c85d855293a299038e1f89db92a2f35e8d2f783489c6f0b2b5f3fe8a3"},
+ {file = "pillow-11.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6f4dba50cfa56f910241eb7f883c20f1e7b1d8f7d91c750cd0b318bad443f4d5"},
+ {file = "pillow-11.0.0-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:5ddbfd761ee00c12ee1be86c9c0683ecf5bb14c9772ddbd782085779a63dd55b"},
+ {file = "pillow-11.0.0-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:45c566eb10b8967d71bf1ab8e4a525e5a93519e29ea071459ce517f6b903d7fa"},
+ {file = "pillow-11.0.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:b4fd7bd29610a83a8c9b564d457cf5bd92b4e11e79a4ee4716a63c959699b306"},
+ {file = "pillow-11.0.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:cb929ca942d0ec4fac404cbf520ee6cac37bf35be479b970c4ffadf2b6a1cad9"},
+ {file = "pillow-11.0.0-cp311-cp311-win32.whl", hash = "sha256:006bcdd307cc47ba43e924099a038cbf9591062e6c50e570819743f5607404f5"},
+ {file = "pillow-11.0.0-cp311-cp311-win_amd64.whl", hash = "sha256:52a2d8323a465f84faaba5236567d212c3668f2ab53e1c74c15583cf507a0291"},
+ {file = "pillow-11.0.0-cp311-cp311-win_arm64.whl", hash = "sha256:16095692a253047fe3ec028e951fa4221a1f3ed3d80c397e83541a3037ff67c9"},
+ {file = "pillow-11.0.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:d2c0a187a92a1cb5ef2c8ed5412dd8d4334272617f532d4ad4de31e0495bd923"},
+ {file = "pillow-11.0.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:084a07ef0821cfe4858fe86652fffac8e187b6ae677e9906e192aafcc1b69903"},
+ {file = "pillow-11.0.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8069c5179902dcdce0be9bfc8235347fdbac249d23bd90514b7a47a72d9fecf4"},
+ {file = "pillow-11.0.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f02541ef64077f22bf4924f225c0fd1248c168f86e4b7abdedd87d6ebaceab0f"},
+ {file = "pillow-11.0.0-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:fcb4621042ac4b7865c179bb972ed0da0218a076dc1820ffc48b1d74c1e37fe9"},
+ {file = "pillow-11.0.0-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:00177a63030d612148e659b55ba99527803288cea7c75fb05766ab7981a8c1b7"},
+ {file = "pillow-11.0.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:8853a3bf12afddfdf15f57c4b02d7ded92c7a75a5d7331d19f4f9572a89c17e6"},
+ {file = "pillow-11.0.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:3107c66e43bda25359d5ef446f59c497de2b5ed4c7fdba0894f8d6cf3822dafc"},
+ {file = "pillow-11.0.0-cp312-cp312-win32.whl", hash = "sha256:86510e3f5eca0ab87429dd77fafc04693195eec7fd6a137c389c3eeb4cfb77c6"},
+ {file = "pillow-11.0.0-cp312-cp312-win_amd64.whl", hash = "sha256:8ec4a89295cd6cd4d1058a5e6aec6bf51e0eaaf9714774e1bfac7cfc9051db47"},
+ {file = "pillow-11.0.0-cp312-cp312-win_arm64.whl", hash = "sha256:27a7860107500d813fcd203b4ea19b04babe79448268403172782754870dac25"},
+ {file = "pillow-11.0.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:bcd1fb5bb7b07f64c15618c89efcc2cfa3e95f0e3bcdbaf4642509de1942a699"},
+ {file = "pillow-11.0.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:0e038b0745997c7dcaae350d35859c9715c71e92ffb7e0f4a8e8a16732150f38"},
+ {file = "pillow-11.0.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0ae08bd8ffc41aebf578c2af2f9d8749d91f448b3bfd41d7d9ff573d74f2a6b2"},
+ {file = "pillow-11.0.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d69bfd8ec3219ae71bcde1f942b728903cad25fafe3100ba2258b973bd2bc1b2"},
+ {file = "pillow-11.0.0-cp313-cp313-manylinux_2_28_aarch64.whl", hash = "sha256:61b887f9ddba63ddf62fd02a3ba7add935d053b6dd7d58998c630e6dbade8527"},
+ {file = "pillow-11.0.0-cp313-cp313-manylinux_2_28_x86_64.whl", hash = "sha256:c6a660307ca9d4867caa8d9ca2c2658ab685de83792d1876274991adec7b93fa"},
+ {file = "pillow-11.0.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:73e3a0200cdda995c7e43dd47436c1548f87a30bb27fb871f352a22ab8dcf45f"},
+ {file = "pillow-11.0.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:fba162b8872d30fea8c52b258a542c5dfd7b235fb5cb352240c8d63b414013eb"},
+ {file = "pillow-11.0.0-cp313-cp313-win32.whl", hash = "sha256:f1b82c27e89fffc6da125d5eb0ca6e68017faf5efc078128cfaa42cf5cb38798"},
+ {file = "pillow-11.0.0-cp313-cp313-win_amd64.whl", hash = "sha256:8ba470552b48e5835f1d23ecb936bb7f71d206f9dfeee64245f30c3270b994de"},
+ {file = "pillow-11.0.0-cp313-cp313-win_arm64.whl", hash = "sha256:846e193e103b41e984ac921b335df59195356ce3f71dcfd155aa79c603873b84"},
+ {file = "pillow-11.0.0-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:4ad70c4214f67d7466bea6a08061eba35c01b1b89eaa098040a35272a8efb22b"},
+ {file = "pillow-11.0.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:6ec0d5af64f2e3d64a165f490d96368bb5dea8b8f9ad04487f9ab60dc4bb6003"},
+ {file = "pillow-11.0.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c809a70e43c7977c4a42aefd62f0131823ebf7dd73556fa5d5950f5b354087e2"},
+ {file = "pillow-11.0.0-cp313-cp313t-manylinux_2_28_x86_64.whl", hash = "sha256:4b60c9520f7207aaf2e1d94de026682fc227806c6e1f55bba7606d1c94dd623a"},
+ {file = "pillow-11.0.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:1e2688958a840c822279fda0086fec1fdab2f95bf2b717b66871c4ad9859d7e8"},
+ {file = "pillow-11.0.0-cp313-cp313t-win32.whl", hash = "sha256:607bbe123c74e272e381a8d1957083a9463401f7bd01287f50521ecb05a313f8"},
+ {file = "pillow-11.0.0-cp313-cp313t-win_amd64.whl", hash = "sha256:5c39ed17edea3bc69c743a8dd3e9853b7509625c2462532e62baa0732163a904"},
+ {file = "pillow-11.0.0-cp313-cp313t-win_arm64.whl", hash = "sha256:75acbbeb05b86bc53cbe7b7e6fe00fbcf82ad7c684b3ad82e3d711da9ba287d3"},
+ {file = "pillow-11.0.0-cp39-cp39-macosx_10_10_x86_64.whl", hash = "sha256:2e46773dc9f35a1dd28bd6981332fd7f27bec001a918a72a79b4133cf5291dba"},
+ {file = "pillow-11.0.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:2679d2258b7f1192b378e2893a8a0a0ca472234d4c2c0e6bdd3380e8dfa21b6a"},
+ {file = "pillow-11.0.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:eda2616eb2313cbb3eebbe51f19362eb434b18e3bb599466a1ffa76a033fb916"},
+ {file = "pillow-11.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:20ec184af98a121fb2da42642dea8a29ec80fc3efbaefb86d8fdd2606619045d"},
+ {file = "pillow-11.0.0-cp39-cp39-manylinux_2_28_aarch64.whl", hash = "sha256:8594f42df584e5b4bb9281799698403f7af489fba84c34d53d1c4bfb71b7c4e7"},
+ {file = "pillow-11.0.0-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:c12b5ae868897c7338519c03049a806af85b9b8c237b7d675b8c5e089e4a618e"},
+ {file = "pillow-11.0.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:70fbbdacd1d271b77b7721fe3cdd2d537bbbd75d29e6300c672ec6bb38d9672f"},
+ {file = "pillow-11.0.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:5178952973e588b3f1360868847334e9e3bf49d19e169bbbdfaf8398002419ae"},
+ {file = "pillow-11.0.0-cp39-cp39-win32.whl", hash = "sha256:8c676b587da5673d3c75bd67dd2a8cdfeb282ca38a30f37950511766b26858c4"},
+ {file = "pillow-11.0.0-cp39-cp39-win_amd64.whl", hash = "sha256:94f3e1780abb45062287b4614a5bc0874519c86a777d4a7ad34978e86428b8dd"},
+ {file = "pillow-11.0.0-cp39-cp39-win_arm64.whl", hash = "sha256:290f2cc809f9da7d6d622550bbf4c1e57518212da51b6a30fe8e0a270a5b78bd"},
+ {file = "pillow-11.0.0-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:1187739620f2b365de756ce086fdb3604573337cc28a0d3ac4a01ab6b2d2a6d2"},
+ {file = "pillow-11.0.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:fbbcb7b57dc9c794843e3d1258c0fbf0f48656d46ffe9e09b63bbd6e8cd5d0a2"},
+ {file = "pillow-11.0.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5d203af30149ae339ad1b4f710d9844ed8796e97fda23ffbc4cc472968a47d0b"},
+ {file = "pillow-11.0.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:21a0d3b115009ebb8ac3d2ebec5c2982cc693da935f4ab7bb5c8ebe2f47d36f2"},
+ {file = "pillow-11.0.0-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:73853108f56df97baf2bb8b522f3578221e56f646ba345a372c78326710d3830"},
+ {file = "pillow-11.0.0-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:e58876c91f97b0952eb766123bfef372792ab3f4e3e1f1a2267834c2ab131734"},
+ {file = "pillow-11.0.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:224aaa38177597bb179f3ec87eeefcce8e4f85e608025e9cfac60de237ba6316"},
+ {file = "pillow-11.0.0-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:5bd2d3bdb846d757055910f0a59792d33b555800813c3b39ada1829c372ccb06"},
+ {file = "pillow-11.0.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:375b8dd15a1f5d2feafff536d47e22f69625c1aa92f12b339ec0b2ca40263273"},
+ {file = "pillow-11.0.0-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:daffdf51ee5db69a82dd127eabecce20729e21f7a3680cf7cbb23f0829189790"},
+ {file = "pillow-11.0.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:7326a1787e3c7b0429659e0a944725e1b03eeaa10edd945a86dead1913383944"},
+ {file = "pillow-11.0.0.tar.gz", hash = "sha256:72bacbaf24ac003fea9bff9837d1eedb6088758d41e100c1552930151f677739"},
]
[package.extras]
-docs = ["furo", "olefile", "sphinx (>=7.3)", "sphinx-copybutton", "sphinx-inline-tabs", "sphinxext-opengraph"]
+docs = ["furo", "olefile", "sphinx (>=8.1)", "sphinx-copybutton", "sphinx-inline-tabs", "sphinxext-opengraph"]
fpx = ["olefile"]
mic = ["olefile"]
tests = ["check-manifest", "coverage", "defusedxml", "markdown2", "olefile", "packaging", "pyroma", "pytest", "pytest-cov", "pytest-timeout"]
@@ -1503,22 +1519,22 @@ type = ["mypy (>=1.11.2)"]
[[package]]
name = "playwright"
-version = "1.47.0"
+version = "1.48.0"
description = "A high-level API to automate web browsers"
optional = false
python-versions = ">=3.8"
files = [
- {file = "playwright-1.47.0-py3-none-macosx_10_13_x86_64.whl", hash = "sha256:f205df24edb925db1a4ab62f1ab0da06f14bb69e382efecfb0deedc4c7f4b8cd"},
- {file = "playwright-1.47.0-py3-none-macosx_11_0_arm64.whl", hash = "sha256:7fc820faf6885f69a52ba4ec94124e575d3c4a4003bf29200029b4a4f2b2d0ab"},
- {file = "playwright-1.47.0-py3-none-macosx_11_0_universal2.whl", hash = "sha256:8e212dc472ff19c7d46ed7e900191c7a786ce697556ac3f1615986ec3aa00341"},
- {file = "playwright-1.47.0-py3-none-manylinux1_x86_64.whl", hash = "sha256:a1935672531963e4b2a321de5aa59b982fb92463ee6e1032dd7326378e462955"},
- {file = "playwright-1.47.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e0a1b61473d6f7f39c5d77d4800b3cbefecb03344c90b98f3fbcae63294ad249"},
- {file = "playwright-1.47.0-py3-none-win32.whl", hash = "sha256:1b977ed81f6bba5582617684a21adab9bad5676d90a357ebf892db7bdf4a9974"},
- {file = "playwright-1.47.0-py3-none-win_amd64.whl", hash = "sha256:0ec1056042d2e86088795a503347407570bffa32cbe20748e5d4c93dba085280"},
+ {file = "playwright-1.48.0-py3-none-macosx_10_13_x86_64.whl", hash = "sha256:082bce2739f1078acc7d0734da8cc0e23eb91b7fae553f3316d733276f09a6b1"},
+ {file = "playwright-1.48.0-py3-none-macosx_11_0_arm64.whl", hash = "sha256:7da2eb51a19c7f3b523e9faa9d98e7af92e52eb983a099979ea79c9668e3cbf7"},
+ {file = "playwright-1.48.0-py3-none-macosx_11_0_universal2.whl", hash = "sha256:115b988d1da322358b77bc3bf2d3cc90f8c881e691461538e7df91614c4833c9"},
+ {file = "playwright-1.48.0-py3-none-manylinux1_x86_64.whl", hash = "sha256:8dabb80e62f667fe2640a8b694e26a7b884c0b4803f7514a3954fc849126227b"},
+ {file = "playwright-1.48.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8ff8303409ebed76bed4c3d655340320b768817d900ba208b394fdd7d7939a5c"},
+ {file = "playwright-1.48.0-py3-none-win32.whl", hash = "sha256:85598c360c590076d4f435525be991246d74a905b654ac19d26eab7ed9b98b2d"},
+ {file = "playwright-1.48.0-py3-none-win_amd64.whl", hash = "sha256:e0e87b0c4dc8fce83c725dd851aec37bc4e882bb225ec8a96bd83cf32d4f1623"},
]
[package.dependencies]
-greenlet = "3.0.3"
+greenlet = "3.1.1"
pyee = "12.0.0"
[[package]]
@@ -1553,13 +1569,13 @@ testing = ["pytest", "pytest-benchmark"]
[[package]]
name = "pre-commit"
-version = "3.8.0"
+version = "4.0.1"
description = "A framework for managing and maintaining multi-language pre-commit hooks."
optional = false
python-versions = ">=3.9"
files = [
- {file = "pre_commit-3.8.0-py2.py3-none-any.whl", hash = "sha256:9a90a53bf82fdd8778d58085faf8d83df56e40dfe18f45b19446e26bf1b3a63f"},
- {file = "pre_commit-3.8.0.tar.gz", hash = "sha256:8bb6494d4a20423842e198980c9ecf9f96607a07ea29549e180eef9ae80fe7af"},
+ {file = "pre_commit-4.0.1-py2.py3-none-any.whl", hash = "sha256:efde913840816312445dc98787724647c65473daefe420785f885e8ed9a06878"},
+ {file = "pre_commit-4.0.1.tar.gz", hash = "sha256:80905ac375958c0444c65e9cebebd948b3cdb518f335a091a670a89d652139d2"},
]
[package.dependencies]
@@ -1571,32 +1587,33 @@ virtualenv = ">=20.10.0"
[[package]]
name = "psutil"
-version = "6.0.0"
+version = "6.1.0"
description = "Cross-platform lib for process and system monitoring in Python."
optional = false
python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,>=2.7"
files = [
- {file = "psutil-6.0.0-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:a021da3e881cd935e64a3d0a20983bda0bb4cf80e4f74fa9bfcb1bc5785360c6"},
- {file = "psutil-6.0.0-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:1287c2b95f1c0a364d23bc6f2ea2365a8d4d9b726a3be7294296ff7ba97c17f0"},
- {file = "psutil-6.0.0-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:a9a3dbfb4de4f18174528d87cc352d1f788b7496991cca33c6996f40c9e3c92c"},
- {file = "psutil-6.0.0-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:6ec7588fb3ddaec7344a825afe298db83fe01bfaaab39155fa84cf1c0d6b13c3"},
- {file = "psutil-6.0.0-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:1e7c870afcb7d91fdea2b37c24aeb08f98b6d67257a5cb0a8bc3ac68d0f1a68c"},
- {file = "psutil-6.0.0-cp27-none-win32.whl", hash = "sha256:02b69001f44cc73c1c5279d02b30a817e339ceb258ad75997325e0e6169d8b35"},
- {file = "psutil-6.0.0-cp27-none-win_amd64.whl", hash = "sha256:21f1fb635deccd510f69f485b87433460a603919b45e2a324ad65b0cc74f8fb1"},
- {file = "psutil-6.0.0-cp36-abi3-macosx_10_9_x86_64.whl", hash = "sha256:c588a7e9b1173b6e866756dde596fd4cad94f9399daf99ad8c3258b3cb2b47a0"},
- {file = "psutil-6.0.0-cp36-abi3-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6ed2440ada7ef7d0d608f20ad89a04ec47d2d3ab7190896cd62ca5fc4fe08bf0"},
- {file = "psutil-6.0.0-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5fd9a97c8e94059b0ef54a7d4baf13b405011176c3b6ff257c247cae0d560ecd"},
- {file = "psutil-6.0.0-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e2e8d0054fc88153ca0544f5c4d554d42e33df2e009c4ff42284ac9ebdef4132"},
- {file = "psutil-6.0.0-cp36-cp36m-win32.whl", hash = "sha256:fc8c9510cde0146432bbdb433322861ee8c3efbf8589865c8bf8d21cb30c4d14"},
- {file = "psutil-6.0.0-cp36-cp36m-win_amd64.whl", hash = "sha256:34859b8d8f423b86e4385ff3665d3f4d94be3cdf48221fbe476e883514fdb71c"},
- {file = "psutil-6.0.0-cp37-abi3-win32.whl", hash = "sha256:a495580d6bae27291324fe60cea0b5a7c23fa36a7cd35035a16d93bdcf076b9d"},
- {file = "psutil-6.0.0-cp37-abi3-win_amd64.whl", hash = "sha256:33ea5e1c975250a720b3a6609c490db40dae5d83a4eb315170c4fe0d8b1f34b3"},
- {file = "psutil-6.0.0-cp38-abi3-macosx_11_0_arm64.whl", hash = "sha256:ffe7fc9b6b36beadc8c322f84e1caff51e8703b88eee1da46d1e3a6ae11b4fd0"},
- {file = "psutil-6.0.0.tar.gz", hash = "sha256:8faae4f310b6d969fa26ca0545338b21f73c6b15db7c4a8d934a5482faa818f2"},
+ {file = "psutil-6.1.0-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:ff34df86226c0227c52f38b919213157588a678d049688eded74c76c8ba4a5d0"},
+ {file = "psutil-6.1.0-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:c0e0c00aa18ca2d3b2b991643b799a15fc8f0563d2ebb6040f64ce8dc027b942"},
+ {file = "psutil-6.1.0-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:000d1d1ebd634b4efb383f4034437384e44a6d455260aaee2eca1e9c1b55f047"},
+ {file = "psutil-6.1.0-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:5cd2bcdc75b452ba2e10f0e8ecc0b57b827dd5d7aaffbc6821b2a9a242823a76"},
+ {file = "psutil-6.1.0-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:045f00a43c737f960d273a83973b2511430d61f283a44c96bf13a6e829ba8fdc"},
+ {file = "psutil-6.1.0-cp27-none-win32.whl", hash = "sha256:9118f27452b70bb1d9ab3198c1f626c2499384935aaf55388211ad982611407e"},
+ {file = "psutil-6.1.0-cp27-none-win_amd64.whl", hash = "sha256:a8506f6119cff7015678e2bce904a4da21025cc70ad283a53b099e7620061d85"},
+ {file = "psutil-6.1.0-cp36-abi3-macosx_10_9_x86_64.whl", hash = "sha256:6e2dcd475ce8b80522e51d923d10c7871e45f20918e027ab682f94f1c6351688"},
+ {file = "psutil-6.1.0-cp36-abi3-macosx_11_0_arm64.whl", hash = "sha256:0895b8414afafc526712c498bd9de2b063deaac4021a3b3c34566283464aff8e"},
+ {file = "psutil-6.1.0-cp36-abi3-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9dcbfce5d89f1d1f2546a2090f4fcf87c7f669d1d90aacb7d7582addece9fb38"},
+ {file = "psutil-6.1.0-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:498c6979f9c6637ebc3a73b3f87f9eb1ec24e1ce53a7c5173b8508981614a90b"},
+ {file = "psutil-6.1.0-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d905186d647b16755a800e7263d43df08b790d709d575105d419f8b6ef65423a"},
+ {file = "psutil-6.1.0-cp36-cp36m-win32.whl", hash = "sha256:6d3fbbc8d23fcdcb500d2c9f94e07b1342df8ed71b948a2649b5cb060a7c94ca"},
+ {file = "psutil-6.1.0-cp36-cp36m-win_amd64.whl", hash = "sha256:1209036fbd0421afde505a4879dee3b2fd7b1e14fee81c0069807adcbbcca747"},
+ {file = "psutil-6.1.0-cp37-abi3-win32.whl", hash = "sha256:1ad45a1f5d0b608253b11508f80940985d1d0c8f6111b5cb637533a0e6ddc13e"},
+ {file = "psutil-6.1.0-cp37-abi3-win_amd64.whl", hash = "sha256:a8fb3752b491d246034fa4d279ff076501588ce8cbcdbb62c32fd7a377d996be"},
+ {file = "psutil-6.1.0.tar.gz", hash = "sha256:353815f59a7f64cdaca1c0307ee13558a0512f6db064e92fe833784f08539c7a"},
]
[package.extras]
-test = ["enum34", "ipaddress", "mock", "pywin32", "wmi"]
+dev = ["black", "check-manifest", "coverage", "packaging", "pylint", "pyperf", "pypinfo", "pytest-cov", "requests", "rstcheck", "ruff", "sphinx", "sphinx_rtd_theme", "toml-sort", "twine", "virtualenv", "wheel"]
+test = ["pytest", "pytest-xdist", "setuptools"]
[[package]]
name = "py-cpuinfo"
@@ -1818,13 +1835,13 @@ files = [
[[package]]
name = "pytest"
-version = "7.4.4"
+version = "8.3.3"
description = "pytest: simple powerful testing with Python"
optional = false
-python-versions = ">=3.7"
+python-versions = ">=3.8"
files = [
- {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"},
- {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"},
+ {file = "pytest-8.3.3-py3-none-any.whl", hash = "sha256:a6853c7375b2663155079443d2e45de913a911a11d669df02a50814944db57b2"},
+ {file = "pytest-8.3.3.tar.gz", hash = "sha256:70b98107bd648308a7952b06e6ca9a50bc660be218d53c257cc1fc94fda10181"},
]
[package.dependencies]
@@ -1832,29 +1849,29 @@ colorama = {version = "*", markers = "sys_platform == \"win32\""}
exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""}
iniconfig = "*"
packaging = "*"
-pluggy = ">=0.12,<2.0"
-tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""}
+pluggy = ">=1.5,<2"
+tomli = {version = ">=1", markers = "python_version < \"3.11\""}
[package.extras]
-testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"]
+dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"]
[[package]]
name = "pytest-asyncio"
-version = "0.21.2"
+version = "0.24.0"
description = "Pytest support for asyncio"
optional = false
-python-versions = ">=3.7"
+python-versions = ">=3.8"
files = [
- {file = "pytest_asyncio-0.21.2-py3-none-any.whl", hash = "sha256:ab664c88bb7998f711d8039cacd4884da6430886ae8bbd4eded552ed2004f16b"},
- {file = "pytest_asyncio-0.21.2.tar.gz", hash = "sha256:d67738fc232b94b326b9d060750beb16e0074210b98dd8b58a5239fa2a154f45"},
+ {file = "pytest_asyncio-0.24.0-py3-none-any.whl", hash = "sha256:a811296ed596b69bf0b6f3dc40f83bcaf341b155a269052d82efa2b25ac7037b"},
+ {file = "pytest_asyncio-0.24.0.tar.gz", hash = "sha256:d081d828e576d85f875399194281e92bf8a68d60d72d1a2faf2feddb6c46b276"},
]
[package.dependencies]
-pytest = ">=7.0.0"
+pytest = ">=8.2,<9"
[package.extras]
docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"]
-testing = ["coverage (>=6.2)", "flaky (>=3.5.0)", "hypothesis (>=5.7.1)", "mypy (>=0.931)", "pytest-trio (>=0.7.0)"]
+testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"]
[[package]]
name = "pytest-base-url"
@@ -1896,13 +1913,13 @@ histogram = ["pygal", "pygaljs"]
[[package]]
name = "pytest-cov"
-version = "4.1.0"
+version = "5.0.0"
description = "Pytest plugin for measuring coverage."
optional = false
-python-versions = ">=3.7"
+python-versions = ">=3.8"
files = [
- {file = "pytest-cov-4.1.0.tar.gz", hash = "sha256:3904b13dfbfec47f003b8e77fd5b589cd11904a21ddf1ab38a64f204d6a10ef6"},
- {file = "pytest_cov-4.1.0-py3-none-any.whl", hash = "sha256:6ba70b9e97e69fcc3fb45bfeab2d0a138fb65c4d0d6a41ef33983ad114be8c3a"},
+ {file = "pytest-cov-5.0.0.tar.gz", hash = "sha256:5837b58e9f6ebd335b0f8060eecce69b662415b16dc503883a02f45dfeb14857"},
+ {file = "pytest_cov-5.0.0-py3-none-any.whl", hash = "sha256:4f0764a1219df53214206bf1feea4633c3b558a2925c8b59f144f682861ce652"},
]
[package.dependencies]
@@ -1910,7 +1927,7 @@ coverage = {version = ">=5.2.1", extras = ["toml"]}
pytest = ">=4.6"
[package.extras]
-testing = ["fields", "hunter", "process-tests", "pytest-xdist", "six", "virtualenv"]
+testing = ["fields", "hunter", "process-tests", "pytest-xdist", "virtualenv"]
[[package]]
name = "pytest-mock"
@@ -1962,13 +1979,13 @@ six = ">=1.5"
[[package]]
name = "python-engineio"
-version = "4.9.1"
+version = "4.10.1"
description = "Engine.IO server and client for Python"
optional = false
python-versions = ">=3.6"
files = [
- {file = "python_engineio-4.9.1-py3-none-any.whl", hash = "sha256:f995e702b21f6b9ebde4e2000cd2ad0112ba0e5116ec8d22fe3515e76ba9dddd"},
- {file = "python_engineio-4.9.1.tar.gz", hash = "sha256:7631cf5563086076611e494c643b3fa93dd3a854634b5488be0bba0ef9b99709"},
+ {file = "python_engineio-4.10.1-py3-none-any.whl", hash = "sha256:445a94004ec8034960ab99e7ce4209ec619c6e6b6a12aedcb05abeab924025c0"},
+ {file = "python_engineio-4.10.1.tar.gz", hash = "sha256:166cea8dd7429638c5c4e3a4895beae95196e860bc6f29ed0b9fe753d1ef2072"},
]
[package.dependencies]
@@ -2132,13 +2149,13 @@ md = ["cmarkgfm (>=0.8.0)"]
[[package]]
name = "redis"
-version = "5.1.0"
+version = "5.1.1"
description = "Python client for Redis database and key-value store"
optional = false
python-versions = ">=3.8"
files = [
- {file = "redis-5.1.0-py3-none-any.whl", hash = "sha256:fd4fccba0d7f6aa48c58a78d76ddb4afc698f5da4a2c1d03d916e4fd7ab88cdd"},
- {file = "redis-5.1.0.tar.gz", hash = "sha256:b756df1e4a3858fcc0ef861f3fc53623a96c41e2b1f5304e09e0fe758d333d40"},
+ {file = "redis-5.1.1-py3-none-any.whl", hash = "sha256:f8ea06b7482a668c6475ae202ed8d9bcaa409f6e87fb77ed1043d912afd62e24"},
+ {file = "redis-5.1.1.tar.gz", hash = "sha256:f6c997521fedbae53387307c5d0bf784d9acc28d9f1d058abeac566ec4dbed72"},
]
[package.dependencies]
@@ -2150,13 +2167,13 @@ ocsp = ["cryptography (>=36.0.1)", "pyopenssl (==23.2.1)", "requests (>=2.31.0)"
[[package]]
name = "reflex-chakra"
-version = "0.6.1"
+version = "0.6.2"
description = "reflex using chakra components"
optional = false
-python-versions = "<4.0,>=3.8"
+python-versions = "<4.0,>=3.9"
files = [
- {file = "reflex_chakra-0.6.1-py3-none-any.whl", hash = "sha256:824d461264b6d2c836ba4a2a430e677a890b82e83da149672accfc58786442fa"},
- {file = "reflex_chakra-0.6.1.tar.gz", hash = "sha256:4b9b3c8bada19cbb4d1b8d8bc4ab0460ec008a91f380010c34d416d5b613dc07"},
+ {file = "reflex_chakra-0.6.2-py3-none-any.whl", hash = "sha256:b8aa19f39a02601c560b97f4b17f171c0b5980e13a58069e3a5dd0999e362e4f"},
+ {file = "reflex_chakra-0.6.2.tar.gz", hash = "sha256:81ddb7f182cc454922cc817312755b799d4e1a49a46ef2e81305052dc76ef86d"},
]
[package.dependencies]
@@ -2236,13 +2253,13 @@ idna2008 = ["idna"]
[[package]]
name = "rich"
-version = "13.9.1"
+version = "13.9.2"
description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal"
optional = false
python-versions = ">=3.8.0"
files = [
- {file = "rich-13.9.1-py3-none-any.whl", hash = "sha256:b340e739f30aa58921dc477b8adaa9ecdb7cecc217be01d93730ee1bc8aa83be"},
- {file = "rich-13.9.1.tar.gz", hash = "sha256:097cffdf85db1babe30cc7deba5ab3a29e1b9885047dab24c57e9a7f8a9c1466"},
+ {file = "rich-13.9.2-py3-none-any.whl", hash = "sha256:8c82a3d3f8dcfe9e734771313e606b39d8247bb6b826e196f4914b333b743cf1"},
+ {file = "rich-13.9.2.tar.gz", hash = "sha256:51a2c62057461aaf7152b4d611168f93a9fc73068f8ded2790f29fe2b5366d0c"},
]
[package.dependencies]
@@ -2255,28 +2272,29 @@ jupyter = ["ipywidgets (>=7.5.1,<9)"]
[[package]]
name = "ruff"
-version = "0.4.10"
+version = "0.6.9"
description = "An extremely fast Python linter and code formatter, written in Rust."
optional = false
python-versions = ">=3.7"
files = [
- {file = "ruff-0.4.10-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:5c2c4d0859305ac5a16310eec40e4e9a9dec5dcdfbe92697acd99624e8638dac"},
- {file = "ruff-0.4.10-py3-none-macosx_11_0_arm64.whl", hash = "sha256:a79489607d1495685cdd911a323a35871abfb7a95d4f98fc6f85e799227ac46e"},
- {file = "ruff-0.4.10-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b1dd1681dfa90a41b8376a61af05cc4dc5ff32c8f14f5fe20dba9ff5deb80cd6"},
- {file = "ruff-0.4.10-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:c75c53bb79d71310dc79fb69eb4902fba804a81f374bc86a9b117a8d077a1784"},
- {file = "ruff-0.4.10-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:18238c80ee3d9100d3535d8eb15a59c4a0753b45cc55f8bf38f38d6a597b9739"},
- {file = "ruff-0.4.10-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:d8f71885bce242da344989cae08e263de29752f094233f932d4f5cfb4ef36a81"},
- {file = "ruff-0.4.10-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:330421543bd3222cdfec481e8ff3460e8702ed1e58b494cf9d9e4bf90db52b9d"},
- {file = "ruff-0.4.10-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9e9b6fb3a37b772628415b00c4fc892f97954275394ed611056a4b8a2631365e"},
- {file = "ruff-0.4.10-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0f54c481b39a762d48f64d97351048e842861c6662d63ec599f67d515cb417f6"},
- {file = "ruff-0.4.10-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:67fe086b433b965c22de0b4259ddfe6fa541c95bf418499bedb9ad5fb8d1c631"},
- {file = "ruff-0.4.10-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:acfaaab59543382085f9eb51f8e87bac26bf96b164839955f244d07125a982ef"},
- {file = "ruff-0.4.10-py3-none-musllinux_1_2_i686.whl", hash = "sha256:3cea07079962b2941244191569cf3a05541477286f5cafea638cd3aa94b56815"},
- {file = "ruff-0.4.10-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:338a64ef0748f8c3a80d7f05785930f7965d71ca260904a9321d13be24b79695"},
- {file = "ruff-0.4.10-py3-none-win32.whl", hash = "sha256:ffe3cd2f89cb54561c62e5fa20e8f182c0a444934bf430515a4b422f1ab7b7ca"},
- {file = "ruff-0.4.10-py3-none-win_amd64.whl", hash = "sha256:67f67cef43c55ffc8cc59e8e0b97e9e60b4837c8f21e8ab5ffd5d66e196e25f7"},
- {file = "ruff-0.4.10-py3-none-win_arm64.whl", hash = "sha256:dd1fcee327c20addac7916ca4e2653fbbf2e8388d8a6477ce5b4e986b68ae6c0"},
- {file = "ruff-0.4.10.tar.gz", hash = "sha256:3aa4f2bc388a30d346c56524f7cacca85945ba124945fe489952aadb6b5cd804"},
+ {file = "ruff-0.6.9-py3-none-linux_armv6l.whl", hash = "sha256:064df58d84ccc0ac0fcd63bc3090b251d90e2a372558c0f057c3f75ed73e1ccd"},
+ {file = "ruff-0.6.9-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:140d4b5c9f5fc7a7b074908a78ab8d384dd7f6510402267bc76c37195c02a7ec"},
+ {file = "ruff-0.6.9-py3-none-macosx_11_0_arm64.whl", hash = "sha256:53fd8ca5e82bdee8da7f506d7b03a261f24cd43d090ea9db9a1dc59d9313914c"},
+ {file = "ruff-0.6.9-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:645d7d8761f915e48a00d4ecc3686969761df69fb561dd914a773c1a8266e14e"},
+ {file = "ruff-0.6.9-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:eae02b700763e3847595b9d2891488989cac00214da7f845f4bcf2989007d577"},
+ {file = "ruff-0.6.9-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7d5ccc9e58112441de8ad4b29dcb7a86dc25c5f770e3c06a9d57e0e5eba48829"},
+ {file = "ruff-0.6.9-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:417b81aa1c9b60b2f8edc463c58363075412866ae4e2b9ab0f690dc1e87ac1b5"},
+ {file = "ruff-0.6.9-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3c866b631f5fbce896a74a6e4383407ba7507b815ccc52bcedabb6810fdb3ef7"},
+ {file = "ruff-0.6.9-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7b118afbb3202f5911486ad52da86d1d52305b59e7ef2031cea3425142b97d6f"},
+ {file = "ruff-0.6.9-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a67267654edc23c97335586774790cde402fb6bbdb3c2314f1fc087dee320bfa"},
+ {file = "ruff-0.6.9-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:3ef0cc774b00fec123f635ce5c547dac263f6ee9fb9cc83437c5904183b55ceb"},
+ {file = "ruff-0.6.9-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:12edd2af0c60fa61ff31cefb90aef4288ac4d372b4962c2864aeea3a1a2460c0"},
+ {file = "ruff-0.6.9-py3-none-musllinux_1_2_i686.whl", hash = "sha256:55bb01caeaf3a60b2b2bba07308a02fca6ab56233302406ed5245180a05c5625"},
+ {file = "ruff-0.6.9-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:925d26471fa24b0ce5a6cdfab1bb526fb4159952385f386bdcc643813d472039"},
+ {file = "ruff-0.6.9-py3-none-win32.whl", hash = "sha256:eb61ec9bdb2506cffd492e05ac40e5bc6284873aceb605503d8494180d6fc84d"},
+ {file = "ruff-0.6.9-py3-none-win_amd64.whl", hash = "sha256:785d31851c1ae91f45b3d8fe23b8ae4b5170089021fbb42402d811135f0b7117"},
+ {file = "ruff-0.6.9-py3-none-win_arm64.whl", hash = "sha256:a9641e31476d601f83cd602608739a0840e348bda93fec9f1ee816f8b6798b93"},
+ {file = "ruff-0.6.9.tar.gz", hash = "sha256:b076ef717a8e5bc819514ee1d602bbdca5b4420ae13a9cf61a0c0a4f53a2baa2"},
]
[[package]]
@@ -2315,18 +2333,23 @@ websocket-client = ">=1.8,<2.0"
[[package]]
name = "setuptools"
-version = "70.1.1"
+version = "75.2.0"
description = "Easily download, build, install, upgrade, and uninstall Python packages"
optional = false
python-versions = ">=3.8"
files = [
- {file = "setuptools-70.1.1-py3-none-any.whl", hash = "sha256:a58a8fde0541dab0419750bcc521fbdf8585f6e5cb41909df3a472ef7b81ca95"},
- {file = "setuptools-70.1.1.tar.gz", hash = "sha256:937a48c7cdb7a21eb53cd7f9b59e525503aa8abaf3584c730dc5f7a5bec3a650"},
+ {file = "setuptools-75.2.0-py3-none-any.whl", hash = "sha256:a7fcb66f68b4d9e8e66b42f9876150a3371558f98fa32222ffaa5bced76406f8"},
+ {file = "setuptools-75.2.0.tar.gz", hash = "sha256:753bb6ebf1f465a1912e19ed1d41f403a79173a9acf66a42e7e6aec45c3c16ec"},
]
[package.extras]
-docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "pyproject-hooks (!=1.1)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier"]
-testing = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "importlib-metadata", "ini2toml[lite] (>=0.14)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "jaraco.test", "mypy (==1.10.0)", "packaging (>=23.2)", "pip (>=19.1)", "pyproject-hooks (!=1.1)", "pytest (>=6,!=8.1.1)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-home (>=0.5)", "pytest-mypy", "pytest-perf", "pytest-ruff (>=0.3.2)", "pytest-subprocess", "pytest-timeout", "pytest-xdist (>=3)", "tomli", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"]
+check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1)", "ruff (>=0.5.2)"]
+core = ["importlib-metadata (>=6)", "importlib-resources (>=5.10.2)", "jaraco.collections", "jaraco.functools", "jaraco.text (>=3.7)", "more-itertools", "more-itertools (>=8.8)", "packaging", "packaging (>=24)", "platformdirs (>=2.6.2)", "tomli (>=2.0.1)", "wheel (>=0.43.0)"]
+cover = ["pytest-cov"]
+doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "pyproject-hooks (!=1.1)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier", "towncrier (<24.7)"]
+enabler = ["pytest-enabler (>=2.2)"]
+test = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "ini2toml[lite] (>=0.14)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "jaraco.test", "packaging (>=23.2)", "pip (>=19.1)", "pyproject-hooks (!=1.1)", "pytest (>=6,!=8.1.*)", "pytest-home (>=0.5)", "pytest-perf", "pytest-subprocess", "pytest-timeout", "pytest-xdist (>=3)", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel (>=0.44.0)"]
+type = ["importlib-metadata (>=7.0.2)", "jaraco.develop (>=7.21)", "mypy (==1.11.*)", "pytest-mypy"]
[[package]]
name = "shellingham"
@@ -2341,19 +2364,20 @@ files = [
[[package]]
name = "simple-websocket"
-version = "1.0.0"
+version = "1.1.0"
description = "Simple WebSocket server and client for Python"
optional = false
python-versions = ">=3.6"
files = [
- {file = "simple-websocket-1.0.0.tar.gz", hash = "sha256:17d2c72f4a2bd85174a97e3e4c88b01c40c3f81b7b648b0cc3ce1305968928c8"},
- {file = "simple_websocket-1.0.0-py3-none-any.whl", hash = "sha256:1d5bf585e415eaa2083e2bcf02a3ecf91f9712e7b3e6b9fa0b461ad04e0837bc"},
+ {file = "simple_websocket-1.1.0-py3-none-any.whl", hash = "sha256:4af6069630a38ed6c561010f0e11a5bc0d4ca569b36306eb257cd9a192497c8c"},
+ {file = "simple_websocket-1.1.0.tar.gz", hash = "sha256:7939234e7aa067c534abdab3a9ed933ec9ce4691b0713c78acb195560aa52ae4"},
]
[package.dependencies]
wsproto = "*"
[package.extras]
+dev = ["flake8", "pytest", "pytest-cov", "tox"]
docs = ["sphinx"]
[[package]]
@@ -2391,60 +2415,68 @@ files = [
[[package]]
name = "sqlalchemy"
-version = "2.0.35"
+version = "2.0.36"
description = "Database Abstraction Library"
optional = false
python-versions = ">=3.7"
files = [
- {file = "SQLAlchemy-2.0.35-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:67219632be22f14750f0d1c70e62f204ba69d28f62fd6432ba05ab295853de9b"},
- {file = "SQLAlchemy-2.0.35-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:4668bd8faf7e5b71c0319407b608f278f279668f358857dbfd10ef1954ac9f90"},
- {file = "SQLAlchemy-2.0.35-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cb8bea573863762bbf45d1e13f87c2d2fd32cee2dbd50d050f83f87429c9e1ea"},
- {file = "SQLAlchemy-2.0.35-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f552023710d4b93d8fb29a91fadf97de89c5926c6bd758897875435f2a939f33"},
- {file = "SQLAlchemy-2.0.35-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:016b2e665f778f13d3c438651dd4de244214b527a275e0acf1d44c05bc6026a9"},
- {file = "SQLAlchemy-2.0.35-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:7befc148de64b6060937231cbff8d01ccf0bfd75aa26383ffdf8d82b12ec04ff"},
- {file = "SQLAlchemy-2.0.35-cp310-cp310-win32.whl", hash = "sha256:22b83aed390e3099584b839b93f80a0f4a95ee7f48270c97c90acd40ee646f0b"},
- {file = "SQLAlchemy-2.0.35-cp310-cp310-win_amd64.whl", hash = "sha256:a29762cd3d116585278ffb2e5b8cc311fb095ea278b96feef28d0b423154858e"},
- {file = "SQLAlchemy-2.0.35-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:e21f66748ab725ade40fa7af8ec8b5019c68ab00b929f6643e1b1af461eddb60"},
- {file = "SQLAlchemy-2.0.35-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:8a6219108a15fc6d24de499d0d515c7235c617b2540d97116b663dade1a54d62"},
- {file = "SQLAlchemy-2.0.35-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:042622a5306c23b972192283f4e22372da3b8ddf5f7aac1cc5d9c9b222ab3ff6"},
- {file = "SQLAlchemy-2.0.35-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:627dee0c280eea91aed87b20a1f849e9ae2fe719d52cbf847c0e0ea34464b3f7"},
- {file = "SQLAlchemy-2.0.35-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:4fdcd72a789c1c31ed242fd8c1bcd9ea186a98ee8e5408a50e610edfef980d71"},
- {file = "SQLAlchemy-2.0.35-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:89b64cd8898a3a6f642db4eb7b26d1b28a497d4022eccd7717ca066823e9fb01"},
- {file = "SQLAlchemy-2.0.35-cp311-cp311-win32.whl", hash = "sha256:6a93c5a0dfe8d34951e8a6f499a9479ffb9258123551fa007fc708ae2ac2bc5e"},
- {file = "SQLAlchemy-2.0.35-cp311-cp311-win_amd64.whl", hash = "sha256:c68fe3fcde03920c46697585620135b4ecfdfc1ed23e75cc2c2ae9f8502c10b8"},
- {file = "SQLAlchemy-2.0.35-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:eb60b026d8ad0c97917cb81d3662d0b39b8ff1335e3fabb24984c6acd0c900a2"},
- {file = "SQLAlchemy-2.0.35-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6921ee01caf375363be5e9ae70d08ce7ca9d7e0e8983183080211a062d299468"},
- {file = "SQLAlchemy-2.0.35-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8cdf1a0dbe5ced887a9b127da4ffd7354e9c1a3b9bb330dce84df6b70ccb3a8d"},
- {file = "SQLAlchemy-2.0.35-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:93a71c8601e823236ac0e5d087e4f397874a421017b3318fd92c0b14acf2b6db"},
- {file = "SQLAlchemy-2.0.35-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:e04b622bb8a88f10e439084486f2f6349bf4d50605ac3e445869c7ea5cf0fa8c"},
- {file = "SQLAlchemy-2.0.35-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:1b56961e2d31389aaadf4906d453859f35302b4eb818d34a26fab72596076bb8"},
- {file = "SQLAlchemy-2.0.35-cp312-cp312-win32.whl", hash = "sha256:0f9f3f9a3763b9c4deb8c5d09c4cc52ffe49f9876af41cc1b2ad0138878453cf"},
- {file = "SQLAlchemy-2.0.35-cp312-cp312-win_amd64.whl", hash = "sha256:25b0f63e7fcc2a6290cb5f7f5b4fc4047843504983a28856ce9b35d8f7de03cc"},
- {file = "SQLAlchemy-2.0.35-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:f021d334f2ca692523aaf7bbf7592ceff70c8594fad853416a81d66b35e3abf9"},
- {file = "SQLAlchemy-2.0.35-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:05c3f58cf91683102f2f0265c0db3bd3892e9eedabe059720492dbaa4f922da1"},
- {file = "SQLAlchemy-2.0.35-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:032d979ce77a6c2432653322ba4cbeabf5a6837f704d16fa38b5a05d8e21fa00"},
- {file = "SQLAlchemy-2.0.35-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:2e795c2f7d7249b75bb5f479b432a51b59041580d20599d4e112b5f2046437a3"},
- {file = "SQLAlchemy-2.0.35-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:cc32b2990fc34380ec2f6195f33a76b6cdaa9eecf09f0c9404b74fc120aef36f"},
- {file = "SQLAlchemy-2.0.35-cp37-cp37m-win32.whl", hash = "sha256:9509c4123491d0e63fb5e16199e09f8e262066e58903e84615c301dde8fa2e87"},
- {file = "SQLAlchemy-2.0.35-cp37-cp37m-win_amd64.whl", hash = "sha256:3655af10ebcc0f1e4e06c5900bb33e080d6a1fa4228f502121f28a3b1753cde5"},
- {file = "SQLAlchemy-2.0.35-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:4c31943b61ed8fdd63dfd12ccc919f2bf95eefca133767db6fbbd15da62078ec"},
- {file = "SQLAlchemy-2.0.35-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:a62dd5d7cc8626a3634208df458c5fe4f21200d96a74d122c83bc2015b333bc1"},
- {file = "SQLAlchemy-2.0.35-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0630774b0977804fba4b6bbea6852ab56c14965a2b0c7fc7282c5f7d90a1ae72"},
- {file = "SQLAlchemy-2.0.35-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8d625eddf7efeba2abfd9c014a22c0f6b3796e0ffb48f5d5ab106568ef01ff5a"},
- {file = "SQLAlchemy-2.0.35-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:ada603db10bb865bbe591939de854faf2c60f43c9b763e90f653224138f910d9"},
- {file = "SQLAlchemy-2.0.35-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:c41411e192f8d3ea39ea70e0fae48762cd11a2244e03751a98bd3c0ca9a4e936"},
- {file = "SQLAlchemy-2.0.35-cp38-cp38-win32.whl", hash = "sha256:d299797d75cd747e7797b1b41817111406b8b10a4f88b6e8fe5b5e59598b43b0"},
- {file = "SQLAlchemy-2.0.35-cp38-cp38-win_amd64.whl", hash = "sha256:0375a141e1c0878103eb3d719eb6d5aa444b490c96f3fedab8471c7f6ffe70ee"},
- {file = "SQLAlchemy-2.0.35-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:ccae5de2a0140d8be6838c331604f91d6fafd0735dbdcee1ac78fc8fbaba76b4"},
- {file = "SQLAlchemy-2.0.35-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:2a275a806f73e849e1c309ac11108ea1a14cd7058577aba962cd7190e27c9e3c"},
- {file = "SQLAlchemy-2.0.35-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:732e026240cdd1c1b2e3ac515c7a23820430ed94292ce33806a95869c46bd139"},
- {file = "SQLAlchemy-2.0.35-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:890da8cd1941fa3dab28c5bac3b9da8502e7e366f895b3b8e500896f12f94d11"},
- {file = "SQLAlchemy-2.0.35-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:c0d8326269dbf944b9201911b0d9f3dc524d64779a07518199a58384c3d37a44"},
- {file = "SQLAlchemy-2.0.35-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:b76d63495b0508ab9fc23f8152bac63205d2a704cd009a2b0722f4c8e0cba8e0"},
- {file = "SQLAlchemy-2.0.35-cp39-cp39-win32.whl", hash = "sha256:69683e02e8a9de37f17985905a5eca18ad651bf592314b4d3d799029797d0eb3"},
- {file = "SQLAlchemy-2.0.35-cp39-cp39-win_amd64.whl", hash = "sha256:aee110e4ef3c528f3abbc3c2018c121e708938adeeff9006428dd7c8555e9b3f"},
- {file = "SQLAlchemy-2.0.35-py3-none-any.whl", hash = "sha256:2ab3f0336c0387662ce6221ad30ab3a5e6499aab01b9790879b6578fd9b8faa1"},
- {file = "sqlalchemy-2.0.35.tar.gz", hash = "sha256:e11d7ea4d24f0a262bccf9a7cd6284c976c5369dac21db237cff59586045ab9f"},
+ {file = "SQLAlchemy-2.0.36-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:59b8f3adb3971929a3e660337f5dacc5942c2cdb760afcabb2614ffbda9f9f72"},
+ {file = "SQLAlchemy-2.0.36-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:37350015056a553e442ff672c2d20e6f4b6d0b2495691fa239d8aa18bb3bc908"},
+ {file = "SQLAlchemy-2.0.36-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8318f4776c85abc3f40ab185e388bee7a6ea99e7fa3a30686580b209eaa35c08"},
+ {file = "SQLAlchemy-2.0.36-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c245b1fbade9c35e5bd3b64270ab49ce990369018289ecfde3f9c318411aaa07"},
+ {file = "SQLAlchemy-2.0.36-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:69f93723edbca7342624d09f6704e7126b152eaed3cdbb634cb657a54332a3c5"},
+ {file = "SQLAlchemy-2.0.36-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:f9511d8dd4a6e9271d07d150fb2f81874a3c8c95e11ff9af3a2dfc35fe42ee44"},
+ {file = "SQLAlchemy-2.0.36-cp310-cp310-win32.whl", hash = "sha256:c3f3631693003d8e585d4200730616b78fafd5a01ef8b698f6967da5c605b3fa"},
+ {file = "SQLAlchemy-2.0.36-cp310-cp310-win_amd64.whl", hash = "sha256:a86bfab2ef46d63300c0f06936bd6e6c0105faa11d509083ba8f2f9d237fb5b5"},
+ {file = "SQLAlchemy-2.0.36-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:fd3a55deef00f689ce931d4d1b23fa9f04c880a48ee97af488fd215cf24e2a6c"},
+ {file = "SQLAlchemy-2.0.36-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:4f5e9cd989b45b73bd359f693b935364f7e1f79486e29015813c338450aa5a71"},
+ {file = "SQLAlchemy-2.0.36-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d0ddd9db6e59c44875211bc4c7953a9f6638b937b0a88ae6d09eb46cced54eff"},
+ {file = "SQLAlchemy-2.0.36-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2519f3a5d0517fc159afab1015e54bb81b4406c278749779be57a569d8d1bb0d"},
+ {file = "SQLAlchemy-2.0.36-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:59b1ee96617135f6e1d6f275bbe988f419c5178016f3d41d3c0abb0c819f75bb"},
+ {file = "SQLAlchemy-2.0.36-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:39769a115f730d683b0eb7b694db9789267bcd027326cccc3125e862eb03bfd8"},
+ {file = "SQLAlchemy-2.0.36-cp311-cp311-win32.whl", hash = "sha256:66bffbad8d6271bb1cc2f9a4ea4f86f80fe5e2e3e501a5ae2a3dc6a76e604e6f"},
+ {file = "SQLAlchemy-2.0.36-cp311-cp311-win_amd64.whl", hash = "sha256:23623166bfefe1487d81b698c423f8678e80df8b54614c2bf4b4cfcd7c711959"},
+ {file = "SQLAlchemy-2.0.36-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:f7b64e6ec3f02c35647be6b4851008b26cff592a95ecb13b6788a54ef80bbdd4"},
+ {file = "SQLAlchemy-2.0.36-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:46331b00096a6db1fdc052d55b101dbbfc99155a548e20a0e4a8e5e4d1362855"},
+ {file = "SQLAlchemy-2.0.36-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fdf3386a801ea5aba17c6410dd1dc8d39cf454ca2565541b5ac42a84e1e28f53"},
+ {file = "SQLAlchemy-2.0.36-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ac9dfa18ff2a67b09b372d5db8743c27966abf0e5344c555d86cc7199f7ad83a"},
+ {file = "SQLAlchemy-2.0.36-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:90812a8933df713fdf748b355527e3af257a11e415b613dd794512461eb8a686"},
+ {file = "SQLAlchemy-2.0.36-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:1bc330d9d29c7f06f003ab10e1eaced295e87940405afe1b110f2eb93a233588"},
+ {file = "SQLAlchemy-2.0.36-cp312-cp312-win32.whl", hash = "sha256:79d2e78abc26d871875b419e1fd3c0bca31a1cb0043277d0d850014599626c2e"},
+ {file = "SQLAlchemy-2.0.36-cp312-cp312-win_amd64.whl", hash = "sha256:b544ad1935a8541d177cb402948b94e871067656b3a0b9e91dbec136b06a2ff5"},
+ {file = "SQLAlchemy-2.0.36-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:b5cc79df7f4bc3d11e4b542596c03826063092611e481fcf1c9dfee3c94355ef"},
+ {file = "SQLAlchemy-2.0.36-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:3c01117dd36800f2ecaa238c65365b7b16497adc1522bf84906e5710ee9ba0e8"},
+ {file = "SQLAlchemy-2.0.36-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9bc633f4ee4b4c46e7adcb3a9b5ec083bf1d9a97c1d3854b92749d935de40b9b"},
+ {file = "SQLAlchemy-2.0.36-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9e46ed38affdfc95d2c958de328d037d87801cfcbea6d421000859e9789e61c2"},
+ {file = "SQLAlchemy-2.0.36-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:b2985c0b06e989c043f1dc09d4fe89e1616aadd35392aea2844f0458a989eacf"},
+ {file = "SQLAlchemy-2.0.36-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:4a121d62ebe7d26fec9155f83f8be5189ef1405f5973ea4874a26fab9f1e262c"},
+ {file = "SQLAlchemy-2.0.36-cp313-cp313-win32.whl", hash = "sha256:0572f4bd6f94752167adfd7c1bed84f4b240ee6203a95e05d1e208d488d0d436"},
+ {file = "SQLAlchemy-2.0.36-cp313-cp313-win_amd64.whl", hash = "sha256:8c78ac40bde930c60e0f78b3cd184c580f89456dd87fc08f9e3ee3ce8765ce88"},
+ {file = "SQLAlchemy-2.0.36-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:be9812b766cad94a25bc63bec11f88c4ad3629a0cec1cd5d4ba48dc23860486b"},
+ {file = "SQLAlchemy-2.0.36-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:50aae840ebbd6cdd41af1c14590e5741665e5272d2fee999306673a1bb1fdb4d"},
+ {file = "SQLAlchemy-2.0.36-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4557e1f11c5f653ebfdd924f3f9d5ebfc718283b0b9beebaa5dd6b77ec290971"},
+ {file = "SQLAlchemy-2.0.36-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:07b441f7d03b9a66299ce7ccf3ef2900abc81c0db434f42a5694a37bd73870f2"},
+ {file = "SQLAlchemy-2.0.36-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:28120ef39c92c2dd60f2721af9328479516844c6b550b077ca450c7d7dc68575"},
+ {file = "SQLAlchemy-2.0.36-cp37-cp37m-win32.whl", hash = "sha256:b81ee3d84803fd42d0b154cb6892ae57ea6b7c55d8359a02379965706c7efe6c"},
+ {file = "SQLAlchemy-2.0.36-cp37-cp37m-win_amd64.whl", hash = "sha256:f942a799516184c855e1a32fbc7b29d7e571b52612647866d4ec1c3242578fcb"},
+ {file = "SQLAlchemy-2.0.36-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:3d6718667da04294d7df1670d70eeddd414f313738d20a6f1d1f379e3139a545"},
+ {file = "SQLAlchemy-2.0.36-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:72c28b84b174ce8af8504ca28ae9347d317f9dba3999e5981a3cd441f3712e24"},
+ {file = "SQLAlchemy-2.0.36-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b11d0cfdd2b095e7b0686cf5fabeb9c67fae5b06d265d8180715b8cfa86522e3"},
+ {file = "SQLAlchemy-2.0.36-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e32092c47011d113dc01ab3e1d3ce9f006a47223b18422c5c0d150af13a00687"},
+ {file = "SQLAlchemy-2.0.36-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:6a440293d802d3011028e14e4226da1434b373cbaf4a4bbb63f845761a708346"},
+ {file = "SQLAlchemy-2.0.36-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:c54a1e53a0c308a8e8a7dffb59097bff7facda27c70c286f005327f21b2bd6b1"},
+ {file = "SQLAlchemy-2.0.36-cp38-cp38-win32.whl", hash = "sha256:1e0d612a17581b6616ff03c8e3d5eff7452f34655c901f75d62bd86449d9750e"},
+ {file = "SQLAlchemy-2.0.36-cp38-cp38-win_amd64.whl", hash = "sha256:8958b10490125124463095bbdadda5aa22ec799f91958e410438ad6c97a7b793"},
+ {file = "SQLAlchemy-2.0.36-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:dc022184d3e5cacc9579e41805a681187650e170eb2fd70e28b86192a479dcaa"},
+ {file = "SQLAlchemy-2.0.36-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:b817d41d692bf286abc181f8af476c4fbef3fd05e798777492618378448ee689"},
+ {file = "SQLAlchemy-2.0.36-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a4e46a888b54be23d03a89be510f24a7652fe6ff660787b96cd0e57a4ebcb46d"},
+ {file = "SQLAlchemy-2.0.36-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c4ae3005ed83f5967f961fd091f2f8c5329161f69ce8480aa8168b2d7fe37f06"},
+ {file = "SQLAlchemy-2.0.36-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:03e08af7a5f9386a43919eda9de33ffda16b44eb11f3b313e6822243770e9763"},
+ {file = "SQLAlchemy-2.0.36-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:3dbb986bad3ed5ceaf090200eba750b5245150bd97d3e67343a3cfed06feecf7"},
+ {file = "SQLAlchemy-2.0.36-cp39-cp39-win32.whl", hash = "sha256:9fe53b404f24789b5ea9003fc25b9a3988feddebd7e7b369c8fac27ad6f52f28"},
+ {file = "SQLAlchemy-2.0.36-cp39-cp39-win_amd64.whl", hash = "sha256:af148a33ff0349f53512a049c6406923e4e02bf2f26c5fb285f143faf4f0e46a"},
+ {file = "SQLAlchemy-2.0.36-py3-none-any.whl", hash = "sha256:fddbe92b4760c6f5d48162aef14824add991aeda8ddadb3c31d56eb15ca69f8e"},
+ {file = "sqlalchemy-2.0.36.tar.gz", hash = "sha256:7f2767680b6d2398aea7082e45a774b2b0767b5c8d8ffb9c8b683088ea9b29c5"},
]
[package.dependencies]
@@ -2457,7 +2489,7 @@ aioodbc = ["aioodbc", "greenlet (!=0.4.17)"]
aiosqlite = ["aiosqlite", "greenlet (!=0.4.17)", "typing_extensions (!=3.10.0.1)"]
asyncio = ["greenlet (!=0.4.17)"]
asyncmy = ["asyncmy (>=0.2.3,!=0.2.4,!=0.2.6)", "greenlet (!=0.4.17)"]
-mariadb-connector = ["mariadb (>=1.0.1,!=1.1.2,!=1.1.5)"]
+mariadb-connector = ["mariadb (>=1.0.1,!=1.1.2,!=1.1.5,!=1.1.10)"]
mssql = ["pyodbc"]
mssql-pymssql = ["pymssql"]
mssql-pyodbc = ["pyodbc"]
@@ -2493,13 +2525,13 @@ SQLAlchemy = ">=2.0.14,<2.1.0"
[[package]]
name = "starlette"
-version = "0.38.6"
+version = "0.40.0"
description = "The little ASGI library that shines."
optional = false
python-versions = ">=3.8"
files = [
- {file = "starlette-0.38.6-py3-none-any.whl", hash = "sha256:4517a1409e2e73ee4951214ba012052b9e16f60e90d73cfb06192c19203bbb05"},
- {file = "starlette-0.38.6.tar.gz", hash = "sha256:863a1588f5574e70a821dadefb41e4881ea451a47a3cd1b4df359d4ffefe5ead"},
+ {file = "starlette-0.40.0-py3-none-any.whl", hash = "sha256:c494a22fae73805376ea6bf88439783ecfba9aac88a43911b48c653437e784c4"},
+ {file = "starlette-0.40.0.tar.gz", hash = "sha256:1a3139688fb298ce5e2d661d37046a66ad996ce94be4d4983be019a23a04ea35"},
]
[package.dependencies]
@@ -2607,13 +2639,13 @@ files = [
[[package]]
name = "trio"
-version = "0.26.2"
+version = "0.27.0"
description = "A friendly Python library for async concurrency and I/O"
optional = false
python-versions = ">=3.8"
files = [
- {file = "trio-0.26.2-py3-none-any.whl", hash = "sha256:c5237e8133eb0a1d72f09a971a55c28ebe69e351c783fc64bc37db8db8bbe1d0"},
- {file = "trio-0.26.2.tar.gz", hash = "sha256:0346c3852c15e5c7d40ea15972c4805689ef2cb8b5206f794c9c19450119f3a4"},
+ {file = "trio-0.27.0-py3-none-any.whl", hash = "sha256:68eabbcf8f457d925df62da780eff15ff5dc68fd6b367e2dde59f7aaf2a0b884"},
+ {file = "trio-0.27.0.tar.gz", hash = "sha256:1dcc95ab1726b2da054afea8fd761af74bad79bd52381b84eae408e983c76831"},
]
[package.dependencies]
@@ -2724,13 +2756,13 @@ zstd = ["zstandard (>=0.18.0)"]
[[package]]
name = "uvicorn"
-version = "0.31.0"
+version = "0.32.0"
description = "The lightning-fast ASGI server."
optional = false
python-versions = ">=3.8"
files = [
- {file = "uvicorn-0.31.0-py3-none-any.whl", hash = "sha256:cac7be4dd4d891c363cd942160a7b02e69150dcbc7a36be04d5f4af4b17c8ced"},
- {file = "uvicorn-0.31.0.tar.gz", hash = "sha256:13bc21373d103859f68fe739608e2eb054a816dea79189bc3ca08ea89a275906"},
+ {file = "uvicorn-0.32.0-py3-none-any.whl", hash = "sha256:60b8f3a5ac027dcd31448f411ced12b5ef452c646f76f02f8cc3f25d8d26fd82"},
+ {file = "uvicorn-0.32.0.tar.gz", hash = "sha256:f78b36b143c16f54ccdb8190d0a26b5f1901fe5a3c777e1ab29f26391af8551e"},
]
[package.dependencies]
@@ -2743,13 +2775,13 @@ standard = ["colorama (>=0.4)", "httptools (>=0.5.0)", "python-dotenv (>=0.13)",
[[package]]
name = "virtualenv"
-version = "20.26.6"
+version = "20.27.0"
description = "Virtual Python Environment builder"
optional = false
-python-versions = ">=3.7"
+python-versions = ">=3.8"
files = [
- {file = "virtualenv-20.26.6-py3-none-any.whl", hash = "sha256:7345cc5b25405607a624d8418154577459c3e0277f5466dd79c49d5e492995f2"},
- {file = "virtualenv-20.26.6.tar.gz", hash = "sha256:280aede09a2a5c317e409a00102e7077c6432c5a38f0ef938e643805a7ad2c48"},
+ {file = "virtualenv-20.27.0-py3-none-any.whl", hash = "sha256:44a72c29cceb0ee08f300b314848c86e57bf8d1f13107a5e671fb9274138d655"},
+ {file = "virtualenv-20.27.0.tar.gz", hash = "sha256:2ca56a68ed615b8fe4326d11a0dca5dfbe8fd68510fb6c6349163bed3c15f2b2"},
]
[package.dependencies]
@@ -3001,4 +3033,4 @@ type = ["pytest-mypy"]
[metadata]
lock-version = "2.0"
python-versions = "^3.9"
-content-hash = "e4b462ebfae90550ba7fa49b360d7110c0d344ee616c23989c22d866ef8f6f31"
+content-hash = "edb7145394dd61f5a665b5519cc0c091c8c1628200ea1170857cff1a6bdb829e"
diff --git a/pyproject.toml b/pyproject.toml
index 7d79ddf2f..d4f583189 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "reflex"
-version = "0.6.3dev1"
+version = "0.6.4dev1"
description = "Web apps in pure Python."
license = "Apache-2.0"
authors = [
@@ -53,7 +53,7 @@ reflex-hosting-cli = ">=0.1.2,<2.0"
charset-normalizer = ">=3.3.2,<4.0"
wheel = ">=0.42.0,<1.0"
build = ">=1.0.3,<2.0"
-setuptools = ">=69.1.1,<70.2"
+setuptools = ">=75.0"
httpx = ">=0.25.1,<1.0"
twine = ">=4.0.0,<6.0"
tomlkit = ">=0.12.4,<1.0"
@@ -61,16 +61,16 @@ lazy_loader = ">=0.4"
reflex-chakra = ">=0.6.0"
[tool.poetry.group.dev.dependencies]
-pytest = ">=7.1.2,<8.0"
+pytest = ">=7.1.2,<9.0"
pytest-mock = ">=3.10.0,<4.0"
pyright = ">=1.1.229,<1.1.335"
darglint = ">=1.8.1,<2.0"
toml = ">=0.10.2,<1.0"
-pytest-asyncio = ">=0.20.1,<0.22.0" # https://github.com/pytest-dev/pytest-asyncio/issues/706
-pytest-cov = ">=4.0.0,<5.0"
-ruff = "^0.4.9"
+pytest-asyncio = ">=0.24.0"
+pytest-cov = ">=4.0.0,<6.0"
+ruff = "^0.6.9"
pandas = ">=2.1.1,<3.0"
-pillow = ">=10.0.0,<11.0"
+pillow = ">=10.0.0,<12.0"
plotly = ">=5.13.0,<6.0"
asynctest = ">=0.13.0,<1.0"
pre-commit = ">=3.2.1"
@@ -100,3 +100,7 @@ lint.pydocstyle.convention = "google"
"reflex/.templates/*.py" = ["D100", "D103", "D104"]
"*.pyi" = ["D301", "D415", "D417", "D418", "E742"]
"*/blank.py" = ["I001"]
+
+[tool.pytest.ini_options]
+asyncio_default_fixture_loop_scope = "function"
+asyncio_mode = "auto"
\ No newline at end of file
diff --git a/reflex/__init__.py b/reflex/__init__.py
index 63de1f386..ad51d2cf4 100644
--- a/reflex/__init__.py
+++ b/reflex/__init__.py
@@ -89,6 +89,8 @@ from reflex.utils import (
lazy_loader,
)
+from .event import event as event
+
# import this here explicitly to avoid returning the page module since page attr has the
# same name as page module(page.py)
from .page import page as page
@@ -331,12 +333,11 @@ _MAPPING: dict = {
"style": ["Style", "toggle_color_mode"],
"utils.imports": ["ImportVar"],
"utils.serializers": ["serializer"],
- "vars": ["Var"],
+ "vars": ["Var", "field", "Field"],
}
_SUBMODULES: set[str] = {
"components",
- "event",
"app",
"style",
"admin",
diff --git a/reflex/__init__.pyi b/reflex/__init__.pyi
index ef5bcfd8f..d928778d8 100644
--- a/reflex/__init__.pyi
+++ b/reflex/__init__.pyi
@@ -11,7 +11,6 @@ from . import base as base
from . import compiler as compiler
from . import components as components
from . import config as config
-from . import event as event
from . import model as model
from . import style as style
from . import testing as testing
@@ -161,6 +160,7 @@ from .event import clear_local_storage as clear_local_storage
from .event import clear_session_storage as clear_session_storage
from .event import console_log as console_log
from .event import download as download
+from .event import event as event
from .event import prevent_default as prevent_default
from .event import redirect as redirect
from .event import remove_cookie as remove_cookie
@@ -189,7 +189,9 @@ from .style import Style as Style
from .style import toggle_color_mode as toggle_color_mode
from .utils.imports import ImportVar as ImportVar
from .utils.serializers import serializer as serializer
+from .vars import Field as Field
from .vars import Var as Var
+from .vars import field as field
del compat
RADIX_THEMES_MAPPING: dict
diff --git a/reflex/app.py b/reflex/app.py
index d4103bb18..6ea344454 100644
--- a/reflex/app.py
+++ b/reflex/app.py
@@ -69,7 +69,7 @@ from reflex.components.core.client_side_routing import (
)
from reflex.components.core.upload import Upload, get_upload_dir
from reflex.components.radix import themes
-from reflex.config import get_config
+from reflex.config import environment, get_config
from reflex.event import Event, EventHandler, EventSpec, window_alert
from reflex.model import Model, get_db_status
from reflex.page import (
@@ -919,15 +919,16 @@ class App(MiddlewareMixin, LifespanMixin, Base):
executor = None
if (
platform.system() in ("Linux", "Darwin")
- and os.environ.get("REFLEX_COMPILE_PROCESSES") is not None
+ and (number_of_processes := environment.REFLEX_COMPILE_PROCESSES)
+ is not None
):
executor = concurrent.futures.ProcessPoolExecutor(
- max_workers=int(os.environ.get("REFLEX_COMPILE_PROCESSES", 0)) or None,
+ max_workers=number_of_processes,
mp_context=multiprocessing.get_context("fork"),
)
else:
executor = concurrent.futures.ThreadPoolExecutor(
- max_workers=int(os.environ.get("REFLEX_COMPILE_THREADS", 0)) or None,
+ max_workers=environment.REFLEX_COMPILE_THREADS
)
for route, component in self.pages.items():
@@ -945,6 +946,21 @@ class App(MiddlewareMixin, LifespanMixin, Base):
pages_results = []
+ for route, component in self.pages.items():
+ component._add_style_recursive(self.style, self.theme)
+
+ ExecutorSafeFunctions.COMPONENTS[route] = component
+
+ for route, page in self.unevaluated_pages.items():
+ if route in self.pages:
+ continue
+
+ ExecutorSafeFunctions.UNCOMPILED_PAGES[route] = page
+
+ ExecutorSafeFunctions.STATE = self.state
+
+ pages_results = []
+
with executor:
result_futures = []
pages_futures = []
diff --git a/reflex/compiler/compiler.py b/reflex/compiler/compiler.py
index 8261908e4..816a7e1d4 100644
--- a/reflex/compiler/compiler.py
+++ b/reflex/compiler/compiler.py
@@ -2,7 +2,6 @@
from __future__ import annotations
-import os
from datetime import datetime
from pathlib import Path
from typing import TYPE_CHECKING, Dict, Iterable, Optional, Tuple, Type, Union
@@ -17,7 +16,7 @@ from reflex.components.component import (
CustomComponent,
StatefulComponent,
)
-from reflex.config import get_config
+from reflex.config import environment, get_config
from reflex.state import BaseState
from reflex.style import SYSTEM_COLOR_MODE
from reflex.utils.exec import is_prod_mode
@@ -528,7 +527,7 @@ def remove_tailwind_from_postcss() -> tuple[str, str]:
def purge_web_pages_dir():
"""Empty out .web/pages directory."""
- if not is_prod_mode() and os.environ.get("REFLEX_PERSIST_WEB_DIR"):
+ if not is_prod_mode() and environment.REFLEX_PERSIST_WEB_DIR:
# Skip purging the web directory in dev mode if REFLEX_PERSIST_WEB_DIR is set.
return
diff --git a/reflex/components/base/app_wrap.pyi b/reflex/components/base/app_wrap.pyi
index 29e1e54b1..c4cb45469 100644
--- a/reflex/components/base/app_wrap.pyi
+++ b/reflex/components/base/app_wrap.pyi
@@ -3,10 +3,10 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Optional, Union, overload
+from typing import Any, Dict, Optional, Union, overload
from reflex.components.base.fragment import Fragment
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -22,41 +22,21 @@ class AppWrap(Fragment):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "AppWrap":
"""Create a new AppWrap component.
diff --git a/reflex/components/base/body.pyi b/reflex/components/base/body.pyi
index d638a5f3e..74f3333e5 100644
--- a/reflex/components/base/body.pyi
+++ b/reflex/components/base/body.pyi
@@ -3,10 +3,10 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Optional, Union, overload
+from typing import Any, Dict, Optional, Union, overload
from reflex.components.component import Component
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -22,41 +22,21 @@ class Body(Component):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Body":
"""Create the component.
diff --git a/reflex/components/base/document.pyi b/reflex/components/base/document.pyi
index d9641a0d1..a4a956369 100644
--- a/reflex/components/base/document.pyi
+++ b/reflex/components/base/document.pyi
@@ -3,10 +3,10 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Optional, Union, overload
+from typing import Any, Dict, Optional, Union, overload
from reflex.components.component import Component
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -22,41 +22,21 @@ class NextDocumentLib(Component):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "NextDocumentLib":
"""Create the component.
@@ -89,41 +69,21 @@ class Html(NextDocumentLib):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Html":
"""Create the component.
@@ -155,41 +115,21 @@ class DocumentHead(NextDocumentLib):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "DocumentHead":
"""Create the component.
@@ -221,41 +161,21 @@ class Main(NextDocumentLib):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Main":
"""Create the component.
@@ -287,41 +207,21 @@ class NextScript(NextDocumentLib):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "NextScript":
"""Create the component.
diff --git a/reflex/components/base/error_boundary.pyi b/reflex/components/base/error_boundary.pyi
index 3497f3141..aaf5584e4 100644
--- a/reflex/components/base/error_boundary.pyi
+++ b/reflex/components/base/error_boundary.pyi
@@ -3,10 +3,10 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, List, Optional, Union, overload
+from typing import Any, Dict, List, Optional, Union, overload
from reflex.components.component import Component
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.utils.imports import ImportVar
from reflex.vars.base import Var
@@ -27,42 +27,22 @@ class ErrorBoundary(Component):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_error: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_error: Optional[EventType] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "ErrorBoundary":
"""Create the component.
diff --git a/reflex/components/base/fragment.pyi b/reflex/components/base/fragment.pyi
index 7c7f397db..b49bf4cad 100644
--- a/reflex/components/base/fragment.pyi
+++ b/reflex/components/base/fragment.pyi
@@ -3,10 +3,10 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Optional, Union, overload
+from typing import Any, Dict, Optional, Union, overload
from reflex.components.component import Component
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -22,41 +22,21 @@ class Fragment(Component):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Fragment":
"""Create the component.
diff --git a/reflex/components/base/head.pyi b/reflex/components/base/head.pyi
index 64554a57f..148dbe486 100644
--- a/reflex/components/base/head.pyi
+++ b/reflex/components/base/head.pyi
@@ -3,10 +3,10 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Optional, Union, overload
+from typing import Any, Dict, Optional, Union, overload
from reflex.components.component import Component, MemoizationLeaf
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -22,41 +22,21 @@ class NextHeadLib(Component):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "NextHeadLib":
"""Create the component.
@@ -88,41 +68,21 @@ class Head(NextHeadLib, MemoizationLeaf):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Head":
"""Create a new memoization leaf component.
diff --git a/reflex/components/base/link.pyi b/reflex/components/base/link.pyi
index 6493b012c..61ff66029 100644
--- a/reflex/components/base/link.pyi
+++ b/reflex/components/base/link.pyi
@@ -3,10 +3,10 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Optional, Union, overload
+from typing import Any, Dict, Optional, Union, overload
from reflex.components.component import Component
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -24,41 +24,21 @@ class RawLink(Component):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "RawLink":
"""Create the component.
@@ -99,41 +79,21 @@ class ScriptTag(Component):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "ScriptTag":
"""Create the component.
diff --git a/reflex/components/base/meta.pyi b/reflex/components/base/meta.pyi
index 08b8be65e..e91626cde 100644
--- a/reflex/components/base/meta.pyi
+++ b/reflex/components/base/meta.pyi
@@ -3,10 +3,10 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Optional, Union, overload
+from typing import Any, Dict, Optional, Union, overload
from reflex.components.component import Component
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -23,41 +23,21 @@ class Title(Component):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Title":
"""Create the component.
@@ -94,41 +74,21 @@ class Meta(Component):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Meta":
"""Create the component.
@@ -170,41 +130,21 @@ class Description(Meta):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Description":
"""Create the component.
@@ -246,41 +186,21 @@ class Image(Meta):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Image":
"""Create the component.
diff --git a/reflex/components/base/script.py b/reflex/components/base/script.py
index 0eba03f49..eb37d53e7 100644
--- a/reflex/components/base/script.py
+++ b/reflex/components/base/script.py
@@ -8,7 +8,7 @@ from __future__ import annotations
from typing import Literal
from reflex.components.component import Component
-from reflex.event import EventHandler
+from reflex.event import EventHandler, empty_event
from reflex.vars.base import LiteralVar, Var
@@ -35,13 +35,13 @@ class Script(Component):
)
# Triggered when the script is loading
- on_load: EventHandler[lambda: []]
+ on_load: EventHandler[empty_event]
# Triggered when the script has loaded
- on_ready: EventHandler[lambda: []]
+ on_ready: EventHandler[empty_event]
# Triggered when the script has errored
- on_error: EventHandler[lambda: []]
+ on_error: EventHandler[empty_event]
@classmethod
def create(cls, *children, **props) -> Component:
diff --git a/reflex/components/base/script.pyi b/reflex/components/base/script.pyi
index 2de7b2fcc..2d13180bc 100644
--- a/reflex/components/base/script.pyi
+++ b/reflex/components/base/script.pyi
@@ -3,10 +3,10 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Literal, Optional, Union, overload
+from typing import Any, Dict, Literal, Optional, Union, overload
from reflex.components.component import Component
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -29,44 +29,24 @@ class Script(Component):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_error: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_load: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_ready: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_error: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_load: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_ready: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Script":
"""Create an inline or user-defined script.
diff --git a/reflex/components/component.py b/reflex/components/component.py
index 26ea2fd3f..a0d9c93b0 100644
--- a/reflex/components/component.py
+++ b/reflex/components/component.py
@@ -36,6 +36,7 @@ from reflex.constants import (
MemoizationMode,
PageNames,
)
+from reflex.constants.compiler import SpecialAttributes
from reflex.event import (
EventChain,
EventChainVar,
@@ -44,6 +45,7 @@ from reflex.event import (
EventVar,
call_event_fn,
call_event_handler,
+ empty_event,
get_handler_args,
)
from reflex.style import Style, format_as_emotion
@@ -474,6 +476,17 @@ class Component(BaseComponent, ABC):
for key in kwargs["event_triggers"]:
del kwargs[key]
+ # Place data_ and aria_ attributes into custom_attrs
+ special_attributes = tuple(
+ key
+ for key in kwargs
+ if key not in fields and SpecialAttributes.is_special(key)
+ )
+ if special_attributes:
+ custom_attrs = kwargs.setdefault("custom_attrs", {})
+ for key in special_attributes:
+ custom_attrs[format.to_kebab_case(key)] = kwargs.pop(key)
+
# Add style props to the component.
style = kwargs.get("style", {})
if isinstance(style, List):
@@ -493,8 +506,6 @@ class Component(BaseComponent, ABC):
**{attr: value for attr, value in kwargs.items() if attr not in fields},
}
)
- if "custom_attrs" not in kwargs:
- kwargs["custom_attrs"] = {}
# Convert class_name to str if it's list
class_name = kwargs.get("class_name", "")
@@ -613,21 +624,21 @@ class Component(BaseComponent, ABC):
"""
default_triggers = {
- EventTriggers.ON_FOCUS: lambda: [],
- EventTriggers.ON_BLUR: lambda: [],
- EventTriggers.ON_CLICK: lambda: [],
- EventTriggers.ON_CONTEXT_MENU: lambda: [],
- EventTriggers.ON_DOUBLE_CLICK: lambda: [],
- EventTriggers.ON_MOUSE_DOWN: lambda: [],
- EventTriggers.ON_MOUSE_ENTER: lambda: [],
- EventTriggers.ON_MOUSE_LEAVE: lambda: [],
- EventTriggers.ON_MOUSE_MOVE: lambda: [],
- EventTriggers.ON_MOUSE_OUT: lambda: [],
- EventTriggers.ON_MOUSE_OVER: lambda: [],
- EventTriggers.ON_MOUSE_UP: lambda: [],
- EventTriggers.ON_SCROLL: lambda: [],
- EventTriggers.ON_MOUNT: lambda: [],
- EventTriggers.ON_UNMOUNT: lambda: [],
+ EventTriggers.ON_FOCUS: empty_event,
+ EventTriggers.ON_BLUR: empty_event,
+ EventTriggers.ON_CLICK: empty_event,
+ EventTriggers.ON_CONTEXT_MENU: empty_event,
+ EventTriggers.ON_DOUBLE_CLICK: empty_event,
+ EventTriggers.ON_MOUSE_DOWN: empty_event,
+ EventTriggers.ON_MOUSE_ENTER: empty_event,
+ EventTriggers.ON_MOUSE_LEAVE: empty_event,
+ EventTriggers.ON_MOUSE_MOVE: empty_event,
+ EventTriggers.ON_MOUSE_OUT: empty_event,
+ EventTriggers.ON_MOUSE_OVER: empty_event,
+ EventTriggers.ON_MOUSE_UP: empty_event,
+ EventTriggers.ON_SCROLL: empty_event,
+ EventTriggers.ON_MOUNT: empty_event,
+ EventTriggers.ON_UNMOUNT: empty_event,
}
# Look for component specific triggers,
@@ -638,7 +649,7 @@ class Component(BaseComponent, ABC):
annotation = field.annotation
if (metadata := getattr(annotation, "__metadata__", None)) is not None:
args_spec = metadata[0]
- default_triggers[field.name] = args_spec or (lambda: [])
+ default_triggers[field.name] = args_spec or (empty_event) # type: ignore
return default_triggers
def __repr__(self) -> str:
@@ -1695,7 +1706,7 @@ class CustomComponent(Component):
value = self._create_event_chain(
value=value,
args_spec=event_triggers_in_component_declaration.get(
- key, lambda: []
+ key, empty_event
),
)
self.props[format.to_camel_case(key)] = value
diff --git a/reflex/components/core/banner.pyi b/reflex/components/core/banner.pyi
index 01c526fac..7c2be272c 100644
--- a/reflex/components/core/banner.pyi
+++ b/reflex/components/core/banner.pyi
@@ -3,14 +3,14 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Literal, Optional, Union, overload
+from typing import Any, Dict, Literal, Optional, Union, overload
from reflex.components.component import Component
from reflex.components.el.elements.typography import Div
from reflex.components.lucide.icon import Icon
from reflex.components.sonner.toast import Toaster, ToastProps
from reflex.constants.compiler import CompileVars
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.utils.imports import ImportVar
from reflex.vars import VarData
@@ -89,41 +89,21 @@ class ConnectionToaster(Toaster):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "ConnectionToaster":
"""Create a connection toaster component.
@@ -169,41 +149,21 @@ class ConnectionBanner(Component):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "ConnectionBanner":
"""Create a connection banner component.
@@ -228,41 +188,21 @@ class ConnectionModal(Component):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "ConnectionModal":
"""Create a connection banner component.
@@ -288,41 +228,21 @@ class WifiOffPulse(Icon):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "WifiOffPulse":
"""Create a wifi_off icon with an animated opacity pulse.
@@ -381,41 +301,21 @@ class ConnectionPulser(Div):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "ConnectionPulser":
"""Create a connection pulser component.
diff --git a/reflex/components/core/client_side_routing.pyi b/reflex/components/core/client_side_routing.pyi
index 9f73467b3..1d528daaf 100644
--- a/reflex/components/core/client_side_routing.pyi
+++ b/reflex/components/core/client_side_routing.pyi
@@ -3,10 +3,10 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Optional, Union, overload
+from typing import Any, Dict, Optional, Union, overload
from reflex.components.component import Component
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -26,41 +26,21 @@ class ClientSideRouting(Component):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "ClientSideRouting":
"""Create the component.
@@ -95,41 +75,21 @@ class Default404Page(Component):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Default404Page":
"""Create the component.
diff --git a/reflex/components/core/clipboard.py b/reflex/components/core/clipboard.py
index 1d7ce7c14..88aa2d145 100644
--- a/reflex/components/core/clipboard.py
+++ b/reflex/components/core/clipboard.py
@@ -2,11 +2,11 @@
from __future__ import annotations
-from typing import Dict, List, Union
+from typing import Dict, List, Tuple, Union
from reflex.components.base.fragment import Fragment
from reflex.components.tags.tag import Tag
-from reflex.event import EventChain, EventHandler
+from reflex.event import EventChain, EventHandler, identity_event
from reflex.utils.format import format_prop, wrap
from reflex.utils.imports import ImportVar
from reflex.vars import get_unique_variable_name
@@ -20,7 +20,7 @@ class Clipboard(Fragment):
targets: Var[List[str]]
# Called when the user pastes data into the document. Data is a list of tuples of (mime_type, data). Binary types will be base64 encoded as a data uri.
- on_paste: EventHandler[lambda data: [data]]
+ on_paste: EventHandler[identity_event(List[Tuple[str, str]])]
# Save the original event actions for the on_paste event.
on_paste_event_actions: Var[Dict[str, Union[bool, int]]]
diff --git a/reflex/components/core/clipboard.pyi b/reflex/components/core/clipboard.pyi
index cf02709fc..e2f6afc8d 100644
--- a/reflex/components/core/clipboard.pyi
+++ b/reflex/components/core/clipboard.pyi
@@ -3,10 +3,10 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, List, Optional, Union, overload
+from typing import Any, Dict, List, Optional, Union, overload
from reflex.components.base.fragment import Fragment
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.utils.imports import ImportVar
from reflex.vars.base import Var
@@ -27,42 +27,22 @@ class Clipboard(Fragment):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_paste: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_paste: Optional[EventType] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Clipboard":
"""Create a Clipboard component.
diff --git a/reflex/components/core/debounce.py b/reflex/components/core/debounce.py
index a8f20f08a..07ad1d69e 100644
--- a/reflex/components/core/debounce.py
+++ b/reflex/components/core/debounce.py
@@ -6,7 +6,7 @@ from typing import Any, Type, Union
from reflex.components.component import Component
from reflex.constants import EventTriggers
-from reflex.event import EventHandler
+from reflex.event import EventHandler, empty_event
from reflex.vars import VarData
from reflex.vars.base import Var
@@ -46,7 +46,7 @@ class DebounceInput(Component):
element: Var[Type[Component]]
# Fired when the input value changes
- on_change: EventHandler[lambda e0: [e0.value]]
+ on_change: EventHandler[empty_event]
@classmethod
def create(cls, *children: Component, **props: Any) -> Component:
diff --git a/reflex/components/core/debounce.pyi b/reflex/components/core/debounce.pyi
index dc2b505f5..6d7b76510 100644
--- a/reflex/components/core/debounce.pyi
+++ b/reflex/components/core/debounce.pyi
@@ -3,10 +3,10 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Optional, Type, Union, overload
+from typing import Any, Dict, Optional, Type, Union, overload
from reflex.components.component import Component
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -31,42 +31,22 @@ class DebounceInput(Component):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_change: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_change: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "DebounceInput":
"""Create a DebounceInput component.
diff --git a/reflex/components/core/html.pyi b/reflex/components/core/html.pyi
index 969508a6a..7f3ff603d 100644
--- a/reflex/components/core/html.pyi
+++ b/reflex/components/core/html.pyi
@@ -3,10 +3,10 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Optional, Union, overload
+from typing import Any, Dict, Optional, Union, overload
from reflex.components.el.elements.typography import Div
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -49,41 +49,21 @@ class Html(Div):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Html":
"""Create a html component.
diff --git a/reflex/components/core/upload.py b/reflex/components/core/upload.py
index 62a46d823..89665bb31 100644
--- a/reflex/components/core/upload.py
+++ b/reflex/components/core/upload.py
@@ -2,13 +2,13 @@
from __future__ import annotations
-import os
from pathlib import Path
-from typing import Callable, ClassVar, Dict, List, Optional
+from typing import Any, Callable, ClassVar, Dict, List, Optional, Tuple
from reflex.components.component import Component, ComponentNamespace, MemoizationLeaf
from reflex.components.el.elements.forms import Input
from reflex.components.radix.themes.layout.box import Box
+from reflex.config import environment
from reflex.constants import Dirs
from reflex.event import (
CallableEventSpec,
@@ -125,9 +125,7 @@ def get_upload_dir() -> Path:
"""
Upload.is_used = True
- uploaded_files_dir = Path(
- os.environ.get("REFLEX_UPLOADED_FILES_DIR", "./uploaded_files")
- )
+ uploaded_files_dir = environment.REFLEX_UPLOADED_FILES_DIR
uploaded_files_dir.mkdir(parents=True, exist_ok=True)
return uploaded_files_dir
@@ -157,7 +155,7 @@ def get_upload_url(file_path: str) -> Var[str]:
return uploaded_files_url_prefix + "/" + file_path
-def _on_drop_spec(files: Var):
+def _on_drop_spec(files: Var) -> Tuple[Var[Any]]:
"""Args spec for the on_drop event trigger.
Args:
@@ -166,7 +164,7 @@ def _on_drop_spec(files: Var):
Returns:
Signature for on_drop handler including the files to upload.
"""
- return [files]
+ return (files,)
class UploadFilesProvider(Component):
@@ -179,7 +177,7 @@ class UploadFilesProvider(Component):
class Upload(MemoizationLeaf):
"""A file upload component."""
- library = "react-dropzone@14.2.3"
+ library = "react-dropzone@14.2.10"
tag = "ReactDropzone"
diff --git a/reflex/components/core/upload.pyi b/reflex/components/core/upload.pyi
index 22f229098..5bbae892f 100644
--- a/reflex/components/core/upload.pyi
+++ b/reflex/components/core/upload.pyi
@@ -4,14 +4,14 @@
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
from pathlib import Path
-from typing import Any, Callable, ClassVar, Dict, List, Optional, Union, overload
+from typing import Any, ClassVar, Dict, List, Optional, Union, overload
from reflex.components.component import Component, ComponentNamespace, MemoizationLeaf
from reflex.constants import Dirs
from reflex.event import (
CallableEventSpec,
- EventHandler,
EventSpec,
+ EventType,
)
from reflex.style import Style
from reflex.utils.imports import ImportVar
@@ -54,41 +54,21 @@ class UploadFilesProvider(Component):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "UploadFilesProvider":
"""Create the component.
@@ -131,42 +111,22 @@ class Upload(MemoizationLeaf):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_drop: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_drop: Optional[EventType[Any]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Upload":
"""Create an upload component.
@@ -216,42 +176,22 @@ class StyledUpload(Upload):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_drop: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_drop: Optional[EventType[Any]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "StyledUpload":
"""Create the styled upload component.
@@ -301,42 +241,22 @@ class UploadNamespace(ComponentNamespace):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_drop: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_drop: Optional[EventType[Any]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "StyledUpload":
"""Create the styled upload component.
diff --git a/reflex/components/datadisplay/code.py b/reflex/components/datadisplay/code.py
index c18e44885..3b4fa39d1 100644
--- a/reflex/components/datadisplay/code.py
+++ b/reflex/components/datadisplay/code.py
@@ -381,7 +381,7 @@ for theme_name in dir(Theme):
class CodeBlock(Component):
"""A code block."""
- library = "react-syntax-highlighter@15.5.0"
+ library = "react-syntax-highlighter@15.6.1"
tag = "PrismAsyncLight"
diff --git a/reflex/components/datadisplay/code.pyi b/reflex/components/datadisplay/code.pyi
index 621dce5d0..0bf3dd956 100644
--- a/reflex/components/datadisplay/code.pyi
+++ b/reflex/components/datadisplay/code.pyi
@@ -4,11 +4,11 @@
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
import dataclasses
-from typing import Any, Callable, ClassVar, Dict, Literal, Optional, Union, overload
+from typing import Any, ClassVar, Dict, Literal, Optional, Union, overload
from reflex.components.component import Component, ComponentNamespace
from reflex.constants.colors import Color
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.utils.imports import ImportDict
from reflex.vars.base import Var
@@ -939,41 +939,21 @@ class CodeBlock(Component):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "CodeBlock":
"""Create a text component.
@@ -1594,41 +1574,21 @@ class CodeblockNamespace(ComponentNamespace):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "CodeBlock":
"""Create a text component.
diff --git a/reflex/components/datadisplay/dataeditor.py b/reflex/components/datadisplay/dataeditor.py
index 9d1ecc775..01255dd14 100644
--- a/reflex/components/datadisplay/dataeditor.py
+++ b/reflex/components/datadisplay/dataeditor.py
@@ -3,12 +3,12 @@
from __future__ import annotations
from enum import Enum
-from typing import Any, Dict, List, Literal, Optional, Union
+from typing import Any, Dict, List, Literal, Optional, Tuple, Union
from reflex.base import Base
from reflex.components.component import Component, NoSSRComponent
from reflex.components.literals import LiteralRowMarker
-from reflex.event import EventHandler
+from reflex.event import EventHandler, empty_event, identity_event
from reflex.utils import console, format, types
from reflex.utils.imports import ImportDict, ImportVar
from reflex.utils.serializers import serializer
@@ -125,10 +125,10 @@ class DataEditor(NoSSRComponent):
tag = "DataEditor"
is_default = True
- library: str = "@glideapps/glide-data-grid@^5.3.0"
+ library: str = "@glideapps/glide-data-grid@^6.0.3"
lib_dependencies: List[str] = [
"lodash@^4.17.21",
- "marked@^4.0.10",
+ "marked@^14.1.2",
"react-responsive-carousel@^3.2.7",
]
@@ -223,13 +223,13 @@ class DataEditor(NoSSRComponent):
theme: Var[Union[DataEditorTheme, Dict]]
# Fired when a cell is activated.
- on_cell_activated: EventHandler[lambda pos: [pos]]
+ on_cell_activated: EventHandler[identity_event(Tuple[int, int])]
# Fired when a cell is clicked.
- on_cell_clicked: EventHandler[lambda pos: [pos]]
+ on_cell_clicked: EventHandler[identity_event(Tuple[int, int])]
# Fired when a cell is right-clicked.
- on_cell_context_menu: EventHandler[lambda pos: [pos]]
+ on_cell_context_menu: EventHandler[identity_event(Tuple[int, int])]
# Fired when a cell is edited.
on_cell_edited: EventHandler[on_edit_spec]
@@ -244,16 +244,16 @@ class DataEditor(NoSSRComponent):
on_group_header_renamed: EventHandler[lambda idx, val: [idx, val]]
# Fired when a header is clicked.
- on_header_clicked: EventHandler[lambda pos: [pos]]
+ on_header_clicked: EventHandler[identity_event(Tuple[int, int])]
# Fired when a header is right-clicked.
- on_header_context_menu: EventHandler[lambda pos: [pos]]
+ on_header_context_menu: EventHandler[identity_event(Tuple[int, int])]
# Fired when a header menu item is clicked.
on_header_menu_click: EventHandler[lambda col, pos: [col, pos]]
# Fired when an item is hovered.
- on_item_hovered: EventHandler[lambda pos: [pos]]
+ on_item_hovered: EventHandler[identity_event(Tuple[int, int])]
# Fired when a selection is deleted.
on_delete: EventHandler[lambda selection: [selection]]
@@ -262,10 +262,10 @@ class DataEditor(NoSSRComponent):
on_finished_editing: EventHandler[lambda new_value, movement: [new_value, movement]]
# Fired when a row is appended.
- on_row_appended: EventHandler[lambda: []]
+ on_row_appended: EventHandler[empty_event]
# Fired when the selection is cleared.
- on_selection_cleared: EventHandler[lambda: []]
+ on_selection_cleared: EventHandler[empty_event]
# Fired when a column is resized.
on_column_resize: EventHandler[lambda col, width: [col, width]]
@@ -329,7 +329,7 @@ class DataEditor(NoSSRComponent):
columns = props.get("columns", [])
data = props.get("data", [])
- rows = props.get("rows", None)
+ rows = props.get("rows")
# If rows is not provided, determine from data.
if rows is None:
diff --git a/reflex/components/datadisplay/dataeditor.pyi b/reflex/components/datadisplay/dataeditor.pyi
index edfd0521a..1b8fed287 100644
--- a/reflex/components/datadisplay/dataeditor.pyi
+++ b/reflex/components/datadisplay/dataeditor.pyi
@@ -4,11 +4,11 @@
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
from enum import Enum
-from typing import Any, Callable, Dict, List, Literal, Optional, Union, overload
+from typing import Any, Dict, List, Literal, Optional, Union, overload
from reflex.base import Base
from reflex.components.component import NoSSRComponent
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.utils.imports import ImportDict
from reflex.utils.serializers import serializer
@@ -135,87 +135,37 @@ class DataEditor(NoSSRComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_cell_activated: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_cell_clicked: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_cell_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_cell_edited: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_column_resize: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_delete: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_finished_editing: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_group_header_clicked: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_group_header_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_group_header_renamed: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_header_clicked: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_header_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_header_menu_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_item_hovered: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_row_appended: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_selection_cleared: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_cell_activated: Optional[EventType] = None,
+ on_cell_clicked: Optional[EventType] = None,
+ on_cell_context_menu: Optional[EventType] = None,
+ on_cell_edited: Optional[EventType] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_column_resize: Optional[EventType] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_delete: Optional[EventType] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_finished_editing: Optional[EventType] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_group_header_clicked: Optional[EventType] = None,
+ on_group_header_context_menu: Optional[EventType] = None,
+ on_group_header_renamed: Optional[EventType] = None,
+ on_header_clicked: Optional[EventType] = None,
+ on_header_context_menu: Optional[EventType] = None,
+ on_header_menu_click: Optional[EventType] = None,
+ on_item_hovered: Optional[EventType] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_row_appended: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_selection_cleared: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "DataEditor":
"""Create the DataEditor component.
diff --git a/reflex/components/dynamic.py b/reflex/components/dynamic.py
index 8d0bab669..9c498fb61 100644
--- a/reflex/components/dynamic.py
+++ b/reflex/components/dynamic.py
@@ -1,6 +1,6 @@
"""Components that are dynamically generated on the backend."""
-from typing import TYPE_CHECKING
+from typing import TYPE_CHECKING, Union
from reflex import constants
from reflex.utils import imports
@@ -26,14 +26,10 @@ def get_cdn_url(lib: str) -> str:
return f"https://cdn.jsdelivr.net/npm/{lib}" + "/+esm"
-bundled_libraries = {
- "react",
- "@radix-ui/themes",
- "@emotion/react",
-}
+bundled_libraries = {"react", "@radix-ui/themes", "@emotion/react", "next/link"}
-def bundle_library(component: "Component"):
+def bundle_library(component: Union["Component", str]):
"""Bundle a library with the component.
Args:
@@ -42,6 +38,9 @@ def bundle_library(component: "Component"):
Raises:
DynamicComponentMissingLibrary: Raised when a dynamic component is missing a library.
"""
+ if isinstance(component, str):
+ bundled_libraries.add(component)
+ return
if component.library is None:
raise DynamicComponentMissingLibrary("Component must have a library to bundle.")
bundled_libraries.add(format_library_name(component.library))
diff --git a/reflex/components/el/__init__.pyi b/reflex/components/el/__init__.pyi
index adf657b7e..4815bcd27 100644
--- a/reflex/components/el/__init__.pyi
+++ b/reflex/components/el/__init__.pyi
@@ -3,6 +3,7 @@
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
+from . import elements as elements
from .elements.forms import Button as Button
from .elements.forms import Fieldset as Fieldset
from .elements.forms import Form as Form
diff --git a/reflex/components/el/element.pyi b/reflex/components/el/element.pyi
index 4ea86f273..f6d76cd02 100644
--- a/reflex/components/el/element.pyi
+++ b/reflex/components/el/element.pyi
@@ -3,10 +3,10 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Optional, Union, overload
+from typing import Any, Dict, Optional, Union, overload
from reflex.components.component import Component
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -22,41 +22,21 @@ class Element(Component):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Element":
"""Create the component.
diff --git a/reflex/components/el/elements/base.pyi b/reflex/components/el/elements/base.pyi
index d3f0622da..6e943d0d0 100644
--- a/reflex/components/el/elements/base.pyi
+++ b/reflex/components/el/elements/base.pyi
@@ -3,10 +3,10 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Optional, Union, overload
+from typing import Any, Dict, Optional, Union, overload
from reflex.components.el.element import Element
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -46,41 +46,21 @@ class BaseHTML(Element):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "BaseHTML":
"""Create the component.
diff --git a/reflex/components/el/elements/forms.py b/reflex/components/el/elements/forms.py
index 1963f8b37..a343991d5 100644
--- a/reflex/components/el/elements/forms.py
+++ b/reflex/components/el/elements/forms.py
@@ -3,14 +3,20 @@
from __future__ import annotations
from hashlib import md5
-from typing import Any, Dict, Iterator, Set, Union
+from typing import Any, Dict, Iterator, Set, Tuple, Union
from jinja2 import Environment
from reflex.components.el.element import Element
from reflex.components.tags.tag import Tag
from reflex.constants import Dirs, EventTriggers
-from reflex.event import EventChain, EventHandler, prevent_default
+from reflex.event import (
+ EventChain,
+ EventHandler,
+ input_event,
+ key_event,
+ prevent_default,
+)
from reflex.utils.imports import ImportDict
from reflex.vars import VarData
from reflex.vars.base import LiteralVar, Var
@@ -96,6 +102,15 @@ class Fieldset(Element):
name: Var[Union[str, int, bool]]
+def on_submit_event_spec() -> Tuple[Var[Dict[str, Any]]]:
+ """Event handler spec for the on_submit event.
+
+ Returns:
+ The event handler spec.
+ """
+ return (FORM_DATA,)
+
+
class Form(BaseHTML):
"""Display the form element."""
@@ -135,7 +150,7 @@ class Form(BaseHTML):
handle_submit_unique_name: Var[str]
# Fired when the form is submitted
- on_submit: EventHandler[lambda e0: [FORM_DATA]]
+ on_submit: EventHandler[on_submit_event_spec]
@classmethod
def create(cls, *children, **props):
@@ -345,19 +360,19 @@ class Input(BaseHTML):
value: Var[Union[str, int, float]]
# Fired when the input value changes
- on_change: EventHandler[lambda e0: [e0.target.value]]
+ on_change: EventHandler[input_event]
# Fired when the input gains focus
- on_focus: EventHandler[lambda e0: [e0.target.value]]
+ on_focus: EventHandler[input_event]
# Fired when the input loses focus
- on_blur: EventHandler[lambda e0: [e0.target.value]]
+ on_blur: EventHandler[input_event]
# Fired when a key is pressed down
- on_key_down: EventHandler[lambda e0: [e0.key]]
+ on_key_down: EventHandler[key_event]
# Fired when a key is released
- on_key_up: EventHandler[lambda e0: [e0.key]]
+ on_key_up: EventHandler[key_event]
class Label(BaseHTML):
@@ -496,7 +511,7 @@ class Select(BaseHTML):
size: Var[Union[str, int, bool]]
# Fired when the select value changes
- on_change: EventHandler[lambda e0: [e0.target.value]]
+ on_change: EventHandler[input_event]
AUTO_HEIGHT_JS = """
@@ -586,19 +601,19 @@ class Textarea(BaseHTML):
wrap: Var[Union[str, int, bool]]
# Fired when the input value changes
- on_change: EventHandler[lambda e0: [e0.target.value]]
+ on_change: EventHandler[input_event]
# Fired when the input gains focus
- on_focus: EventHandler[lambda e0: [e0.target.value]]
+ on_focus: EventHandler[input_event]
# Fired when the input loses focus
- on_blur: EventHandler[lambda e0: [e0.target.value]]
+ on_blur: EventHandler[input_event]
# Fired when a key is pressed down
- on_key_down: EventHandler[lambda e0: [e0.key]]
+ on_key_down: EventHandler[key_event]
# Fired when a key is released
- on_key_up: EventHandler[lambda e0: [e0.key]]
+ on_key_up: EventHandler[key_event]
def _exclude_props(self) -> list[str]:
return super()._exclude_props() + [
diff --git a/reflex/components/el/elements/forms.pyi b/reflex/components/el/elements/forms.pyi
index 5677eb741..135291213 100644
--- a/reflex/components/el/elements/forms.pyi
+++ b/reflex/components/el/elements/forms.pyi
@@ -3,12 +3,12 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Optional, Union, overload
+from typing import Any, Dict, Optional, Tuple, Union, overload
from jinja2 import Environment
from reflex.components.el.element import Element
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.utils.imports import ImportDict
from reflex.vars.base import Var
@@ -71,41 +71,21 @@ class Button(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Button":
"""Create the component.
@@ -188,41 +168,21 @@ class Datalist(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Datalist":
"""Create the component.
@@ -273,41 +233,21 @@ class Fieldset(Element):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Fieldset":
"""Create the component.
@@ -330,6 +270,8 @@ class Fieldset(Element):
"""
...
+def on_submit_event_spec() -> Tuple[Var[Dict[str, Any]]]: ...
+
class Form(BaseHTML):
@overload
@classmethod
@@ -381,42 +323,22 @@ class Form(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_submit: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_submit: Optional[EventType[Dict[str, Any]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Form":
"""Create a form component.
@@ -541,46 +463,24 @@ class Input(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_change: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_key_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_key_up: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[str]] = None,
+ on_change: Optional[EventType[str]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[str]] = None,
+ on_key_down: Optional[EventType[str]] = None,
+ on_key_up: Optional[EventType[str]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Input":
"""Create the component.
@@ -687,41 +587,21 @@ class Label(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Label":
"""Create the component.
@@ -795,41 +675,21 @@ class Legend(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Legend":
"""Create the component.
@@ -908,41 +768,21 @@ class Meter(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Meter":
"""Create the component.
@@ -1023,41 +863,21 @@ class Optgroup(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Optgroup":
"""Create the component.
@@ -1135,41 +955,21 @@ class Option(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Option":
"""Create the component.
@@ -1248,41 +1048,21 @@ class Output(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Output":
"""Create the component.
@@ -1360,41 +1140,21 @@ class Progress(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Progress":
"""Create the component.
@@ -1479,42 +1239,22 @@ class Select(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_change: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_change: Optional[EventType[str]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Select":
"""Create the component.
@@ -1616,46 +1356,24 @@ class Textarea(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_change: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_key_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_key_up: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[str]] = None,
+ on_change: Optional[EventType[str]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[str]] = None,
+ on_key_down: Optional[EventType[str]] = None,
+ on_key_up: Optional[EventType[str]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Textarea":
"""Create the component.
diff --git a/reflex/components/el/elements/inline.pyi b/reflex/components/el/elements/inline.pyi
index e53e6da04..336e4d3de 100644
--- a/reflex/components/el/elements/inline.pyi
+++ b/reflex/components/el/elements/inline.pyi
@@ -3,9 +3,9 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Optional, Union, overload
+from typing import Any, Dict, Optional, Union, overload
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -58,41 +58,21 @@ class A(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "A":
"""Create the component.
@@ -173,41 +153,21 @@ class Abbr(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Abbr":
"""Create the component.
@@ -279,41 +239,21 @@ class B(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "B":
"""Create the component.
@@ -385,41 +325,21 @@ class Bdi(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Bdi":
"""Create the component.
@@ -491,41 +411,21 @@ class Bdo(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Bdo":
"""Create the component.
@@ -597,41 +497,21 @@ class Br(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Br":
"""Create the component.
@@ -703,41 +583,21 @@ class Cite(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Cite":
"""Create the component.
@@ -809,41 +669,21 @@ class Code(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Code":
"""Create the component.
@@ -916,41 +756,21 @@ class Data(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Data":
"""Create the component.
@@ -1023,41 +843,21 @@ class Dfn(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Dfn":
"""Create the component.
@@ -1129,41 +929,21 @@ class Em(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Em":
"""Create the component.
@@ -1235,41 +1015,21 @@ class I(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "I":
"""Create the component.
@@ -1341,41 +1101,21 @@ class Kbd(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Kbd":
"""Create the component.
@@ -1447,41 +1187,21 @@ class Mark(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Mark":
"""Create the component.
@@ -1554,41 +1274,21 @@ class Q(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Q":
"""Create the component.
@@ -1661,41 +1361,21 @@ class Rp(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Rp":
"""Create the component.
@@ -1767,41 +1447,21 @@ class Rt(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Rt":
"""Create the component.
@@ -1873,41 +1533,21 @@ class Ruby(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Ruby":
"""Create the component.
@@ -1979,41 +1619,21 @@ class S(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "S":
"""Create the component.
@@ -2085,41 +1705,21 @@ class Samp(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Samp":
"""Create the component.
@@ -2191,41 +1791,21 @@ class Small(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Small":
"""Create the component.
@@ -2297,41 +1877,21 @@ class Span(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Span":
"""Create the component.
@@ -2403,41 +1963,21 @@ class Strong(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Strong":
"""Create the component.
@@ -2509,41 +2049,21 @@ class Sub(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Sub":
"""Create the component.
@@ -2615,41 +2135,21 @@ class Sup(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Sup":
"""Create the component.
@@ -2722,41 +2222,21 @@ class Time(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Time":
"""Create the component.
@@ -2829,41 +2309,21 @@ class U(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "U":
"""Create the component.
@@ -2935,41 +2395,21 @@ class Wbr(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Wbr":
"""Create the component.
diff --git a/reflex/components/el/elements/media.pyi b/reflex/components/el/elements/media.pyi
index 336d6fbb9..382f3c79c 100644
--- a/reflex/components/el/elements/media.pyi
+++ b/reflex/components/el/elements/media.pyi
@@ -3,11 +3,11 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Optional, Union, overload
+from typing import Any, Dict, Optional, Union, overload
from reflex import ComponentNamespace
from reflex.constants.colors import Color
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -62,41 +62,21 @@ class Area(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Area":
"""Create the component.
@@ -189,41 +169,21 @@ class Audio(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Audio":
"""Create the component.
@@ -321,41 +281,21 @@ class Img(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Img":
"""Override create method to apply source attribute to value if user fails to pass in attribute.
@@ -441,41 +381,21 @@ class Map(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Map":
"""Create the component.
@@ -553,41 +473,21 @@ class Track(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Track":
"""Create the component.
@@ -678,41 +578,21 @@ class Video(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Video":
"""Create the component.
@@ -796,41 +676,21 @@ class Embed(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Embed":
"""Create the component.
@@ -915,41 +775,21 @@ class Iframe(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Iframe":
"""Create the component.
@@ -1035,41 +875,21 @@ class Object(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Object":
"""Create the component.
@@ -1146,41 +966,21 @@ class Picture(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Picture":
"""Create the component.
@@ -1252,41 +1052,21 @@ class Portal(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Portal":
"""Create the component.
@@ -1363,41 +1143,21 @@ class Source(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Source":
"""Create the component.
@@ -1477,41 +1237,21 @@ class Svg(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Svg":
"""Create the component.
@@ -1593,41 +1333,21 @@ class Text(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Text":
"""Create the component.
@@ -1711,41 +1431,21 @@ class Line(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Line":
"""Create the component.
@@ -1826,41 +1526,21 @@ class Circle(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Circle":
"""Create the component.
@@ -1941,41 +1621,21 @@ class Ellipse(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Ellipse":
"""Create the component.
@@ -2059,41 +1719,21 @@ class Rect(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Rect":
"""Create the component.
@@ -2174,41 +1814,21 @@ class Polygon(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Polygon":
"""Create the component.
@@ -2282,41 +1902,21 @@ class Defs(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Defs":
"""Create the component.
@@ -2395,41 +1995,21 @@ class LinearGradient(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "LinearGradient":
"""Create the component.
@@ -2517,41 +2097,21 @@ class RadialGradient(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "RadialGradient":
"""Create the component.
@@ -2639,41 +2199,21 @@ class Stop(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Stop":
"""Create the component.
@@ -2749,41 +2289,21 @@ class Path(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Path":
"""Create the component.
@@ -2869,41 +2389,21 @@ class SVG(ComponentNamespace):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Svg":
"""Create the component.
diff --git a/reflex/components/el/elements/metadata.pyi b/reflex/components/el/elements/metadata.pyi
index f59ed14fc..498695a80 100644
--- a/reflex/components/el/elements/metadata.pyi
+++ b/reflex/components/el/elements/metadata.pyi
@@ -3,10 +3,10 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Optional, Union, overload
+from typing import Any, Dict, Optional, Union, overload
from reflex.components.el.element import Element
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -50,41 +50,21 @@ class Base(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Base":
"""Create the component.
@@ -156,41 +136,21 @@ class Head(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Head":
"""Create the component.
@@ -275,41 +235,21 @@ class Link(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Link":
"""Create the component.
@@ -394,41 +334,21 @@ class Meta(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Meta":
"""Create the component.
@@ -480,41 +400,21 @@ class Title(Element):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Title":
"""Create the component.
@@ -547,41 +447,21 @@ class StyleEl(Element):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "StyleEl":
"""Create the component.
diff --git a/reflex/components/el/elements/other.pyi b/reflex/components/el/elements/other.pyi
index 9d4cdd7c9..db884a78b 100644
--- a/reflex/components/el/elements/other.pyi
+++ b/reflex/components/el/elements/other.pyi
@@ -3,9 +3,9 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Optional, Union, overload
+from typing import Any, Dict, Optional, Union, overload
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -48,41 +48,21 @@ class Details(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Details":
"""Create the component.
@@ -156,41 +136,21 @@ class Dialog(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Dialog":
"""Create the component.
@@ -263,41 +223,21 @@ class Summary(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Summary":
"""Create the component.
@@ -369,41 +309,21 @@ class Slot(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Slot":
"""Create the component.
@@ -475,41 +395,21 @@ class Template(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Template":
"""Create the component.
@@ -581,41 +481,21 @@ class Math(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Math":
"""Create the component.
@@ -688,41 +568,21 @@ class Html(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Html":
"""Create the component.
diff --git a/reflex/components/el/elements/scripts.pyi b/reflex/components/el/elements/scripts.pyi
index a6495720c..774fcfc22 100644
--- a/reflex/components/el/elements/scripts.pyi
+++ b/reflex/components/el/elements/scripts.pyi
@@ -3,9 +3,9 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Optional, Union, overload
+from typing import Any, Dict, Optional, Union, overload
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -47,41 +47,21 @@ class Canvas(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Canvas":
"""Create the component.
@@ -153,41 +133,21 @@ class Noscript(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Noscript":
"""Create the component.
@@ -272,41 +232,21 @@ class Script(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Script":
"""Create the component.
diff --git a/reflex/components/el/elements/sectioning.pyi b/reflex/components/el/elements/sectioning.pyi
index 6b5905b13..963d2d651 100644
--- a/reflex/components/el/elements/sectioning.pyi
+++ b/reflex/components/el/elements/sectioning.pyi
@@ -3,9 +3,9 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Optional, Union, overload
+from typing import Any, Dict, Optional, Union, overload
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -47,41 +47,21 @@ class Body(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Body":
"""Create the component.
@@ -153,41 +133,21 @@ class Address(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Address":
"""Create the component.
@@ -259,41 +219,21 @@ class Article(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Article":
"""Create the component.
@@ -365,41 +305,21 @@ class Aside(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Aside":
"""Create the component.
@@ -471,41 +391,21 @@ class Footer(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Footer":
"""Create the component.
@@ -577,41 +477,21 @@ class Header(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Header":
"""Create the component.
@@ -683,41 +563,21 @@ class H1(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "H1":
"""Create the component.
@@ -789,41 +649,21 @@ class H2(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "H2":
"""Create the component.
@@ -895,41 +735,21 @@ class H3(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "H3":
"""Create the component.
@@ -1001,41 +821,21 @@ class H4(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "H4":
"""Create the component.
@@ -1107,41 +907,21 @@ class H5(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "H5":
"""Create the component.
@@ -1213,41 +993,21 @@ class H6(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "H6":
"""Create the component.
@@ -1319,41 +1079,21 @@ class Main(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Main":
"""Create the component.
@@ -1425,41 +1165,21 @@ class Nav(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Nav":
"""Create the component.
@@ -1531,41 +1251,21 @@ class Section(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Section":
"""Create the component.
diff --git a/reflex/components/el/elements/tables.pyi b/reflex/components/el/elements/tables.pyi
index 49ab1b407..4d874f460 100644
--- a/reflex/components/el/elements/tables.pyi
+++ b/reflex/components/el/elements/tables.pyi
@@ -3,9 +3,9 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Optional, Union, overload
+from typing import Any, Dict, Optional, Union, overload
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -48,41 +48,21 @@ class Caption(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Caption":
"""Create the component.
@@ -157,41 +137,21 @@ class Col(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Col":
"""Create the component.
@@ -267,41 +227,21 @@ class Colgroup(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Colgroup":
"""Create the component.
@@ -377,41 +317,21 @@ class Table(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Table":
"""Create the component.
@@ -486,41 +406,21 @@ class Tbody(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Tbody":
"""Create the component.
@@ -597,41 +497,21 @@ class Td(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Td":
"""Create the component.
@@ -708,41 +588,21 @@ class Tfoot(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Tfoot":
"""Create the component.
@@ -820,41 +680,21 @@ class Th(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Th":
"""Create the component.
@@ -932,41 +772,21 @@ class Thead(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Thead":
"""Create the component.
@@ -1040,41 +860,21 @@ class Tr(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Tr":
"""Create the component.
diff --git a/reflex/components/el/elements/typography.pyi b/reflex/components/el/elements/typography.pyi
index 2e8177090..548371ce6 100644
--- a/reflex/components/el/elements/typography.pyi
+++ b/reflex/components/el/elements/typography.pyi
@@ -3,9 +3,9 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Optional, Union, overload
+from typing import Any, Dict, Optional, Union, overload
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -48,41 +48,21 @@ class Blockquote(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Blockquote":
"""Create the component.
@@ -155,41 +135,21 @@ class Dd(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Dd":
"""Create the component.
@@ -261,41 +221,21 @@ class Div(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Div":
"""Create the component.
@@ -367,41 +307,21 @@ class Dl(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Dl":
"""Create the component.
@@ -473,41 +393,21 @@ class Dt(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Dt":
"""Create the component.
@@ -579,41 +479,21 @@ class Figcaption(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Figcaption":
"""Create the component.
@@ -686,41 +566,21 @@ class Hr(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Hr":
"""Create the component.
@@ -793,41 +653,21 @@ class Li(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Li":
"""Create the component.
@@ -900,41 +740,21 @@ class Menu(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Menu":
"""Create the component.
@@ -1010,41 +830,21 @@ class Ol(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Ol":
"""Create the component.
@@ -1119,41 +919,21 @@ class P(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "P":
"""Create the component.
@@ -1225,41 +1005,21 @@ class Pre(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Pre":
"""Create the component.
@@ -1331,41 +1091,21 @@ class Ul(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Ul":
"""Create the component.
@@ -1439,41 +1179,21 @@ class Ins(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Ins":
"""Create the component.
@@ -1549,41 +1269,21 @@ class Del(BaseHTML):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Del":
"""Create the component.
diff --git a/reflex/components/gridjs/datatable.py b/reflex/components/gridjs/datatable.py
index 34ca62605..bd568d84a 100644
--- a/reflex/components/gridjs/datatable.py
+++ b/reflex/components/gridjs/datatable.py
@@ -15,9 +15,9 @@ from reflex.vars.base import LiteralVar, Var, is_computed_var
class Gridjs(Component):
"""A component that wraps a nivo bar component."""
- library = "gridjs-react@6.0.1"
+ library = "gridjs-react@6.1.1"
- lib_dependencies: List[str] = ["gridjs@6.0.6"]
+ lib_dependencies: List[str] = ["gridjs@6.2.0"]
class DataTable(Gridjs):
diff --git a/reflex/components/gridjs/datatable.pyi b/reflex/components/gridjs/datatable.pyi
index ae7a8c0d3..ec4a5405a 100644
--- a/reflex/components/gridjs/datatable.pyi
+++ b/reflex/components/gridjs/datatable.pyi
@@ -3,10 +3,10 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, List, Optional, Union, overload
+from typing import Any, Dict, List, Optional, Union, overload
from reflex.components.component import Component
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.utils.imports import ImportDict
from reflex.vars.base import Var
@@ -23,41 +23,21 @@ class Gridjs(Component):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Gridjs":
"""Create the component.
@@ -95,41 +75,21 @@ class DataTable(Gridjs):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "DataTable":
"""Create a datatable component.
diff --git a/reflex/components/lucide/icon.pyi b/reflex/components/lucide/icon.pyi
index 811576200..661d91dbe 100644
--- a/reflex/components/lucide/icon.pyi
+++ b/reflex/components/lucide/icon.pyi
@@ -3,10 +3,10 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Optional, Union, overload
+from typing import Any, Dict, Optional, Union, overload
from reflex.components.component import Component
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -22,41 +22,21 @@ class LucideIconComponent(Component):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "LucideIconComponent":
"""Create the component.
@@ -89,41 +69,21 @@ class Icon(LucideIconComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Icon":
"""Initialize the Icon component.
diff --git a/reflex/components/markdown/markdown.pyi b/reflex/components/markdown/markdown.pyi
index d82756f44..1cad04013 100644
--- a/reflex/components/markdown/markdown.pyi
+++ b/reflex/components/markdown/markdown.pyi
@@ -7,7 +7,7 @@ from functools import lru_cache
from typing import Any, Callable, Dict, Optional, Union, overload
from reflex.components.component import Component
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.utils.imports import ImportDict
from reflex.vars.base import LiteralVar, Var
@@ -42,41 +42,21 @@ class Markdown(Component):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Markdown":
"""Create a markdown component.
diff --git a/reflex/components/moment/moment.py b/reflex/components/moment/moment.py
index da9949235..51b09d55d 100644
--- a/reflex/components/moment/moment.py
+++ b/reflex/components/moment/moment.py
@@ -4,7 +4,7 @@ import dataclasses
from typing import List, Optional
from reflex.components.component import Component, NoSSRComponent
-from reflex.event import EventHandler
+from reflex.event import EventHandler, identity_event
from reflex.utils.imports import ImportDict
from reflex.vars.base import Var
@@ -93,7 +93,7 @@ class Moment(NoSSRComponent):
tz: Var[str]
# Fires when the date changes.
- on_change: EventHandler[lambda date: [date]]
+ on_change: EventHandler[identity_event(str)]
def add_imports(self) -> ImportDict:
"""Add the imports for the Moment component.
diff --git a/reflex/components/moment/moment.pyi b/reflex/components/moment/moment.pyi
index f0d747f77..4f58fda7d 100644
--- a/reflex/components/moment/moment.pyi
+++ b/reflex/components/moment/moment.pyi
@@ -4,10 +4,10 @@
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
import dataclasses
-from typing import Any, Callable, Dict, Optional, Union, overload
+from typing import Any, Dict, Optional, Union, overload
from reflex.components.component import NoSSRComponent
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.utils.imports import ImportDict
from reflex.vars.base import Var
@@ -57,42 +57,22 @@ class Moment(NoSSRComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_change: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_change: Optional[EventType] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Moment":
"""Create a Moment component.
diff --git a/reflex/components/next/base.pyi b/reflex/components/next/base.pyi
index af8064aaf..1d49c5e66 100644
--- a/reflex/components/next/base.pyi
+++ b/reflex/components/next/base.pyi
@@ -3,10 +3,10 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Optional, Union, overload
+from typing import Any, Dict, Optional, Union, overload
from reflex.components.component import Component
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -24,41 +24,21 @@ class NextComponent(Component):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "NextComponent":
"""Create the component.
diff --git a/reflex/components/next/image.py b/reflex/components/next/image.py
index 9e2f71821..fe74b0935 100644
--- a/reflex/components/next/image.py
+++ b/reflex/components/next/image.py
@@ -2,7 +2,7 @@
from typing import Any, Literal, Optional, Union
-from reflex.event import EventHandler
+from reflex.event import EventHandler, empty_event
from reflex.utils import types
from reflex.vars.base import Var
@@ -56,10 +56,10 @@ class Image(NextComponent):
blurDataURL: Var[str]
# Fires when the image has loaded.
- on_load: EventHandler[lambda: []]
+ on_load: EventHandler[empty_event]
# Fires when the image has an error.
- on_error: EventHandler[lambda: []]
+ on_error: EventHandler[empty_event]
@classmethod
def create(
diff --git a/reflex/components/next/image.pyi b/reflex/components/next/image.pyi
index 7786c8a4b..5d72584a9 100644
--- a/reflex/components/next/image.pyi
+++ b/reflex/components/next/image.pyi
@@ -3,9 +3,9 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Literal, Optional, Union, overload
+from typing import Any, Dict, Literal, Optional, Union, overload
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -37,43 +37,23 @@ class Image(NextComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_error: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_load: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_error: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_load: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Image":
"""Create an Image component from next/image.
diff --git a/reflex/components/next/link.pyi b/reflex/components/next/link.pyi
index 2a3207956..fa9ae530f 100644
--- a/reflex/components/next/link.pyi
+++ b/reflex/components/next/link.pyi
@@ -3,10 +3,10 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Optional, Union, overload
+from typing import Any, Dict, Optional, Union, overload
from reflex.components.component import Component
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -24,41 +24,21 @@ class NextLink(Component):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "NextLink":
"""Create the component.
diff --git a/reflex/components/next/video.pyi b/reflex/components/next/video.pyi
index 842e27d22..f8c93b6f1 100644
--- a/reflex/components/next/video.pyi
+++ b/reflex/components/next/video.pyi
@@ -3,10 +3,10 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Optional, Union, overload
+from typing import Any, Dict, Optional, Union, overload
from reflex.components.component import Component
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -26,41 +26,21 @@ class Video(NextComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Video":
"""Create a Video component.
diff --git a/reflex/components/plotly/plotly.py b/reflex/components/plotly/plotly.py
index eb12bbc1c..c93488d40 100644
--- a/reflex/components/plotly/plotly.py
+++ b/reflex/components/plotly/plotly.py
@@ -94,7 +94,7 @@ class Plotly(NoSSRComponent):
library = "react-plotly.js@2.6.0"
- lib_dependencies: List[str] = ["plotly.js@2.22.0"]
+ lib_dependencies: List[str] = ["plotly.js@2.35.2"]
tag = "Plot"
diff --git a/reflex/components/plotly/plotly.pyi b/reflex/components/plotly/plotly.pyi
index c8be366c8..29464415d 100644
--- a/reflex/components/plotly/plotly.pyi
+++ b/reflex/components/plotly/plotly.pyi
@@ -3,11 +3,11 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Optional, Union, overload
+from typing import Any, Dict, Optional, Union, overload
from reflex.base import Base
from reflex.components.component import NoSSRComponent
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.utils import console
from reflex.vars.base import Var
@@ -45,91 +45,39 @@ class Plotly(NoSSRComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_after_plot: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_animated: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_animating_frame: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_animation_interrupted: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_autosize: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_before_hover: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_button_clicked: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_deselect: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_hover: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_redraw: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_relayout: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_relayouting: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_restyle: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_selected: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_selecting: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_transition_interrupted: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_transitioning: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_unhover: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_after_plot: Optional[EventType] = None,
+ on_animated: Optional[EventType] = None,
+ on_animating_frame: Optional[EventType] = None,
+ on_animation_interrupted: Optional[EventType] = None,
+ on_autosize: Optional[EventType] = None,
+ on_before_hover: Optional[EventType] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_button_clicked: Optional[EventType] = None,
+ on_click: Optional[EventType] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_deselect: Optional[EventType] = None,
+ on_double_click: Optional[EventType] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_hover: Optional[EventType] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_redraw: Optional[EventType] = None,
+ on_relayout: Optional[EventType] = None,
+ on_relayouting: Optional[EventType] = None,
+ on_restyle: Optional[EventType] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_selected: Optional[EventType] = None,
+ on_selecting: Optional[EventType] = None,
+ on_transition_interrupted: Optional[EventType] = None,
+ on_transitioning: Optional[EventType] = None,
+ on_unhover: Optional[EventType] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Plotly":
"""Create the Plotly component.
diff --git a/reflex/components/radix/primitives/accordion.py b/reflex/components/radix/primitives/accordion.py
index 40cbfa2a7..bbcecb1d8 100644
--- a/reflex/components/radix/primitives/accordion.py
+++ b/reflex/components/radix/primitives/accordion.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Any, List, Literal, Optional, Union
+from typing import Any, List, Literal, Optional, Tuple, Union
from reflex.components.component import Component, ComponentNamespace
from reflex.components.core.colors import color
@@ -71,6 +71,18 @@ class AccordionComponent(RadixPrimitiveComponent):
return ["color_scheme", "variant"]
+def on_value_change(value: Var[str | List[str]]) -> Tuple[Var[str | List[str]]]:
+ """Handle the on_value_change event.
+
+ Args:
+ value: The value of the event.
+
+ Returns:
+ The value of the event.
+ """
+ return (value,)
+
+
class AccordionRoot(AccordionComponent):
"""An accordion component."""
@@ -114,7 +126,7 @@ class AccordionRoot(AccordionComponent):
_valid_children: List[str] = ["AccordionItem"]
# Fired when the opened the accordions changes.
- on_value_change: EventHandler[lambda e0: [e0]]
+ on_value_change: EventHandler[on_value_change]
def _exclude_props(self) -> list[str]:
return super()._exclude_props() + [
diff --git a/reflex/components/radix/primitives/accordion.pyi b/reflex/components/radix/primitives/accordion.pyi
index 5d86636ad..b975cfebe 100644
--- a/reflex/components/radix/primitives/accordion.pyi
+++ b/reflex/components/radix/primitives/accordion.pyi
@@ -3,12 +3,12 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, List, Literal, Optional, Union, overload
+from typing import Any, Dict, List, Literal, Optional, Tuple, Union, overload
from reflex.components.component import Component, ComponentNamespace
from reflex.components.lucide.icon import Icon
from reflex.components.radix.primitives.base import RadixPrimitiveComponent
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -101,41 +101,21 @@ class AccordionComponent(RadixPrimitiveComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "AccordionComponent":
"""Create the component.
@@ -158,6 +138,8 @@ class AccordionComponent(RadixPrimitiveComponent):
"""
...
+def on_value_change(value: Var[str | List[str]]) -> Tuple[Var[str | List[str]]]: ...
+
class AccordionRoot(AccordionComponent):
def add_style(self): ...
@overload
@@ -265,44 +247,22 @@ class AccordionRoot(AccordionComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_value_change: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
+ on_value_change: Optional[EventType[str | List[str]]] = None,
**props,
) -> "AccordionRoot":
"""Create the component.
@@ -421,41 +381,21 @@ class AccordionItem(AccordionComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "AccordionItem":
"""Create an accordion item.
@@ -565,41 +505,21 @@ class AccordionHeader(AccordionComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "AccordionHeader":
"""Create the Accordion header component.
@@ -705,41 +625,21 @@ class AccordionTrigger(AccordionComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "AccordionTrigger":
"""Create the Accordion trigger component.
@@ -777,41 +677,21 @@ class AccordionIcon(Icon):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "AccordionIcon":
"""Create the Accordion icon component.
@@ -914,41 +794,21 @@ class AccordionContent(AccordionComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "AccordionContent":
"""Create the Accordion content component.
diff --git a/reflex/components/radix/primitives/base.pyi b/reflex/components/radix/primitives/base.pyi
index 3f1194424..3eacd3f07 100644
--- a/reflex/components/radix/primitives/base.pyi
+++ b/reflex/components/radix/primitives/base.pyi
@@ -3,10 +3,10 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Optional, Union, overload
+from typing import Any, Dict, Optional, Union, overload
from reflex.components.component import Component
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -23,41 +23,21 @@ class RadixPrimitiveComponent(Component):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "RadixPrimitiveComponent":
"""Create the component.
@@ -91,41 +71,21 @@ class RadixPrimitiveComponentWithClassName(RadixPrimitiveComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "RadixPrimitiveComponentWithClassName":
"""Create the component.
diff --git a/reflex/components/radix/primitives/drawer.py b/reflex/components/radix/primitives/drawer.py
index b814e878f..6fe4d10dd 100644
--- a/reflex/components/radix/primitives/drawer.py
+++ b/reflex/components/radix/primitives/drawer.py
@@ -10,7 +10,8 @@ from reflex.components.component import Component, ComponentNamespace
from reflex.components.radix.primitives.base import RadixPrimitiveComponent
from reflex.components.radix.themes.base import Theme
from reflex.components.radix.themes.layout.flex import Flex
-from reflex.event import EventHandler
+from reflex.event import EventHandler, empty_event, identity_event
+from reflex.utils import console
from reflex.vars.base import Var
@@ -60,7 +61,7 @@ class DrawerRoot(DrawerComponent):
preventScrollRestoration: Var[bool]
# Fires when the drawer is opened.
- on_open_change: EventHandler[lambda e0: [e0]]
+ on_open_change: EventHandler[identity_event(bool)]
class DrawerTrigger(DrawerComponent):
@@ -127,20 +128,20 @@ class DrawerContent(DrawerComponent):
base_style.update(style)
return {"css": base_style}
- # Fired when the drawer content is opened.
- on_open_auto_focus: EventHandler[lambda e0: [e0.target.value]]
+ # Fired when the drawer content is opened. Deprecated.
+ on_open_auto_focus: EventHandler[empty_event]
- # Fired when the drawer content is closed.
- on_close_auto_focus: EventHandler[lambda e0: [e0.target.value]]
+ # Fired when the drawer content is closed. Deprecated.
+ on_close_auto_focus: EventHandler[empty_event]
- # Fired when the escape key is pressed.
- on_escape_key_down: EventHandler[lambda e0: [e0.target.value]]
+ # Fired when the escape key is pressed. Deprecated.
+ on_escape_key_down: EventHandler[empty_event]
- # Fired when the pointer is down outside the drawer content.
- on_pointer_down_outside: EventHandler[lambda e0: [e0.target.value]]
+ # Fired when the pointer is down outside the drawer content. Deprecated.
+ on_pointer_down_outside: EventHandler[empty_event]
- # Fired when interacting outside the drawer content.
- on_interact_outside: EventHandler[lambda e0: [e0.target.value]]
+ # Fired when interacting outside the drawer content. Deprecated.
+ on_interact_outside: EventHandler[empty_event]
@classmethod
def create(cls, *children, **props):
@@ -157,6 +158,23 @@ class DrawerContent(DrawerComponent):
Returns:
The drawer content.
"""
+ deprecated_properties = [
+ "on_open_auto_focus",
+ "on_close_auto_focus",
+ "on_escape_key_down",
+ "on_pointer_down_outside",
+ "on_interact_outside",
+ ]
+
+ for prop in deprecated_properties:
+ if prop in props:
+ console.deprecate(
+ feature_name="drawer content events",
+ reason=f"The `{prop}` event is deprecated and will be removed in 0.7.0.",
+ deprecation_version="0.6.3",
+ removal_version="0.7.0",
+ )
+
comp = super().create(*children, **props)
return Theme.create(comp)
diff --git a/reflex/components/radix/primitives/drawer.pyi b/reflex/components/radix/primitives/drawer.pyi
index 269d86d47..9c5463e56 100644
--- a/reflex/components/radix/primitives/drawer.pyi
+++ b/reflex/components/radix/primitives/drawer.pyi
@@ -3,11 +3,11 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, List, Literal, Optional, Union, overload
+from typing import Any, Dict, List, Literal, Optional, Union, overload
from reflex.components.component import ComponentNamespace
from reflex.components.radix.primitives.base import RadixPrimitiveComponent
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -24,41 +24,21 @@ class DrawerComponent(RadixPrimitiveComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "DrawerComponent":
"""Create the component.
@@ -108,44 +88,22 @@ class DrawerRoot(DrawerComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_open_change: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_open_change: Optional[EventType] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "DrawerRoot":
"""Create the component.
@@ -188,41 +146,21 @@ class DrawerTrigger(DrawerComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "DrawerTrigger":
"""Create a new DrawerTrigger instance.
@@ -249,41 +187,21 @@ class DrawerPortal(DrawerComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "DrawerPortal":
"""Create the component.
@@ -317,56 +235,26 @@ class DrawerContent(DrawerComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_close_auto_focus: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_escape_key_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_interact_outside: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_open_auto_focus: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_pointer_down_outside: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_close_auto_focus: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_escape_key_down: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_interact_outside: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_open_auto_focus: Optional[EventType[[]]] = None,
+ on_pointer_down_outside: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "DrawerContent":
"""Create a Drawer Content.
@@ -404,41 +292,21 @@ class DrawerOverlay(DrawerComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "DrawerOverlay":
"""Create the component.
@@ -472,41 +340,21 @@ class DrawerClose(DrawerTrigger):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "DrawerClose":
"""Create a new DrawerTrigger instance.
@@ -533,41 +381,21 @@ class DrawerTitle(DrawerComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "DrawerTitle":
"""Create the component.
@@ -601,41 +429,21 @@ class DrawerDescription(DrawerComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "DrawerDescription":
"""Create the component.
@@ -690,44 +498,22 @@ class Drawer(ComponentNamespace):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_open_change: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_open_change: Optional[EventType] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "DrawerRoot":
"""Create the component.
diff --git a/reflex/components/radix/primitives/form.py b/reflex/components/radix/primitives/form.py
index 63a4056e0..4d4be7e40 100644
--- a/reflex/components/radix/primitives/form.py
+++ b/reflex/components/radix/primitives/form.py
@@ -8,7 +8,7 @@ from reflex.components.component import ComponentNamespace
from reflex.components.core.debounce import DebounceInput
from reflex.components.el.elements.forms import Form as HTMLForm
from reflex.components.radix.themes.components.text_field import TextFieldRoot
-from reflex.event import EventHandler
+from reflex.event import EventHandler, empty_event
from reflex.vars.base import Var
from .base import RadixPrimitiveComponentWithClassName
@@ -17,7 +17,7 @@ from .base import RadixPrimitiveComponentWithClassName
class FormComponent(RadixPrimitiveComponentWithClassName):
"""Base class for all @radix-ui/react-form components."""
- library = "@radix-ui/react-form@^0.0.3"
+ library = "@radix-ui/react-form@^0.1.0"
class FormRoot(FormComponent, HTMLForm):
@@ -28,7 +28,7 @@ class FormRoot(FormComponent, HTMLForm):
alias = "RadixFormRoot"
# Fired when the errors are cleared.
- on_clear_server_errors: EventHandler[lambda: []]
+ on_clear_server_errors: EventHandler[empty_event]
def add_style(self) -> dict[str, Any] | None:
"""Add style to the component.
diff --git a/reflex/components/radix/primitives/form.pyi b/reflex/components/radix/primitives/form.pyi
index 75efc1a3f..2139f0c23 100644
--- a/reflex/components/radix/primitives/form.pyi
+++ b/reflex/components/radix/primitives/form.pyi
@@ -3,11 +3,11 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Literal, Optional, Union, overload
+from typing import Any, Dict, Literal, Optional, Union, overload
from reflex.components.component import ComponentNamespace
from reflex.components.el.elements.forms import Form as HTMLForm
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -26,41 +26,21 @@ class FormComponent(RadixPrimitiveComponentWithClassName):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "FormComponent":
"""Create the component.
@@ -134,45 +114,23 @@ class FormRoot(FormComponent, HTMLForm):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_clear_server_errors: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_submit: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_clear_server_errors: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_submit: Optional[EventType[Dict[str, Any]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "FormRoot":
"""Create a form component.
@@ -236,41 +194,21 @@ class FormField(FormComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "FormField":
"""Create the component.
@@ -307,41 +245,21 @@ class FormLabel(FormComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "FormLabel":
"""Create the component.
@@ -375,41 +293,21 @@ class FormControl(FormComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "FormControl":
"""Create a Form Control component.
@@ -493,41 +391,21 @@ class FormMessage(FormComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "FormMessage":
"""Create the component.
@@ -564,41 +442,21 @@ class FormValidityState(FormComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "FormValidityState":
"""Create the component.
@@ -632,41 +490,21 @@ class FormSubmit(FormComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "FormSubmit":
"""Create the component.
@@ -741,45 +579,23 @@ class Form(FormRoot):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_clear_server_errors: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_submit: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_clear_server_errors: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_submit: Optional[EventType[Dict[str, Any]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Form":
"""Create a form component.
@@ -885,45 +701,23 @@ class FormNamespace(ComponentNamespace):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_clear_server_errors: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_submit: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_clear_server_errors: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_submit: Optional[EventType[Dict[str, Any]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Form":
"""Create a form component.
diff --git a/reflex/components/radix/primitives/progress.pyi b/reflex/components/radix/primitives/progress.pyi
index 4e185a903..c760c0a57 100644
--- a/reflex/components/radix/primitives/progress.pyi
+++ b/reflex/components/radix/primitives/progress.pyi
@@ -3,11 +3,11 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Literal, Optional, Union, overload
+from typing import Any, Dict, Literal, Optional, Union, overload
from reflex.components.component import ComponentNamespace
from reflex.components.radix.primitives.base import RadixPrimitiveComponentWithClassName
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -24,41 +24,21 @@ class ProgressComponent(RadixPrimitiveComponentWithClassName):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "ProgressComponent":
"""Create the component.
@@ -99,41 +79,21 @@ class ProgressRoot(ProgressComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "ProgressRoot":
"""Create the component.
@@ -233,41 +193,21 @@ class ProgressIndicator(ProgressComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "ProgressIndicator":
"""Create the component.
@@ -374,41 +314,21 @@ class Progress(ProgressRoot):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Progress":
"""High-level API for progress bar.
@@ -516,41 +436,21 @@ class ProgressNamespace(ComponentNamespace):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Progress":
"""High-level API for progress bar.
diff --git a/reflex/components/radix/primitives/slider.py b/reflex/components/radix/primitives/slider.py
index dd3108f0e..10a0079a4 100644
--- a/reflex/components/radix/primitives/slider.py
+++ b/reflex/components/radix/primitives/slider.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Any, List, Literal
+from typing import Any, List, Literal, Tuple
from reflex.components.component import Component, ComponentNamespace
from reflex.components.radix.primitives.base import RadixPrimitiveComponentWithClassName
@@ -19,6 +19,20 @@ class SliderComponent(RadixPrimitiveComponentWithClassName):
library = "@radix-ui/react-slider@^1.1.2"
+def on_value_event_spec(
+ value: Var[List[int]],
+) -> Tuple[Var[List[int]]]:
+ """Event handler spec for the value event.
+
+ Args:
+ value: The value of the event.
+
+ Returns:
+ The event handler spec.
+ """
+ return (value,) # type: ignore
+
+
class SliderRoot(SliderComponent):
"""The Slider component comtaining all slider parts."""
@@ -48,10 +62,10 @@ class SliderRoot(SliderComponent):
min_steps_between_thumbs: Var[int]
# Fired when the value of a thumb changes.
- on_value_change: EventHandler[lambda e0: [e0]]
+ on_value_change: EventHandler[on_value_event_spec]
# Fired when a thumb is released.
- on_value_commit: EventHandler[lambda e0: [e0]]
+ on_value_commit: EventHandler[on_value_event_spec]
def add_style(self) -> dict[str, Any] | None:
"""Add style to the component.
diff --git a/reflex/components/radix/primitives/slider.pyi b/reflex/components/radix/primitives/slider.pyi
index 782a83776..3d57fbe5c 100644
--- a/reflex/components/radix/primitives/slider.pyi
+++ b/reflex/components/radix/primitives/slider.pyi
@@ -3,11 +3,11 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, List, Literal, Optional, Union, overload
+from typing import Any, Dict, List, Literal, Optional, Tuple, Union, overload
from reflex.components.component import Component, ComponentNamespace
from reflex.components.radix.primitives.base import RadixPrimitiveComponentWithClassName
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -27,41 +27,21 @@ class SliderComponent(RadixPrimitiveComponentWithClassName):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "SliderComponent":
"""Create the component.
@@ -82,6 +62,8 @@ class SliderComponent(RadixPrimitiveComponentWithClassName):
"""
...
+def on_value_event_spec(value: Var[List[int]]) -> Tuple[Var[List[int]]]: ...
+
class SliderRoot(SliderComponent):
def add_style(self) -> dict[str, Any] | None: ...
@overload
@@ -112,47 +94,23 @@ class SliderRoot(SliderComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_value_change: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_value_commit: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
+ on_value_change: Optional[EventType[List[int]]] = None,
+ on_value_commit: Optional[EventType[List[int]]] = None,
**props,
) -> "SliderRoot":
"""Create the component.
@@ -187,41 +145,21 @@ class SliderTrack(SliderComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "SliderTrack":
"""Create the component.
@@ -256,41 +194,21 @@ class SliderRange(SliderComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "SliderRange":
"""Create the component.
@@ -325,41 +243,21 @@ class SliderThumb(SliderComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "SliderThumb":
"""Create the component.
diff --git a/reflex/components/radix/themes/base.pyi b/reflex/components/radix/themes/base.pyi
index da3c922e9..0f0de5401 100644
--- a/reflex/components/radix/themes/base.pyi
+++ b/reflex/components/radix/themes/base.pyi
@@ -3,10 +3,10 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Literal, Optional, Union, overload
+from typing import Any, Dict, Literal, Optional, Union, overload
from reflex.components import Component
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.utils.imports import ImportDict
from reflex.vars.base import Var
@@ -103,41 +103,21 @@ class CommonMarginProps(Component):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "CommonMarginProps":
"""Create the component.
@@ -177,41 +157,21 @@ class RadixLoadingProp(Component):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "RadixLoadingProp":
"""Create the component.
@@ -244,41 +204,21 @@ class RadixThemesComponent(Component):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "RadixThemesComponent":
"""Create a new component instance.
@@ -313,41 +253,21 @@ class RadixThemesTriggerComponent(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "RadixThemesTriggerComponent":
"""Create a new RadixThemesTriggerComponent instance.
@@ -465,41 +385,21 @@ class Theme(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Theme":
"""Create a new Radix Theme specification.
@@ -544,41 +444,21 @@ class ThemePanel(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "ThemePanel":
"""Create a new component instance.
@@ -614,41 +494,21 @@ class RadixThemesColorModeProvider(Component):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "RadixThemesColorModeProvider":
"""Create the component.
diff --git a/reflex/components/radix/themes/color_mode.pyi b/reflex/components/radix/themes/color_mode.pyi
index d41019747..43703dc37 100644
--- a/reflex/components/radix/themes/color_mode.pyi
+++ b/reflex/components/radix/themes/color_mode.pyi
@@ -3,23 +3,14 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import (
- Any,
- Callable,
- Dict,
- List,
- Literal,
- Optional,
- Union,
- overload,
-)
+from typing import Any, Dict, List, Literal, Optional, Union, overload
from reflex.components.component import BaseComponent
from reflex.components.core.breakpoints import Breakpoints
from reflex.components.core.cond import Cond
from reflex.components.lucide.icon import Icon
from reflex.components.radix.themes.components.switch import Switch
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import (
Style,
color_mode,
@@ -46,41 +37,21 @@ class ColorModeIcon(Cond):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "ColorModeIcon":
"""Create an icon component based on color_mode.
@@ -238,41 +209,21 @@ class ColorModeIconButton(IconButton):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "ColorModeIconButton":
"""Create a icon button component that calls toggle_color_mode on click.
@@ -431,42 +382,22 @@ class ColorModeSwitch(Switch):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_change: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_change: Optional[EventType] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "ColorModeSwitch":
"""Create a switch component bound to color_mode.
diff --git a/reflex/components/radix/themes/components/alert_dialog.py b/reflex/components/radix/themes/components/alert_dialog.py
index ca876b4c3..f3c8ec319 100644
--- a/reflex/components/radix/themes/components/alert_dialog.py
+++ b/reflex/components/radix/themes/components/alert_dialog.py
@@ -5,7 +5,7 @@ from typing import Literal
from reflex.components.component import ComponentNamespace
from reflex.components.core.breakpoints import Responsive
from reflex.components.el import elements
-from reflex.event import EventHandler
+from reflex.event import EventHandler, empty_event, identity_event
from reflex.vars.base import Var
from ..base import RadixThemesComponent, RadixThemesTriggerComponent
@@ -22,7 +22,7 @@ class AlertDialogRoot(RadixThemesComponent):
open: Var[bool]
# Fired when the open state changes.
- on_open_change: EventHandler[lambda e0: [e0]]
+ on_open_change: EventHandler[identity_event(bool)]
class AlertDialogTrigger(RadixThemesTriggerComponent):
@@ -43,13 +43,13 @@ class AlertDialogContent(elements.Div, RadixThemesComponent):
force_mount: Var[bool]
# Fired when the dialog is opened.
- on_open_auto_focus: EventHandler[lambda e0: [e0]]
+ on_open_auto_focus: EventHandler[empty_event]
# Fired when the dialog is closed.
- on_close_auto_focus: EventHandler[lambda e0: [e0]]
+ on_close_auto_focus: EventHandler[empty_event]
# Fired when the escape key is pressed.
- on_escape_key_down: EventHandler[lambda e0: [e0]]
+ on_escape_key_down: EventHandler[empty_event]
class AlertDialogTitle(RadixThemesComponent):
diff --git a/reflex/components/radix/themes/components/alert_dialog.pyi b/reflex/components/radix/themes/components/alert_dialog.pyi
index 019b3f89b..d63fcae53 100644
--- a/reflex/components/radix/themes/components/alert_dialog.pyi
+++ b/reflex/components/radix/themes/components/alert_dialog.pyi
@@ -3,12 +3,12 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Literal, Optional, Union, overload
+from typing import Any, Dict, Literal, Optional, Union, overload
from reflex.components.component import ComponentNamespace
from reflex.components.core.breakpoints import Breakpoints
from reflex.components.el import elements
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -29,44 +29,22 @@ class AlertDialogRoot(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_open_change: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_open_change: Optional[EventType] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "AlertDialogRoot":
"""Create a new component instance.
@@ -102,41 +80,21 @@ class AlertDialogTrigger(RadixThemesTriggerComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "AlertDialogTrigger":
"""Create a new RadixThemesTriggerComponent instance.
@@ -199,50 +157,24 @@ class AlertDialogContent(elements.Div, RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_close_auto_focus: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_escape_key_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_open_auto_focus: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_close_auto_focus: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_escape_key_down: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_open_auto_focus: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "AlertDialogContent":
"""Create a new component instance.
@@ -295,41 +227,21 @@ class AlertDialogTitle(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "AlertDialogTitle":
"""Create a new component instance.
@@ -364,41 +276,21 @@ class AlertDialogDescription(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "AlertDialogDescription":
"""Create a new component instance.
@@ -433,41 +325,21 @@ class AlertDialogAction(RadixThemesTriggerComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "AlertDialogAction":
"""Create a new RadixThemesTriggerComponent instance.
@@ -493,41 +365,21 @@ class AlertDialogCancel(RadixThemesTriggerComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "AlertDialogCancel":
"""Create a new RadixThemesTriggerComponent instance.
diff --git a/reflex/components/radix/themes/components/aspect_ratio.pyi b/reflex/components/radix/themes/components/aspect_ratio.pyi
index 024261d91..848d2064a 100644
--- a/reflex/components/radix/themes/components/aspect_ratio.pyi
+++ b/reflex/components/radix/themes/components/aspect_ratio.pyi
@@ -3,9 +3,9 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Optional, Union, overload
+from typing import Any, Dict, Optional, Union, overload
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -24,41 +24,21 @@ class AspectRatio(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "AspectRatio":
"""Create a new component instance.
diff --git a/reflex/components/radix/themes/components/avatar.pyi b/reflex/components/radix/themes/components/avatar.pyi
index ee6ef6e31..fc42457da 100644
--- a/reflex/components/radix/themes/components/avatar.pyi
+++ b/reflex/components/radix/themes/components/avatar.pyi
@@ -3,10 +3,10 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Literal, Optional, Union, overload
+from typing import Any, Dict, Literal, Optional, Union, overload
from reflex.components.core.breakpoints import Breakpoints
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -114,41 +114,21 @@ class Avatar(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Avatar":
"""Create a new component instance.
diff --git a/reflex/components/radix/themes/components/badge.pyi b/reflex/components/radix/themes/components/badge.pyi
index d5c2f2697..405b7b835 100644
--- a/reflex/components/radix/themes/components/badge.pyi
+++ b/reflex/components/radix/themes/components/badge.pyi
@@ -3,11 +3,11 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Literal, Optional, Union, overload
+from typing import Any, Dict, Literal, Optional, Union, overload
from reflex.components.core.breakpoints import Breakpoints
from reflex.components.el import elements
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -135,41 +135,21 @@ class Badge(elements.Span, RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Badge":
"""Create a new component instance.
diff --git a/reflex/components/radix/themes/components/button.pyi b/reflex/components/radix/themes/components/button.pyi
index de9651dd9..f9702d3b5 100644
--- a/reflex/components/radix/themes/components/button.pyi
+++ b/reflex/components/radix/themes/components/button.pyi
@@ -3,11 +3,11 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Literal, Optional, Union, overload
+from typing import Any, Dict, Literal, Optional, Union, overload
from reflex.components.core.breakpoints import Breakpoints
from reflex.components.el import elements
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -158,41 +158,21 @@ class Button(elements.Button, RadixLoadingProp, RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Button":
"""Create a new component instance.
diff --git a/reflex/components/radix/themes/components/callout.pyi b/reflex/components/radix/themes/components/callout.pyi
index 5caa825d6..18ae5a357 100644
--- a/reflex/components/radix/themes/components/callout.pyi
+++ b/reflex/components/radix/themes/components/callout.pyi
@@ -3,12 +3,12 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Literal, Optional, Union, overload
+from typing import Any, Dict, Literal, Optional, Union, overload
from reflex.components.component import ComponentNamespace
from reflex.components.core.breakpoints import Breakpoints
from reflex.components.el import elements
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -133,41 +133,21 @@ class CalloutRoot(elements.Div, RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "CalloutRoot":
"""Create a new component instance.
@@ -247,41 +227,21 @@ class CalloutIcon(elements.Div, RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "CalloutIcon":
"""Create a new component instance.
@@ -356,41 +316,21 @@ class CalloutText(elements.P, RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "CalloutText":
"""Create a new component instance.
@@ -548,41 +488,21 @@ class Callout(CalloutRoot):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Callout":
"""Create a callout component.
@@ -746,41 +666,21 @@ class CalloutNamespace(ComponentNamespace):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Callout":
"""Create a callout component.
diff --git a/reflex/components/radix/themes/components/card.pyi b/reflex/components/radix/themes/components/card.pyi
index d2bc6f68c..dc45bc226 100644
--- a/reflex/components/radix/themes/components/card.pyi
+++ b/reflex/components/radix/themes/components/card.pyi
@@ -3,11 +3,11 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Literal, Optional, Union, overload
+from typing import Any, Dict, Literal, Optional, Union, overload
from reflex.components.core.breakpoints import Breakpoints
from reflex.components.el import elements
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -68,41 +68,21 @@ class Card(elements.Div, RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Card":
"""Create a new component instance.
diff --git a/reflex/components/radix/themes/components/checkbox.py b/reflex/components/radix/themes/components/checkbox.py
index 6ba1b04da..2944b1f11 100644
--- a/reflex/components/radix/themes/components/checkbox.py
+++ b/reflex/components/radix/themes/components/checkbox.py
@@ -6,7 +6,7 @@ from reflex.components.component import Component, ComponentNamespace
from reflex.components.core.breakpoints import Responsive
from reflex.components.radix.themes.layout.flex import Flex
from reflex.components.radix.themes.typography.text import Text
-from reflex.event import EventHandler
+from reflex.event import EventHandler, identity_event
from reflex.vars.base import LiteralVar, Var
from ..base import (
@@ -61,7 +61,7 @@ class Checkbox(RadixThemesComponent):
_rename_props = {"onChange": "onCheckedChange"}
# Fired when the checkbox is checked or unchecked.
- on_change: EventHandler[lambda e0: [e0]]
+ on_change: EventHandler[identity_event(bool)]
class HighLevelCheckbox(RadixThemesComponent):
@@ -112,7 +112,7 @@ class HighLevelCheckbox(RadixThemesComponent):
_rename_props = {"onChange": "onCheckedChange"}
# Fired when the checkbox is checked or unchecked.
- on_change: EventHandler[lambda e0: [e0]]
+ on_change: EventHandler[identity_event(bool)]
@classmethod
def create(cls, text: Var[str] = LiteralVar.create(""), **props) -> Component:
diff --git a/reflex/components/radix/themes/components/checkbox.pyi b/reflex/components/radix/themes/components/checkbox.pyi
index 978c3e8c2..fad4f5210 100644
--- a/reflex/components/radix/themes/components/checkbox.pyi
+++ b/reflex/components/radix/themes/components/checkbox.pyi
@@ -3,11 +3,11 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Literal, Optional, Union, overload
+from typing import Any, Dict, Literal, Optional, Union, overload
from reflex.components.component import ComponentNamespace
from reflex.components.core.breakpoints import Breakpoints
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -115,42 +115,22 @@ class Checkbox(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_change: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_change: Optional[EventType] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Checkbox":
"""Create a new component instance.
@@ -282,42 +262,22 @@ class HighLevelCheckbox(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_change: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_change: Optional[EventType] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "HighLevelCheckbox":
"""Create a checkbox with a label.
@@ -446,42 +406,22 @@ class CheckboxNamespace(ComponentNamespace):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_change: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_change: Optional[EventType] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "HighLevelCheckbox":
"""Create a checkbox with a label.
diff --git a/reflex/components/radix/themes/components/checkbox_cards.pyi b/reflex/components/radix/themes/components/checkbox_cards.pyi
index 086630a3b..062fc1357 100644
--- a/reflex/components/radix/themes/components/checkbox_cards.pyi
+++ b/reflex/components/radix/themes/components/checkbox_cards.pyi
@@ -4,10 +4,10 @@
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
from types import SimpleNamespace
-from typing import Any, Callable, Dict, Literal, Optional, Union, overload
+from typing import Any, Dict, Literal, Optional, Union, overload
from reflex.components.core.breakpoints import Breakpoints
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -148,41 +148,21 @@ class CheckboxCardsRoot(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "CheckboxCardsRoot":
"""Create a new component instance.
@@ -223,41 +203,21 @@ class CheckboxCardsItem(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "CheckboxCardsItem":
"""Create a new component instance.
diff --git a/reflex/components/radix/themes/components/checkbox_group.pyi b/reflex/components/radix/themes/components/checkbox_group.pyi
index 21f0ad23a..363be0599 100644
--- a/reflex/components/radix/themes/components/checkbox_group.pyi
+++ b/reflex/components/radix/themes/components/checkbox_group.pyi
@@ -4,10 +4,10 @@
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
from types import SimpleNamespace
-from typing import Any, Callable, Dict, List, Literal, Optional, Union, overload
+from typing import Any, Dict, List, Literal, Optional, Union, overload
from reflex.components.core.breakpoints import Breakpoints
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -107,41 +107,21 @@ class CheckboxGroupRoot(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "CheckboxGroupRoot":
"""Create a new component instance.
@@ -184,41 +164,21 @@ class CheckboxGroupItem(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "CheckboxGroupItem":
"""Create a new component instance.
diff --git a/reflex/components/radix/themes/components/context_menu.py b/reflex/components/radix/themes/components/context_menu.py
index c82f8e714..3eb54a457 100644
--- a/reflex/components/radix/themes/components/context_menu.py
+++ b/reflex/components/radix/themes/components/context_menu.py
@@ -4,7 +4,7 @@ from typing import List, Literal
from reflex.components.component import ComponentNamespace
from reflex.components.core.breakpoints import Responsive
-from reflex.event import EventHandler
+from reflex.event import EventHandler, empty_event, identity_event
from reflex.vars.base import Var
from ..base import (
@@ -24,7 +24,7 @@ class ContextMenuRoot(RadixThemesComponent):
_invalid_children: List[str] = ["ContextMenuItem"]
# Fired when the open state changes.
- on_open_change: EventHandler[lambda e0: [e0]]
+ on_open_change: EventHandler[identity_event(bool)]
class ContextMenuTrigger(RadixThemesComponent):
@@ -64,19 +64,19 @@ class ContextMenuContent(RadixThemesComponent):
avoid_collisions: Var[bool]
# Fired when the context menu is closed.
- on_close_auto_focus: EventHandler[lambda e0: [e0]]
+ on_close_auto_focus: EventHandler[empty_event]
# Fired when the escape key is pressed.
- on_escape_key_down: EventHandler[lambda e0: [e0]]
+ on_escape_key_down: EventHandler[empty_event]
# Fired when a pointer down event happens outside the context menu.
- on_pointer_down_outside: EventHandler[lambda e0: [e0]]
+ on_pointer_down_outside: EventHandler[empty_event]
# Fired when focus moves outside the context menu.
- on_focus_outside: EventHandler[lambda e0: [e0]]
+ on_focus_outside: EventHandler[empty_event]
# Fired when interacting outside the context menu.
- on_interact_outside: EventHandler[lambda e0: [e0]]
+ on_interact_outside: EventHandler[empty_event]
class ContextMenuSub(RadixThemesComponent):
@@ -107,16 +107,16 @@ class ContextMenuSubContent(RadixThemesComponent):
_valid_parents: List[str] = ["ContextMenuSub"]
# Fired when the escape key is pressed.
- on_escape_key_down: EventHandler[lambda e0: [e0]]
+ on_escape_key_down: EventHandler[empty_event]
# Fired when a pointer down event happens outside the context menu.
- on_pointer_down_outside: EventHandler[lambda e0: [e0]]
+ on_pointer_down_outside: EventHandler[empty_event]
# Fired when focus moves outside the context menu.
- on_focus_outside: EventHandler[lambda e0: [e0]]
+ on_focus_outside: EventHandler[empty_event]
# Fired when interacting outside the context menu.
- on_interact_outside: EventHandler[lambda e0: [e0]]
+ on_interact_outside: EventHandler[empty_event]
class ContextMenuItem(RadixThemesComponent):
diff --git a/reflex/components/radix/themes/components/context_menu.pyi b/reflex/components/radix/themes/components/context_menu.pyi
index 6295ccb49..fbefa88de 100644
--- a/reflex/components/radix/themes/components/context_menu.pyi
+++ b/reflex/components/radix/themes/components/context_menu.pyi
@@ -3,11 +3,11 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Literal, Optional, Union, overload
+from typing import Any, Dict, Literal, Optional, Union, overload
from reflex.components.component import ComponentNamespace
from reflex.components.core.breakpoints import Breakpoints
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -26,44 +26,22 @@ class ContextMenuRoot(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_open_change: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_open_change: Optional[EventType] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "ContextMenuRoot":
"""Create a new component instance.
@@ -100,41 +78,21 @@ class ContextMenuTrigger(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "ContextMenuTrigger":
"""Create a new component instance.
@@ -245,56 +203,26 @@ class ContextMenuContent(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_close_auto_focus: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_escape_key_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_focus_outside: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_interact_outside: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_pointer_down_outside: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_close_auto_focus: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_escape_key_down: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_focus_outside: Optional[EventType[[]]] = None,
+ on_interact_outside: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_pointer_down_outside: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "ContextMenuContent":
"""Create a new component instance.
@@ -335,41 +263,21 @@ class ContextMenuSub(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "ContextMenuSub":
"""Create a new component instance.
@@ -405,41 +313,21 @@ class ContextMenuSubTrigger(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "ContextMenuSubTrigger":
"""Create a new component instance.
@@ -476,53 +364,25 @@ class ContextMenuSubContent(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_escape_key_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_focus_outside: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_interact_outside: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_pointer_down_outside: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_escape_key_down: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_focus_outside: Optional[EventType[[]]] = None,
+ on_interact_outside: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_pointer_down_outside: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "ContextMenuSubContent":
"""Create a new component instance.
@@ -621,41 +481,21 @@ class ContextMenuItem(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "ContextMenuItem":
"""Create a new component instance.
@@ -692,41 +532,21 @@ class ContextMenuSeparator(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "ContextMenuSeparator":
"""Create a new component instance.
diff --git a/reflex/components/radix/themes/components/data_list.pyi b/reflex/components/radix/themes/components/data_list.pyi
index dafc0fa0b..342fa6e77 100644
--- a/reflex/components/radix/themes/components/data_list.pyi
+++ b/reflex/components/radix/themes/components/data_list.pyi
@@ -4,10 +4,10 @@
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
from types import SimpleNamespace
-from typing import Any, Callable, Dict, Literal, Optional, Union, overload
+from typing import Any, Dict, Literal, Optional, Union, overload
from reflex.components.core.breakpoints import Breakpoints
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -60,41 +60,21 @@ class DataListRoot(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "DataListRoot":
"""Create a new component instance.
@@ -149,41 +129,21 @@ class DataListItem(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "DataListItem":
"""Create a new component instance.
@@ -290,41 +250,21 @@ class DataListLabel(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "DataListLabel":
"""Create a new component instance.
@@ -363,41 +303,21 @@ class DataListValue(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "DataListValue":
"""Create a new component instance.
diff --git a/reflex/components/radix/themes/components/dialog.py b/reflex/components/radix/themes/components/dialog.py
index 951e8506d..e8da506ed 100644
--- a/reflex/components/radix/themes/components/dialog.py
+++ b/reflex/components/radix/themes/components/dialog.py
@@ -5,7 +5,7 @@ from typing import Literal
from reflex.components.component import ComponentNamespace
from reflex.components.core.breakpoints import Responsive
from reflex.components.el import elements
-from reflex.event import EventHandler
+from reflex.event import EventHandler, empty_event, identity_event
from reflex.vars.base import Var
from ..base import (
@@ -23,7 +23,7 @@ class DialogRoot(RadixThemesComponent):
open: Var[bool]
# Fired when the open state changes.
- on_open_change: EventHandler[lambda e0: [e0]]
+ on_open_change: EventHandler[identity_event(bool)]
class DialogTrigger(RadixThemesTriggerComponent):
@@ -47,19 +47,19 @@ class DialogContent(elements.Div, RadixThemesComponent):
size: Var[Responsive[Literal["1", "2", "3", "4"]]]
# Fired when the dialog is opened.
- on_open_auto_focus: EventHandler[lambda e0: [e0]]
+ on_open_auto_focus: EventHandler[empty_event]
# Fired when the dialog is closed.
- on_close_auto_focus: EventHandler[lambda e0: [e0]]
+ on_close_auto_focus: EventHandler[empty_event]
# Fired when the escape key is pressed.
- on_escape_key_down: EventHandler[lambda e0: [e0]]
+ on_escape_key_down: EventHandler[empty_event]
# Fired when the pointer is down outside the dialog.
- on_pointer_down_outside: EventHandler[lambda e0: [e0]]
+ on_pointer_down_outside: EventHandler[empty_event]
# Fired when the pointer interacts outside the dialog.
- on_interact_outside: EventHandler[lambda e0: [e0]]
+ on_interact_outside: EventHandler[empty_event]
class DialogDescription(RadixThemesComponent):
diff --git a/reflex/components/radix/themes/components/dialog.pyi b/reflex/components/radix/themes/components/dialog.pyi
index 827e50ea7..e3f17d7e8 100644
--- a/reflex/components/radix/themes/components/dialog.pyi
+++ b/reflex/components/radix/themes/components/dialog.pyi
@@ -3,12 +3,12 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Literal, Optional, Union, overload
+from typing import Any, Dict, Literal, Optional, Union, overload
from reflex.components.component import ComponentNamespace
from reflex.components.core.breakpoints import Breakpoints
from reflex.components.el import elements
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -27,44 +27,22 @@ class DialogRoot(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_open_change: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_open_change: Optional[EventType] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "DialogRoot":
"""Create a new component instance.
@@ -100,41 +78,21 @@ class DialogTrigger(RadixThemesTriggerComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "DialogTrigger":
"""Create a new RadixThemesTriggerComponent instance.
@@ -160,41 +118,21 @@ class DialogTitle(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "DialogTitle":
"""Create a new component instance.
@@ -265,56 +203,26 @@ class DialogContent(elements.Div, RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_close_auto_focus: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_escape_key_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_interact_outside: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_open_auto_focus: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_pointer_down_outside: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_close_auto_focus: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_escape_key_down: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_interact_outside: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_open_auto_focus: Optional[EventType[[]]] = None,
+ on_pointer_down_outside: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "DialogContent":
"""Create a new component instance.
@@ -366,41 +274,21 @@ class DialogDescription(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "DialogDescription":
"""Create a new component instance.
@@ -435,41 +323,21 @@ class DialogClose(RadixThemesTriggerComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "DialogClose":
"""Create a new RadixThemesTriggerComponent instance.
@@ -501,44 +369,22 @@ class Dialog(ComponentNamespace):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_open_change: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_open_change: Optional[EventType] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "DialogRoot":
"""Create a new component instance.
diff --git a/reflex/components/radix/themes/components/dropdown_menu.py b/reflex/components/radix/themes/components/dropdown_menu.py
index 5ed1f9f64..885e8df35 100644
--- a/reflex/components/radix/themes/components/dropdown_menu.py
+++ b/reflex/components/radix/themes/components/dropdown_menu.py
@@ -4,7 +4,7 @@ from typing import Dict, List, Literal, Union
from reflex.components.component import ComponentNamespace
from reflex.components.core.breakpoints import Responsive
-from reflex.event import EventHandler
+from reflex.event import EventHandler, empty_event, identity_event
from reflex.vars.base import Var
from ..base import (
@@ -50,7 +50,7 @@ class DropdownMenuRoot(RadixThemesComponent):
_invalid_children: List[str] = ["DropdownMenuItem"]
# Fired when the open state changes.
- on_open_change: EventHandler[lambda e0: [e0]]
+ on_open_change: EventHandler[identity_event(bool)]
class DropdownMenuTrigger(RadixThemesTriggerComponent):
@@ -120,19 +120,19 @@ class DropdownMenuContent(RadixThemesComponent):
hide_when_detached: Var[bool]
# Fired when the dialog is closed.
- on_close_auto_focus: EventHandler[lambda e0: [e0]]
+ on_close_auto_focus: EventHandler[empty_event]
# Fired when the escape key is pressed.
- on_escape_key_down: EventHandler[lambda e0: [e0]]
+ on_escape_key_down: EventHandler[empty_event]
# Fired when the pointer is down outside the dialog.
- on_pointer_down_outside: EventHandler[lambda e0: [e0]]
+ on_pointer_down_outside: EventHandler[empty_event]
# Fired when focus moves outside the dialog.
- on_focus_outside: EventHandler[lambda e0: [e0]]
+ on_focus_outside: EventHandler[empty_event]
# Fired when the pointer interacts outside the dialog.
- on_interact_outside: EventHandler[lambda e0: [e0]]
+ on_interact_outside: EventHandler[empty_event]
class DropdownMenuSubTrigger(RadixThemesTriggerComponent):
@@ -164,7 +164,7 @@ class DropdownMenuSub(RadixThemesComponent):
default_open: Var[bool]
# Fired when the open state changes.
- on_open_change: EventHandler[lambda e0: [e0.target.value]]
+ on_open_change: EventHandler[identity_event(bool)]
class DropdownMenuSubContent(RadixThemesComponent):
@@ -205,16 +205,16 @@ class DropdownMenuSubContent(RadixThemesComponent):
_valid_parents: List[str] = ["DropdownMenuSub"]
# Fired when the escape key is pressed.
- on_escape_key_down: EventHandler[lambda e0: [e0]]
+ on_escape_key_down: EventHandler[empty_event]
# Fired when the pointer is down outside the dialog.
- on_pointer_down_outside: EventHandler[lambda e0: [e0]]
+ on_pointer_down_outside: EventHandler[empty_event]
# Fired when focus moves outside the dialog.
- on_focus_outside: EventHandler[lambda e0: [e0]]
+ on_focus_outside: EventHandler[empty_event]
# Fired when the pointer interacts outside the dialog.
- on_interact_outside: EventHandler[lambda e0: [e0]]
+ on_interact_outside: EventHandler[empty_event]
class DropdownMenuItem(RadixThemesComponent):
@@ -240,7 +240,7 @@ class DropdownMenuItem(RadixThemesComponent):
_valid_parents: List[str] = ["DropdownMenuContent", "DropdownMenuSubContent"]
# Fired when the item is selected.
- on_select: EventHandler[lambda e0: [e0.target.value]]
+ on_select: EventHandler[empty_event]
class DropdownMenuSeparator(RadixThemesComponent):
diff --git a/reflex/components/radix/themes/components/dropdown_menu.pyi b/reflex/components/radix/themes/components/dropdown_menu.pyi
index 0995ef2e4..dba619e7d 100644
--- a/reflex/components/radix/themes/components/dropdown_menu.pyi
+++ b/reflex/components/radix/themes/components/dropdown_menu.pyi
@@ -3,11 +3,11 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Literal, Optional, Union, overload
+from typing import Any, Dict, Literal, Optional, Union, overload
from reflex.components.component import ComponentNamespace
from reflex.components.core.breakpoints import Breakpoints
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -36,44 +36,22 @@ class DropdownMenuRoot(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_open_change: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_open_change: Optional[EventType] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "DropdownMenuRoot":
"""Create a new component instance.
@@ -113,41 +91,21 @@ class DropdownMenuTrigger(RadixThemesTriggerComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "DropdownMenuTrigger":
"""Create a new RadixThemesTriggerComponent instance.
@@ -277,56 +235,26 @@ class DropdownMenuContent(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_close_auto_focus: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_escape_key_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_focus_outside: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_interact_outside: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_pointer_down_outside: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_close_auto_focus: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_escape_key_down: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_focus_outside: Optional[EventType[[]]] = None,
+ on_interact_outside: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_pointer_down_outside: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "DropdownMenuContent":
"""Create a new component instance.
@@ -380,41 +308,21 @@ class DropdownMenuSubTrigger(RadixThemesTriggerComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "DropdownMenuSubTrigger":
"""Create a new RadixThemesTriggerComponent instance.
@@ -442,44 +350,22 @@ class DropdownMenuSub(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_open_change: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_open_change: Optional[EventType] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "DropdownMenuSub":
"""Create a new component instance.
@@ -535,53 +421,25 @@ class DropdownMenuSubContent(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_escape_key_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_focus_outside: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_interact_outside: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_pointer_down_outside: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_escape_key_down: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_focus_outside: Optional[EventType[[]]] = None,
+ on_interact_outside: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_pointer_down_outside: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "DropdownMenuSubContent":
"""Create a new component instance.
@@ -692,42 +550,22 @@ class DropdownMenuItem(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_select: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_select: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "DropdownMenuItem":
"""Create a new component instance.
@@ -767,41 +605,21 @@ class DropdownMenuSeparator(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "DropdownMenuSeparator":
"""Create a new component instance.
diff --git a/reflex/components/radix/themes/components/hover_card.py b/reflex/components/radix/themes/components/hover_card.py
index d67a0396a..e76184795 100644
--- a/reflex/components/radix/themes/components/hover_card.py
+++ b/reflex/components/radix/themes/components/hover_card.py
@@ -5,7 +5,7 @@ from typing import Literal
from reflex.components.component import ComponentNamespace
from reflex.components.core.breakpoints import Responsive
from reflex.components.el import elements
-from reflex.event import EventHandler
+from reflex.event import EventHandler, identity_event
from reflex.vars.base import Var
from ..base import (
@@ -32,7 +32,7 @@ class HoverCardRoot(RadixThemesComponent):
close_delay: Var[int]
# Fired when the open state changes.
- on_open_change: EventHandler[lambda e0: [e0]]
+ on_open_change: EventHandler[identity_event(bool)]
class HoverCardTrigger(RadixThemesTriggerComponent):
diff --git a/reflex/components/radix/themes/components/hover_card.pyi b/reflex/components/radix/themes/components/hover_card.pyi
index 966d66276..8924ef1a8 100644
--- a/reflex/components/radix/themes/components/hover_card.pyi
+++ b/reflex/components/radix/themes/components/hover_card.pyi
@@ -3,12 +3,12 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Literal, Optional, Union, overload
+from typing import Any, Dict, Literal, Optional, Union, overload
from reflex.components.component import ComponentNamespace
from reflex.components.core.breakpoints import Breakpoints
from reflex.components.el import elements
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -30,44 +30,22 @@ class HoverCardRoot(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_open_change: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_open_change: Optional[EventType] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "HoverCardRoot":
"""Create a new component instance.
@@ -106,41 +84,21 @@ class HoverCardTrigger(RadixThemesTriggerComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "HoverCardTrigger":
"""Create a new RadixThemesTriggerComponent instance.
@@ -210,41 +168,21 @@ class HoverCardContent(elements.Div, RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "HoverCardContent":
"""Create a new component instance.
@@ -305,44 +243,22 @@ class HoverCard(ComponentNamespace):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_open_change: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_open_change: Optional[EventType] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "HoverCardRoot":
"""Create a new component instance.
diff --git a/reflex/components/radix/themes/components/icon_button.pyi b/reflex/components/radix/themes/components/icon_button.pyi
index fe858aeca..901c8d6ff 100644
--- a/reflex/components/radix/themes/components/icon_button.pyi
+++ b/reflex/components/radix/themes/components/icon_button.pyi
@@ -3,11 +3,11 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Literal, Optional, Union, overload
+from typing import Any, Dict, Literal, Optional, Union, overload
from reflex.components.core.breakpoints import Breakpoints
from reflex.components.el import elements
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -158,41 +158,21 @@ class IconButton(elements.Button, RadixLoadingProp, RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "IconButton":
"""Create a IconButton component.
diff --git a/reflex/components/radix/themes/components/inset.pyi b/reflex/components/radix/themes/components/inset.pyi
index 45e7d6434..d6b0cce04 100644
--- a/reflex/components/radix/themes/components/inset.pyi
+++ b/reflex/components/radix/themes/components/inset.pyi
@@ -3,11 +3,11 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Literal, Optional, Union, overload
+from typing import Any, Dict, Literal, Optional, Union, overload
from reflex.components.core.breakpoints import Breakpoints
from reflex.components.el import elements
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -133,41 +133,21 @@ class Inset(elements.Div, RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Inset":
"""Create a new component instance.
diff --git a/reflex/components/radix/themes/components/popover.py b/reflex/components/radix/themes/components/popover.py
index 0297b2d99..2535a8a22 100644
--- a/reflex/components/radix/themes/components/popover.py
+++ b/reflex/components/radix/themes/components/popover.py
@@ -5,7 +5,7 @@ from typing import Literal
from reflex.components.component import ComponentNamespace
from reflex.components.core.breakpoints import Responsive
from reflex.components.el import elements
-from reflex.event import EventHandler
+from reflex.event import EventHandler, empty_event, identity_event
from reflex.vars.base import Var
from ..base import (
@@ -26,7 +26,7 @@ class PopoverRoot(RadixThemesComponent):
modal: Var[bool]
# Fired when the open state changes.
- on_open_change: EventHandler[lambda e0: [e0]]
+ on_open_change: EventHandler[identity_event(bool)]
class PopoverTrigger(RadixThemesTriggerComponent):
@@ -59,22 +59,22 @@ class PopoverContent(elements.Div, RadixThemesComponent):
avoid_collisions: Var[bool]
# Fired when the dialog is opened.
- on_open_auto_focus: EventHandler[lambda e0: [e0]]
+ on_open_auto_focus: EventHandler[empty_event]
# Fired when the dialog is closed.
- on_close_auto_focus: EventHandler[lambda e0: [e0]]
+ on_close_auto_focus: EventHandler[empty_event]
# Fired when the escape key is pressed.
- on_escape_key_down: EventHandler[lambda e0: [e0]]
+ on_escape_key_down: EventHandler[empty_event]
# Fired when the pointer is down outside the dialog.
- on_pointer_down_outside: EventHandler[lambda e0: [e0]]
+ on_pointer_down_outside: EventHandler[empty_event]
# Fired when focus moves outside the dialog.
- on_focus_outside: EventHandler[lambda e0: [e0]]
+ on_focus_outside: EventHandler[empty_event]
# Fired when the pointer interacts outside the dialog.
- on_interact_outside: EventHandler[lambda e0: [e0]]
+ on_interact_outside: EventHandler[empty_event]
class PopoverClose(RadixThemesTriggerComponent):
diff --git a/reflex/components/radix/themes/components/popover.pyi b/reflex/components/radix/themes/components/popover.pyi
index 70349aea3..984a139d0 100644
--- a/reflex/components/radix/themes/components/popover.pyi
+++ b/reflex/components/radix/themes/components/popover.pyi
@@ -3,12 +3,12 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Literal, Optional, Union, overload
+from typing import Any, Dict, Literal, Optional, Union, overload
from reflex.components.component import ComponentNamespace
from reflex.components.core.breakpoints import Breakpoints
from reflex.components.el import elements
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -28,44 +28,22 @@ class PopoverRoot(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_open_change: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_open_change: Optional[EventType] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "PopoverRoot":
"""Create a new component instance.
@@ -102,41 +80,21 @@ class PopoverTrigger(RadixThemesTriggerComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "PopoverTrigger":
"""Create a new RadixThemesTriggerComponent instance.
@@ -213,59 +171,27 @@ class PopoverContent(elements.Div, RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_close_auto_focus: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_escape_key_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_focus_outside: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_interact_outside: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_open_auto_focus: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_pointer_down_outside: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_close_auto_focus: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_escape_key_down: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_focus_outside: Optional[EventType[[]]] = None,
+ on_interact_outside: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_open_auto_focus: Optional[EventType[[]]] = None,
+ on_pointer_down_outside: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "PopoverContent":
"""Create a new component instance.
@@ -322,41 +248,21 @@ class PopoverClose(RadixThemesTriggerComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "PopoverClose":
"""Create a new RadixThemesTriggerComponent instance.
diff --git a/reflex/components/radix/themes/components/progress.pyi b/reflex/components/radix/themes/components/progress.pyi
index f2e89526a..6470842f3 100644
--- a/reflex/components/radix/themes/components/progress.pyi
+++ b/reflex/components/radix/themes/components/progress.pyi
@@ -3,10 +3,10 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Literal, Optional, Union, overload
+from typing import Any, Dict, Literal, Optional, Union, overload
from reflex.components.core.breakpoints import Breakpoints
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -114,41 +114,21 @@ class Progress(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Progress":
"""Create a Progress component.
diff --git a/reflex/components/radix/themes/components/radio.pyi b/reflex/components/radix/themes/components/radio.pyi
index a35ac33f3..f1a6b131a 100644
--- a/reflex/components/radix/themes/components/radio.pyi
+++ b/reflex/components/radix/themes/components/radio.pyi
@@ -3,10 +3,10 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Literal, Optional, Union, overload
+from typing import Any, Dict, Literal, Optional, Union, overload
from reflex.components.core.breakpoints import Breakpoints
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -104,41 +104,21 @@ class Radio(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Radio":
"""Create a new component instance.
diff --git a/reflex/components/radix/themes/components/radio_cards.py b/reflex/components/radix/themes/components/radio_cards.py
index 4c1a92aef..e0aa2a749 100644
--- a/reflex/components/radix/themes/components/radio_cards.py
+++ b/reflex/components/radix/themes/components/radio_cards.py
@@ -4,7 +4,7 @@ from types import SimpleNamespace
from typing import Literal, Union
from reflex.components.core.breakpoints import Responsive
-from reflex.event import EventHandler
+from reflex.event import EventHandler, identity_event
from reflex.vars.base import Var
from ..base import LiteralAccentColor, RadixThemesComponent
@@ -65,7 +65,7 @@ class RadioCardsRoot(RadixThemesComponent):
loop: Var[bool]
# Event handler called when the value changes.
- on_value_change: EventHandler[lambda e0: [e0]]
+ on_value_change: EventHandler[identity_event(str)]
class RadioCardsItem(RadixThemesComponent):
diff --git a/reflex/components/radix/themes/components/radio_cards.pyi b/reflex/components/radix/themes/components/radio_cards.pyi
index f7cc97066..d73447622 100644
--- a/reflex/components/radix/themes/components/radio_cards.pyi
+++ b/reflex/components/radix/themes/components/radio_cards.pyi
@@ -4,10 +4,10 @@
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
from types import SimpleNamespace
-from typing import Any, Callable, Dict, Literal, Optional, Union, overload
+from typing import Any, Dict, Literal, Optional, Union, overload
from reflex.components.core.breakpoints import Breakpoints
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -162,44 +162,22 @@ class RadioCardsRoot(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_value_change: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
+ on_value_change: Optional[EventType] = None,
**props,
) -> "RadioCardsRoot":
"""Create a new component instance.
@@ -252,41 +230,21 @@ class RadioCardsItem(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "RadioCardsItem":
"""Create a new component instance.
diff --git a/reflex/components/radix/themes/components/radio_group.py b/reflex/components/radix/themes/components/radio_group.py
index dcc74e040..a55ca3a41 100644
--- a/reflex/components/radix/themes/components/radio_group.py
+++ b/reflex/components/radix/themes/components/radio_group.py
@@ -9,7 +9,7 @@ from reflex.components.component import Component, ComponentNamespace
from reflex.components.core.breakpoints import Responsive
from reflex.components.radix.themes.layout.flex import Flex
from reflex.components.radix.themes.typography.text import Text
-from reflex.event import EventHandler
+from reflex.event import EventHandler, identity_event
from reflex.utils import types
from reflex.vars.base import LiteralVar, Var
from reflex.vars.sequence import StringVar
@@ -59,7 +59,7 @@ class RadioGroupRoot(RadixThemesComponent):
_rename_props = {"onChange": "onValueChange"}
# Fired when the value of the radio group changes.
- on_change: EventHandler[lambda e0: [e0]]
+ on_change: EventHandler[identity_event(str)]
class RadioGroupItem(RadixThemesComponent):
@@ -84,7 +84,7 @@ class HighLevelRadioGroup(RadixThemesComponent):
items: Var[List[str]]
# The direction of the radio group.
- direction: Var[LiteralFlexDirection] = LiteralVar.create("column")
+ direction: Var[LiteralFlexDirection] = LiteralVar.create("row")
# The gap between the items of the radio group.
spacing: Var[LiteralSpacing] = LiteralVar.create("2")
@@ -137,7 +137,7 @@ class HighLevelRadioGroup(RadixThemesComponent):
Raises:
TypeError: If the type of items is invalid.
"""
- direction = props.pop("direction", "column")
+ direction = props.pop("direction", "row")
spacing = props.pop("spacing", "2")
size = props.pop("size", "2")
variant = props.pop("variant", "classic")
diff --git a/reflex/components/radix/themes/components/radio_group.pyi b/reflex/components/radix/themes/components/radio_group.pyi
index d255adcb1..c984fa1f2 100644
--- a/reflex/components/radix/themes/components/radio_group.pyi
+++ b/reflex/components/radix/themes/components/radio_group.pyi
@@ -3,11 +3,11 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, List, Literal, Optional, Union, overload
+from typing import Any, Dict, List, Literal, Optional, Union, overload
from reflex.components.component import ComponentNamespace
from reflex.components.core.breakpoints import Breakpoints
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -112,42 +112,22 @@ class RadioGroupRoot(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_change: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_change: Optional[EventType] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "RadioGroupRoot":
"""Create a new component instance.
@@ -194,41 +174,21 @@ class RadioGroupItem(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "RadioGroupItem":
"""Create a new component instance.
@@ -356,41 +316,21 @@ class HighLevelRadioGroup(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "HighLevelRadioGroup":
"""Create a radio group component.
@@ -528,41 +468,21 @@ class RadioGroup(ComponentNamespace):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "HighLevelRadioGroup":
"""Create a radio group component.
diff --git a/reflex/components/radix/themes/components/scroll_area.pyi b/reflex/components/radix/themes/components/scroll_area.pyi
index 583e97888..8deeb0fe9 100644
--- a/reflex/components/radix/themes/components/scroll_area.pyi
+++ b/reflex/components/radix/themes/components/scroll_area.pyi
@@ -3,9 +3,9 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Literal, Optional, Union, overload
+from typing import Any, Dict, Literal, Optional, Union, overload
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -36,41 +36,21 @@ class ScrollArea(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "ScrollArea":
"""Create a new component instance.
diff --git a/reflex/components/radix/themes/components/segmented_control.py b/reflex/components/radix/themes/components/segmented_control.py
index 21b50f03e..22725eaa6 100644
--- a/reflex/components/radix/themes/components/segmented_control.py
+++ b/reflex/components/radix/themes/components/segmented_control.py
@@ -3,7 +3,7 @@
from __future__ import annotations
from types import SimpleNamespace
-from typing import List, Literal, Union
+from typing import List, Literal, Tuple, Union
from reflex.components.core.breakpoints import Responsive
from reflex.event import EventHandler
@@ -12,6 +12,18 @@ from reflex.vars.base import Var
from ..base import LiteralAccentColor, RadixThemesComponent
+def on_value_change(value: Var[str | List[str]]) -> Tuple[Var[str | List[str]]]:
+ """Handle the on_value_change event.
+
+ Args:
+ value: The value of the event.
+
+ Returns:
+ The value of the event.
+ """
+ return (value,)
+
+
class SegmentedControlRoot(RadixThemesComponent):
"""Root element for a SegmentedControl component."""
@@ -39,7 +51,7 @@ class SegmentedControlRoot(RadixThemesComponent):
value: Var[Union[str, List[str]]]
# Handles the `onChange` event for the SegmentedControl component.
- on_change: EventHandler[lambda e0: [e0]]
+ on_change: EventHandler[on_value_change]
_rename_props = {"onChange": "onValueChange"}
diff --git a/reflex/components/radix/themes/components/segmented_control.pyi b/reflex/components/radix/themes/components/segmented_control.pyi
index 171fc490a..cb1990a7c 100644
--- a/reflex/components/radix/themes/components/segmented_control.pyi
+++ b/reflex/components/radix/themes/components/segmented_control.pyi
@@ -4,15 +4,17 @@
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
from types import SimpleNamespace
-from typing import Any, Callable, Dict, List, Literal, Optional, Union, overload
+from typing import Any, Dict, List, Literal, Optional, Tuple, Union, overload
from reflex.components.core.breakpoints import Breakpoints
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
from ..base import RadixThemesComponent
+def on_value_change(value: Var[str | List[str]]) -> Tuple[Var[str | List[str]]]: ...
+
class SegmentedControlRoot(RadixThemesComponent):
@overload
@classmethod
@@ -114,42 +116,22 @@ class SegmentedControlRoot(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_change: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_change: Optional[EventType[str | List[str]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "SegmentedControlRoot":
"""Create a new component instance.
@@ -192,41 +174,21 @@ class SegmentedControlItem(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "SegmentedControlItem":
"""Create a new component instance.
diff --git a/reflex/components/radix/themes/components/select.py b/reflex/components/radix/themes/components/select.py
index 9017ab5c7..47a1eaf3f 100644
--- a/reflex/components/radix/themes/components/select.py
+++ b/reflex/components/radix/themes/components/select.py
@@ -5,6 +5,7 @@ from typing import List, Literal, Union
import reflex as rx
from reflex.components.component import Component, ComponentNamespace
from reflex.components.core.breakpoints import Responsive
+from reflex.event import empty_event, identity_event
from reflex.vars.base import Var
from ..base import (
@@ -47,10 +48,10 @@ class SelectRoot(RadixThemesComponent):
_rename_props = {"onChange": "onValueChange"}
# Fired when the value of the select changes.
- on_change: rx.EventHandler[lambda e0: [e0]]
+ on_change: rx.EventHandler[identity_event(str)]
# Fired when the select is opened or closed.
- on_open_change: rx.EventHandler[lambda e0: [e0]]
+ on_open_change: rx.EventHandler[identity_event(bool)]
class SelectTrigger(RadixThemesComponent):
@@ -103,13 +104,13 @@ class SelectContent(RadixThemesComponent):
align_offset: Var[int]
# Fired when the select content is closed.
- on_close_auto_focus: rx.EventHandler[lambda e0: [e0]]
+ on_close_auto_focus: rx.EventHandler[empty_event]
# Fired when the escape key is pressed.
- on_escape_key_down: rx.EventHandler[lambda e0: [e0]]
+ on_escape_key_down: rx.EventHandler[empty_event]
# Fired when a pointer down event happens outside the select content.
- on_pointer_down_outside: rx.EventHandler[lambda e0: [e0]]
+ on_pointer_down_outside: rx.EventHandler[empty_event]
class SelectGroup(RadixThemesComponent):
diff --git a/reflex/components/radix/themes/components/select.pyi b/reflex/components/radix/themes/components/select.pyi
index b6adac6e7..c43d58ada 100644
--- a/reflex/components/radix/themes/components/select.pyi
+++ b/reflex/components/radix/themes/components/select.pyi
@@ -3,11 +3,11 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, List, Literal, Optional, Union, overload
+from typing import Any, Dict, List, Literal, Optional, Union, overload
from reflex.components.component import ComponentNamespace
from reflex.components.core.breakpoints import Breakpoints
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -43,45 +43,23 @@ class SelectRoot(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_change: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_open_change: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_change: Optional[EventType] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_open_change: Optional[EventType] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "SelectRoot":
"""Create a new component instance.
@@ -199,41 +177,21 @@ class SelectTrigger(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "SelectTrigger":
"""Create a new component instance.
@@ -358,50 +316,24 @@ class SelectContent(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_close_auto_focus: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_escape_key_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_pointer_down_outside: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_close_auto_focus: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_escape_key_down: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_pointer_down_outside: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "SelectContent":
"""Create a new component instance.
@@ -444,41 +376,21 @@ class SelectGroup(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "SelectGroup":
"""Create a new component instance.
@@ -515,41 +427,21 @@ class SelectItem(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "SelectItem":
"""Create a new component instance.
@@ -586,41 +478,21 @@ class SelectLabel(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "SelectLabel":
"""Create a new component instance.
@@ -655,41 +527,21 @@ class SelectSeparator(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "SelectSeparator":
"""Create a new component instance.
@@ -827,45 +679,23 @@ class HighLevelSelect(SelectRoot):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_change: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_open_change: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_change: Optional[EventType] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_open_change: Optional[EventType] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "HighLevelSelect":
"""Create a select component.
@@ -1023,45 +853,23 @@ class Select(ComponentNamespace):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_change: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_open_change: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_change: Optional[EventType] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_open_change: Optional[EventType] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "HighLevelSelect":
"""Create a select component.
diff --git a/reflex/components/radix/themes/components/separator.pyi b/reflex/components/radix/themes/components/separator.pyi
index cd5f4abce..0f2895403 100644
--- a/reflex/components/radix/themes/components/separator.pyi
+++ b/reflex/components/radix/themes/components/separator.pyi
@@ -3,10 +3,10 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Literal, Optional, Union, overload
+from typing import Any, Dict, Literal, Optional, Union, overload
from reflex.components.core.breakpoints import Breakpoints
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -113,41 +113,21 @@ class Separator(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Separator":
"""Create a new component instance.
diff --git a/reflex/components/radix/themes/components/skeleton.pyi b/reflex/components/radix/themes/components/skeleton.pyi
index 46d2697bf..61b57c275 100644
--- a/reflex/components/radix/themes/components/skeleton.pyi
+++ b/reflex/components/radix/themes/components/skeleton.pyi
@@ -3,10 +3,10 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Optional, Union, overload
+from typing import Any, Dict, Optional, Union, overload
from reflex.components.core.breakpoints import Breakpoints
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -43,41 +43,21 @@ class Skeleton(RadixLoadingProp, RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Skeleton":
"""Create a new component instance.
diff --git a/reflex/components/radix/themes/components/slider.py b/reflex/components/radix/themes/components/slider.py
index 3cf2e172d..0d99eda27 100644
--- a/reflex/components/radix/themes/components/slider.py
+++ b/reflex/components/radix/themes/components/slider.py
@@ -1,6 +1,8 @@
"""Interactive components provided by @radix-ui/themes."""
-from typing import List, Literal, Optional, Union
+from __future__ import annotations
+
+from typing import List, Literal, Optional, Tuple, Union
from reflex.components.component import Component
from reflex.components.core.breakpoints import Responsive
@@ -13,6 +15,20 @@ from ..base import (
)
+def on_value_event_spec(
+ value: Var[List[int | float]],
+) -> Tuple[Var[List[int | float]]]:
+ """Event handler spec for the value event.
+
+ Args:
+ value: The value of the event.
+
+ Returns:
+ The event handler spec.
+ """
+ return (value,) # type: ignore
+
+
class Slider(RadixThemesComponent):
"""Provides user selection from a range of values."""
@@ -64,10 +80,10 @@ class Slider(RadixThemesComponent):
_rename_props = {"onChange": "onValueChange"}
# Fired when the value of the slider changes.
- on_change: EventHandler[lambda e0: [e0]]
+ on_change: EventHandler[on_value_event_spec]
# Fired when a thumb is released after being dragged.
- on_value_commit: EventHandler[lambda e0: [e0]]
+ on_value_commit: EventHandler[on_value_event_spec]
@classmethod
def create(
diff --git a/reflex/components/radix/themes/components/slider.pyi b/reflex/components/radix/themes/components/slider.pyi
index 0157aaab0..dec836835 100644
--- a/reflex/components/radix/themes/components/slider.pyi
+++ b/reflex/components/radix/themes/components/slider.pyi
@@ -3,15 +3,19 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, List, Literal, Optional, Union, overload
+from typing import Any, Dict, List, Literal, Optional, Tuple, Union, overload
from reflex.components.core.breakpoints import Breakpoints
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
from ..base import RadixThemesComponent
+def on_value_event_spec(
+ value: Var[List[int | float]],
+) -> Tuple[Var[List[int | float]]]: ...
+
class Slider(RadixThemesComponent):
@overload
@classmethod
@@ -133,45 +137,23 @@ class Slider(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_change: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_value_commit: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_change: Optional[EventType[List[int | float]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
+ on_value_commit: Optional[EventType[List[int | float]]] = None,
**props,
) -> "Slider":
"""Create a Slider component.
diff --git a/reflex/components/radix/themes/components/spinner.pyi b/reflex/components/radix/themes/components/spinner.pyi
index b8f37d636..87033f05c 100644
--- a/reflex/components/radix/themes/components/spinner.pyi
+++ b/reflex/components/radix/themes/components/spinner.pyi
@@ -3,10 +3,10 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Literal, Optional, Union, overload
+from typing import Any, Dict, Literal, Optional, Union, overload
from reflex.components.core.breakpoints import Breakpoints
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -38,41 +38,21 @@ class Spinner(RadixLoadingProp, RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Spinner":
"""Create a new component instance.
diff --git a/reflex/components/radix/themes/components/switch.py b/reflex/components/radix/themes/components/switch.py
index 56951bc74..13be32d83 100644
--- a/reflex/components/radix/themes/components/switch.py
+++ b/reflex/components/radix/themes/components/switch.py
@@ -3,7 +3,7 @@
from typing import Literal
from reflex.components.core.breakpoints import Responsive
-from reflex.event import EventHandler
+from reflex.event import EventHandler, identity_event
from reflex.vars.base import Var
from ..base import (
@@ -59,7 +59,7 @@ class Switch(RadixThemesComponent):
_rename_props = {"onChange": "onCheckedChange"}
# Fired when the value of the switch changes
- on_change: EventHandler[lambda checked: [checked]]
+ on_change: EventHandler[identity_event(bool)]
switch = Switch.create
diff --git a/reflex/components/radix/themes/components/switch.pyi b/reflex/components/radix/themes/components/switch.pyi
index 013501313..ba9c2595e 100644
--- a/reflex/components/radix/themes/components/switch.pyi
+++ b/reflex/components/radix/themes/components/switch.pyi
@@ -3,10 +3,10 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Literal, Optional, Union, overload
+from typing import Any, Dict, Literal, Optional, Union, overload
from reflex.components.core.breakpoints import Breakpoints
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -118,42 +118,22 @@ class Switch(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_change: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_change: Optional[EventType] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Switch":
"""Create a new component instance.
diff --git a/reflex/components/radix/themes/components/table.pyi b/reflex/components/radix/themes/components/table.pyi
index 69f94176b..8b1ef355f 100644
--- a/reflex/components/radix/themes/components/table.pyi
+++ b/reflex/components/radix/themes/components/table.pyi
@@ -3,12 +3,12 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Literal, Optional, Union, overload
+from typing import Any, Dict, Literal, Optional, Union, overload
from reflex.components.component import ComponentNamespace
from reflex.components.core.breakpoints import Breakpoints
from reflex.components.el import elements
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -66,41 +66,21 @@ class TableRoot(elements.Table, RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "TableRoot":
"""Create a new component instance.
@@ -180,41 +160,21 @@ class TableHeader(elements.Thead, RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "TableHeader":
"""Create a new component instance.
@@ -296,41 +256,21 @@ class TableRow(elements.Tr, RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "TableRow":
"""Create a new component instance.
@@ -417,41 +357,21 @@ class TableColumnHeaderCell(elements.Th, RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "TableColumnHeaderCell":
"""Create a new component instance.
@@ -533,41 +453,21 @@ class TableBody(elements.Tbody, RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "TableBody":
"""Create a new component instance.
@@ -653,41 +553,21 @@ class TableCell(elements.Td, RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "TableCell":
"""Create a new component instance.
@@ -778,41 +658,21 @@ class TableRowHeaderCell(elements.Th, RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "TableRowHeaderCell":
"""Create a new component instance.
diff --git a/reflex/components/radix/themes/components/tabs.py b/reflex/components/radix/themes/components/tabs.py
index 5560d44b0..12359b528 100644
--- a/reflex/components/radix/themes/components/tabs.py
+++ b/reflex/components/radix/themes/components/tabs.py
@@ -7,7 +7,7 @@ from typing import Any, Dict, List, Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.components.core.breakpoints import Responsive
from reflex.components.core.colors import color
-from reflex.event import EventHandler
+from reflex.event import EventHandler, identity_event
from reflex.vars.base import Var
from ..base import (
@@ -42,7 +42,7 @@ class TabsRoot(RadixThemesComponent):
_rename_props = {"onChange": "onValueChange"}
# Fired when the value of the tabs changes.
- on_change: EventHandler[lambda e0: [e0]]
+ on_change: EventHandler[identity_event(str)]
def add_style(self) -> Dict[str, Any] | None:
"""Add style for the component.
diff --git a/reflex/components/radix/themes/components/tabs.pyi b/reflex/components/radix/themes/components/tabs.pyi
index 8e3c29406..7b67bad6e 100644
--- a/reflex/components/radix/themes/components/tabs.pyi
+++ b/reflex/components/radix/themes/components/tabs.pyi
@@ -3,11 +3,11 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Literal, Optional, Union, overload
+from typing import Any, Dict, Literal, Optional, Union, overload
from reflex.components.component import ComponentNamespace
from reflex.components.core.breakpoints import Breakpoints
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -40,42 +40,22 @@ class TabsRoot(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_change: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_change: Optional[EventType] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "TabsRoot":
"""Create a new component instance.
@@ -124,41 +104,21 @@ class TabsList(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "TabsList":
"""Create a new component instance.
@@ -259,41 +219,21 @@ class TabsTrigger(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "TabsTrigger":
"""Create a TabsTrigger component.
@@ -333,41 +273,21 @@ class TabsContent(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "TabsContent":
"""Create a new component instance.
@@ -419,42 +339,22 @@ class Tabs(ComponentNamespace):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_change: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_change: Optional[EventType] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "TabsRoot":
"""Create a new component instance.
diff --git a/reflex/components/radix/themes/components/text_area.py b/reflex/components/radix/themes/components/text_area.py
index 8b3b531cb..9f006c2e3 100644
--- a/reflex/components/radix/themes/components/text_area.py
+++ b/reflex/components/radix/themes/components/text_area.py
@@ -6,7 +6,6 @@ from reflex.components.component import Component
from reflex.components.core.breakpoints import Responsive
from reflex.components.core.debounce import DebounceInput
from reflex.components.el import elements
-from reflex.event import EventHandler
from reflex.vars.base import Var
from ..base import (
@@ -82,21 +81,6 @@ class TextArea(RadixThemesComponent, elements.Textarea):
# How the text in the textarea is to be wrapped when submitting the form
wrap: Var[str]
- # Fired when the value of the textarea changes.
- on_change: EventHandler[lambda e0: [e0.target.value]]
-
- # Fired when the textarea is focused.
- on_focus: EventHandler[lambda e0: [e0.target.value]]
-
- # Fired when the textarea is blurred.
- on_blur: EventHandler[lambda e0: [e0.target.value]]
-
- # Fired when a key is pressed down.
- on_key_down: EventHandler[lambda e0: [e0.key]]
-
- # Fired when a key is released.
- on_key_up: EventHandler[lambda e0: [e0.key]]
-
@classmethod
def create(cls, *children, **props) -> Component:
"""Create an Input component.
diff --git a/reflex/components/radix/themes/components/text_area.pyi b/reflex/components/radix/themes/components/text_area.pyi
index c39be4b1f..f234d9150 100644
--- a/reflex/components/radix/themes/components/text_area.pyi
+++ b/reflex/components/radix/themes/components/text_area.pyi
@@ -3,11 +3,11 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Literal, Optional, Union, overload
+from typing import Any, Dict, Literal, Optional, Union, overload
from reflex.components.core.breakpoints import Breakpoints
from reflex.components.el import elements
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -168,46 +168,24 @@ class TextArea(RadixThemesComponent, elements.Textarea):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_change: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_key_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_key_up: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[str]] = None,
+ on_change: Optional[EventType[str]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[str]] = None,
+ on_key_down: Optional[EventType[str]] = None,
+ on_key_up: Optional[EventType[str]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "TextArea":
"""Create an Input component.
diff --git a/reflex/components/radix/themes/components/text_field.py b/reflex/components/radix/themes/components/text_field.py
index 6c3372985..4277e93e0 100644
--- a/reflex/components/radix/themes/components/text_field.py
+++ b/reflex/components/radix/themes/components/text_field.py
@@ -8,7 +8,7 @@ from reflex.components.component import Component, ComponentNamespace
from reflex.components.core.breakpoints import Responsive
from reflex.components.core.debounce import DebounceInput
from reflex.components.el import elements
-from reflex.event import EventHandler
+from reflex.event import EventHandler, input_event, key_event
from reflex.vars.base import Var
from ..base import (
@@ -72,19 +72,19 @@ class TextFieldRoot(elements.Div, RadixThemesComponent):
value: Var[Union[str, int, float]]
# Fired when the value of the textarea changes.
- on_change: EventHandler[lambda e0: [e0.target.value]]
+ on_change: EventHandler[input_event]
# Fired when the textarea is focused.
- on_focus: EventHandler[lambda e0: [e0.target.value]]
+ on_focus: EventHandler[input_event]
# Fired when the textarea is blurred.
- on_blur: EventHandler[lambda e0: [e0.target.value]]
+ on_blur: EventHandler[input_event]
# Fired when a key is pressed down.
- on_key_down: EventHandler[lambda e0: [e0.key]]
+ on_key_down: EventHandler[key_event]
# Fired when a key is released.
- on_key_up: EventHandler[lambda e0: [e0.key]]
+ on_key_up: EventHandler[key_event]
@classmethod
def create(cls, *children, **props) -> Component:
diff --git a/reflex/components/radix/themes/components/text_field.pyi b/reflex/components/radix/themes/components/text_field.pyi
index ff5b79344..7ea0860b5 100644
--- a/reflex/components/radix/themes/components/text_field.pyi
+++ b/reflex/components/radix/themes/components/text_field.pyi
@@ -3,12 +3,12 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Literal, Optional, Union, overload
+from typing import Any, Dict, Literal, Optional, Union, overload
from reflex.components.component import ComponentNamespace
from reflex.components.core.breakpoints import Breakpoints
from reflex.components.el import elements
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -149,46 +149,24 @@ class TextFieldRoot(elements.Div, RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_change: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_key_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_key_up: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[str]] = None,
+ on_change: Optional[EventType[str]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[str]] = None,
+ on_key_down: Optional[EventType[str]] = None,
+ on_key_up: Optional[EventType[str]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "TextFieldRoot":
"""Create an Input component.
@@ -313,41 +291,21 @@ class TextFieldSlot(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "TextFieldSlot":
"""Create a new component instance.
@@ -503,46 +461,24 @@ class TextField(ComponentNamespace):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_change: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_key_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_key_up: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[str]] = None,
+ on_change: Optional[EventType[str]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[str]] = None,
+ on_key_down: Optional[EventType[str]] = None,
+ on_key_up: Optional[EventType[str]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "TextFieldRoot":
"""Create an Input component.
diff --git a/reflex/components/radix/themes/components/tooltip.py b/reflex/components/radix/themes/components/tooltip.py
index f39de68a8..ac35c86d1 100644
--- a/reflex/components/radix/themes/components/tooltip.py
+++ b/reflex/components/radix/themes/components/tooltip.py
@@ -3,7 +3,7 @@
from typing import Dict, Literal, Union
from reflex.components.component import Component
-from reflex.event import EventHandler
+from reflex.event import EventHandler, empty_event, identity_event
from reflex.utils import format
from reflex.vars.base import Var
@@ -85,13 +85,13 @@ class Tooltip(RadixThemesComponent):
aria_label: Var[str]
# Fired when the open state changes.
- on_open_change: EventHandler[lambda e0: [e0.target.value]]
+ on_open_change: EventHandler[identity_event(bool)]
# Fired when the escape key is pressed.
- on_escape_key_down: EventHandler[lambda e0: [e0.target.value]]
+ on_escape_key_down: EventHandler[empty_event]
# Fired when the pointer is down outside the tooltip.
- on_pointer_down_outside: EventHandler[lambda e0: [e0.target.value]]
+ on_pointer_down_outside: EventHandler[empty_event]
@classmethod
def create(cls, *children, **props) -> Component:
diff --git a/reflex/components/radix/themes/components/tooltip.pyi b/reflex/components/radix/themes/components/tooltip.pyi
index f886dc608..ad7c4402f 100644
--- a/reflex/components/radix/themes/components/tooltip.pyi
+++ b/reflex/components/radix/themes/components/tooltip.pyi
@@ -3,9 +3,9 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Literal, Optional, Union, overload
+from typing import Any, Dict, Literal, Optional, Union, overload
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -62,50 +62,24 @@ class Tooltip(RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_escape_key_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_open_change: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_pointer_down_outside: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_escape_key_down: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_open_change: Optional[EventType] = None,
+ on_pointer_down_outside: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Tooltip":
"""Initialize the Tooltip component.
diff --git a/reflex/components/radix/themes/layout/base.pyi b/reflex/components/radix/themes/layout/base.pyi
index 4da48975b..df51b07f9 100644
--- a/reflex/components/radix/themes/layout/base.pyi
+++ b/reflex/components/radix/themes/layout/base.pyi
@@ -3,10 +3,10 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Literal, Optional, Union, overload
+from typing import Any, Dict, Literal, Optional, Union, overload
from reflex.components.core.breakpoints import Breakpoints
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -201,41 +201,21 @@ class LayoutComponent(CommonMarginProps, RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "LayoutComponent":
"""Create a new component instance.
diff --git a/reflex/components/radix/themes/layout/box.pyi b/reflex/components/radix/themes/layout/box.pyi
index ba651b488..895725a35 100644
--- a/reflex/components/radix/themes/layout/box.pyi
+++ b/reflex/components/radix/themes/layout/box.pyi
@@ -3,10 +3,10 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Optional, Union, overload
+from typing import Any, Dict, Optional, Union, overload
from reflex.components.el import elements
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -48,41 +48,21 @@ class Box(elements.Div, RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Box":
"""Create a new component instance.
diff --git a/reflex/components/radix/themes/layout/center.pyi b/reflex/components/radix/themes/layout/center.pyi
index e6a622c48..eb976892e 100644
--- a/reflex/components/radix/themes/layout/center.pyi
+++ b/reflex/components/radix/themes/layout/center.pyi
@@ -3,10 +3,10 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Literal, Optional, Union, overload
+from typing import Any, Dict, Literal, Optional, Union, overload
from reflex.components.core.breakpoints import Breakpoints
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -125,41 +125,21 @@ class Center(Flex):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Center":
"""Create a new component instance.
diff --git a/reflex/components/radix/themes/layout/container.pyi b/reflex/components/radix/themes/layout/container.pyi
index f4c92b085..a5e50b9f3 100644
--- a/reflex/components/radix/themes/layout/container.pyi
+++ b/reflex/components/radix/themes/layout/container.pyi
@@ -3,11 +3,11 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Literal, Optional, Union, overload
+from typing import Any, Dict, Literal, Optional, Union, overload
from reflex.components.core.breakpoints import Breakpoints
from reflex.components.el import elements
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -65,41 +65,21 @@ class Container(elements.Div, RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Container":
"""Create the container component.
diff --git a/reflex/components/radix/themes/layout/flex.pyi b/reflex/components/radix/themes/layout/flex.pyi
index be7d1ce55..aba864f4f 100644
--- a/reflex/components/radix/themes/layout/flex.pyi
+++ b/reflex/components/radix/themes/layout/flex.pyi
@@ -3,11 +3,11 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Literal, Optional, Union, overload
+from typing import Any, Dict, Literal, Optional, Union, overload
from reflex.components.core.breakpoints import Breakpoints
from reflex.components.el import elements
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -128,41 +128,21 @@ class Flex(elements.Div, RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Flex":
"""Create a new component instance.
diff --git a/reflex/components/radix/themes/layout/grid.pyi b/reflex/components/radix/themes/layout/grid.pyi
index 124928198..faf63712e 100644
--- a/reflex/components/radix/themes/layout/grid.pyi
+++ b/reflex/components/radix/themes/layout/grid.pyi
@@ -3,11 +3,11 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Literal, Optional, Union, overload
+from typing import Any, Dict, Literal, Optional, Union, overload
from reflex.components.core.breakpoints import Breakpoints
from reflex.components.el import elements
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -157,41 +157,21 @@ class Grid(elements.Div, RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Grid":
"""Create a new component instance.
diff --git a/reflex/components/radix/themes/layout/list.pyi b/reflex/components/radix/themes/layout/list.pyi
index a3ea33916..b72afbaa7 100644
--- a/reflex/components/radix/themes/layout/list.pyi
+++ b/reflex/components/radix/themes/layout/list.pyi
@@ -3,11 +3,11 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Iterable, Literal, Optional, Union, overload
+from typing import Any, Dict, Iterable, Literal, Optional, Union, overload
from reflex.components.component import Component, ComponentNamespace
from reflex.components.el.elements.typography import Li, Ol, Ul
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -84,41 +84,21 @@ class BaseList(Component):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "BaseList":
"""Create a list component.
@@ -181,41 +161,21 @@ class UnorderedList(BaseList, Ul):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "UnorderedList":
"""Create a unordered list component.
@@ -295,41 +255,21 @@ class OrderedList(BaseList, Ol):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "OrderedList":
"""Create an ordered list component.
@@ -407,41 +347,21 @@ class ListItem(Li):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "ListItem":
"""Create a list item component.
@@ -535,41 +455,21 @@ class List(ComponentNamespace):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "BaseList":
"""Create a list component.
diff --git a/reflex/components/radix/themes/layout/section.pyi b/reflex/components/radix/themes/layout/section.pyi
index b949e5e05..9fb790b9f 100644
--- a/reflex/components/radix/themes/layout/section.pyi
+++ b/reflex/components/radix/themes/layout/section.pyi
@@ -3,11 +3,11 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Literal, Optional, Union, overload
+from typing import Any, Dict, Literal, Optional, Union, overload
from reflex.components.core.breakpoints import Breakpoints
from reflex.components.el import elements
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -62,41 +62,21 @@ class Section(elements.Section, RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Section":
"""Create a new component instance.
diff --git a/reflex/components/radix/themes/layout/spacer.pyi b/reflex/components/radix/themes/layout/spacer.pyi
index 5a3775ef6..f83d7a4c9 100644
--- a/reflex/components/radix/themes/layout/spacer.pyi
+++ b/reflex/components/radix/themes/layout/spacer.pyi
@@ -3,10 +3,10 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Literal, Optional, Union, overload
+from typing import Any, Dict, Literal, Optional, Union, overload
from reflex.components.core.breakpoints import Breakpoints
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -125,41 +125,21 @@ class Spacer(Flex):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Spacer":
"""Create a new component instance.
diff --git a/reflex/components/radix/themes/layout/stack.pyi b/reflex/components/radix/themes/layout/stack.pyi
index 0547cbc8f..5eed3db46 100644
--- a/reflex/components/radix/themes/layout/stack.pyi
+++ b/reflex/components/radix/themes/layout/stack.pyi
@@ -3,10 +3,10 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Literal, Optional, Union, overload
+from typing import Any, Dict, Literal, Optional, Union, overload
from reflex.components.core.breakpoints import Breakpoints
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -93,41 +93,21 @@ class Stack(Flex):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Stack":
"""Create a new instance of the component.
@@ -238,41 +218,21 @@ class VStack(Stack):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "VStack":
"""Create a new instance of the component.
@@ -383,41 +343,21 @@ class HStack(Stack):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "HStack":
"""Create a new instance of the component.
diff --git a/reflex/components/radix/themes/typography/blockquote.pyi b/reflex/components/radix/themes/typography/blockquote.pyi
index 3abf53fd6..3a9ae5c72 100644
--- a/reflex/components/radix/themes/typography/blockquote.pyi
+++ b/reflex/components/radix/themes/typography/blockquote.pyi
@@ -3,11 +3,11 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Literal, Optional, Union, overload
+from typing import Any, Dict, Literal, Optional, Union, overload
from reflex.components.core.breakpoints import Breakpoints
from reflex.components.el import elements
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -139,41 +139,21 @@ class Blockquote(elements.Blockquote, RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Blockquote":
"""Create a new component instance.
diff --git a/reflex/components/radix/themes/typography/code.pyi b/reflex/components/radix/themes/typography/code.pyi
index 1da91fc96..2cda39ddf 100644
--- a/reflex/components/radix/themes/typography/code.pyi
+++ b/reflex/components/radix/themes/typography/code.pyi
@@ -3,11 +3,11 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Literal, Optional, Union, overload
+from typing import Any, Dict, Literal, Optional, Union, overload
from reflex.components.core.breakpoints import Breakpoints
from reflex.components.el import elements
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -144,41 +144,21 @@ class Code(elements.Code, RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Code":
"""Create a new component instance.
diff --git a/reflex/components/radix/themes/typography/heading.pyi b/reflex/components/radix/themes/typography/heading.pyi
index 7b7c45fde..78ef8ba60 100644
--- a/reflex/components/radix/themes/typography/heading.pyi
+++ b/reflex/components/radix/themes/typography/heading.pyi
@@ -3,11 +3,11 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Literal, Optional, Union, overload
+from typing import Any, Dict, Literal, Optional, Union, overload
from reflex.components.core.breakpoints import Breakpoints
from reflex.components.el import elements
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -164,41 +164,21 @@ class Heading(elements.H1, RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Heading":
"""Create a new component instance.
diff --git a/reflex/components/radix/themes/typography/link.pyi b/reflex/components/radix/themes/typography/link.pyi
index da715f73b..3e3eaf64b 100644
--- a/reflex/components/radix/themes/typography/link.pyi
+++ b/reflex/components/radix/themes/typography/link.pyi
@@ -3,13 +3,13 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Literal, Optional, Union, overload
+from typing import Any, Dict, Literal, Optional, Union, overload
from reflex.components.component import MemoizationLeaf
from reflex.components.core.breakpoints import Breakpoints
from reflex.components.el.elements.inline import A
from reflex.components.next.link import NextLink
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.utils.imports import ImportDict
from reflex.vars.base import Var
@@ -176,41 +176,21 @@ class Link(RadixThemesComponent, A, MemoizationLeaf):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Link":
"""Create a Link component.
diff --git a/reflex/components/radix/themes/typography/text.pyi b/reflex/components/radix/themes/typography/text.pyi
index 85f7754cc..b4ddc622c 100644
--- a/reflex/components/radix/themes/typography/text.pyi
+++ b/reflex/components/radix/themes/typography/text.pyi
@@ -3,12 +3,12 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Literal, Optional, Union, overload
+from typing import Any, Dict, Literal, Optional, Union, overload
from reflex.components.component import ComponentNamespace
from reflex.components.core.breakpoints import Breakpoints
from reflex.components.el import elements
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -231,41 +231,21 @@ class Text(elements.Span, RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Text":
"""Create a new component instance.
@@ -508,41 +488,21 @@ class Span(Text):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Span":
"""Create a new component instance.
@@ -625,41 +585,21 @@ class Em(elements.Em, RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Em":
"""Create a new component instance.
@@ -740,41 +680,21 @@ class Kbd(elements.Kbd, RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Kbd":
"""Create a new component instance.
@@ -851,41 +771,21 @@ class Quote(elements.Q, RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Quote":
"""Create a new component instance.
@@ -961,41 +861,21 @@ class Strong(elements.Strong, RadixThemesComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Strong":
"""Create a new component instance.
@@ -1234,41 +1114,21 @@ class TextNamespace(ComponentNamespace):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Text":
"""Create a new component instance.
diff --git a/reflex/components/react_player/audio.pyi b/reflex/components/react_player/audio.pyi
index af5714148..d1f29f508 100644
--- a/reflex/components/react_player/audio.pyi
+++ b/reflex/components/react_player/audio.pyi
@@ -3,10 +3,10 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Optional, Union, overload
+from typing import Any, Dict, Optional, Union, overload
from reflex.components.react_player.react_player import ReactPlayer
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -33,73 +33,37 @@ class Audio(ReactPlayer):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_buffer: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_buffer_end: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click_preview: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_disable_pip: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_duration: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_enable_pip: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_ended: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_error: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_pause: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_play: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_playback_quality_change: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_playback_rate_change: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_progress: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_ready: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_seek: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_start: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_buffer: Optional[EventType[[]]] = None,
+ on_buffer_end: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_click_preview: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_disable_pip: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_duration: Optional[EventType] = None,
+ on_enable_pip: Optional[EventType[[]]] = None,
+ on_ended: Optional[EventType[[]]] = None,
+ on_error: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_pause: Optional[EventType[[]]] = None,
+ on_play: Optional[EventType[[]]] = None,
+ on_playback_quality_change: Optional[EventType[[]]] = None,
+ on_playback_rate_change: Optional[EventType[[]]] = None,
+ on_progress: Optional[EventType] = None,
+ on_ready: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_seek: Optional[EventType] = None,
+ on_start: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Audio":
"""Create the component.
diff --git a/reflex/components/react_player/react_player.py b/reflex/components/react_player/react_player.py
index 08c6df017..7ad45b093 100644
--- a/reflex/components/react_player/react_player.py
+++ b/reflex/components/react_player/react_player.py
@@ -3,7 +3,7 @@
from __future__ import annotations
from reflex.components.component import NoSSRComponent
-from reflex.event import EventHandler
+from reflex.event import EventHandler, empty_event, identity_event
from reflex.vars.base import Var
@@ -12,7 +12,7 @@ class ReactPlayer(NoSSRComponent):
reference: https://github.com/cookpete/react-player.
"""
- library = "react-player@2.12.0"
+ library = "react-player@2.16.0"
tag = "ReactPlayer"
@@ -46,49 +46,49 @@ class ReactPlayer(NoSSRComponent):
height: Var[str]
# Called when media is loaded and ready to play. If playing is set to true, media will play immediately.
- on_ready: EventHandler[lambda: []]
+ on_ready: EventHandler[empty_event]
# Called when media starts playing.
- on_start: EventHandler[lambda: []]
+ on_start: EventHandler[empty_event]
# Called when media starts or resumes playing after pausing or buffering.
- on_play: EventHandler[lambda: []]
+ on_play: EventHandler[empty_event]
# Callback containing played and loaded progress as a fraction, and playedSeconds and loadedSeconds in seconds. eg { played: 0.12, playedSeconds: 11.3, loaded: 0.34, loadedSeconds: 16.7 }
on_progress: EventHandler[lambda progress: [progress]]
# Callback containing duration of the media, in seconds.
- on_duration: EventHandler[lambda seconds: [seconds]]
+ on_duration: EventHandler[identity_event(float)]
# Called when media is paused.
- on_pause: EventHandler[lambda: []]
+ on_pause: EventHandler[empty_event]
# Called when media starts buffering.
- on_buffer: EventHandler[lambda: []]
+ on_buffer: EventHandler[empty_event]
# Called when media has finished buffering. Works for files, YouTube and Facebook.
- on_buffer_end: EventHandler[lambda: []]
+ on_buffer_end: EventHandler[empty_event]
# Called when media seeks with seconds parameter.
- on_seek: EventHandler[lambda seconds: [seconds]]
+ on_seek: EventHandler[identity_event(float)]
# Called when playback rate of the player changed. Only supported by YouTube, Vimeo (if enabled), Wistia, and file paths.
- on_playback_rate_change: EventHandler[lambda e0: []]
+ on_playback_rate_change: EventHandler[empty_event]
# Called when playback quality of the player changed. Only supported by YouTube (if enabled).
- on_playback_quality_change: EventHandler[lambda e0: []]
+ on_playback_quality_change: EventHandler[empty_event]
# Called when media finishes playing. Does not fire when loop is set to true.
- on_ended: EventHandler[lambda: []]
+ on_ended: EventHandler[empty_event]
# Called when an error occurs whilst attempting to play media.
- on_error: EventHandler[lambda: []]
+ on_error: EventHandler[empty_event]
# Called when user clicks the light mode preview.
- on_click_preview: EventHandler[lambda: []]
+ on_click_preview: EventHandler[empty_event]
# Called when picture-in-picture mode is enabled.
- on_enable_pip: EventHandler[lambda: []]
+ on_enable_pip: EventHandler[empty_event]
# Called when picture-in-picture mode is disabled.
- on_disable_pip: EventHandler[lambda: []]
+ on_disable_pip: EventHandler[empty_event]
diff --git a/reflex/components/react_player/react_player.pyi b/reflex/components/react_player/react_player.pyi
index 4f466ea2d..940b09e51 100644
--- a/reflex/components/react_player/react_player.pyi
+++ b/reflex/components/react_player/react_player.pyi
@@ -3,10 +3,10 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Optional, Union, overload
+from typing import Any, Dict, Optional, Union, overload
from reflex.components.component import NoSSRComponent
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -31,73 +31,37 @@ class ReactPlayer(NoSSRComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_buffer: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_buffer_end: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click_preview: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_disable_pip: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_duration: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_enable_pip: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_ended: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_error: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_pause: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_play: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_playback_quality_change: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_playback_rate_change: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_progress: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_ready: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_seek: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_start: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_buffer: Optional[EventType[[]]] = None,
+ on_buffer_end: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_click_preview: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_disable_pip: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_duration: Optional[EventType] = None,
+ on_enable_pip: Optional[EventType[[]]] = None,
+ on_ended: Optional[EventType[[]]] = None,
+ on_error: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_pause: Optional[EventType[[]]] = None,
+ on_play: Optional[EventType[[]]] = None,
+ on_playback_quality_change: Optional[EventType[[]]] = None,
+ on_playback_rate_change: Optional[EventType[[]]] = None,
+ on_progress: Optional[EventType] = None,
+ on_ready: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_seek: Optional[EventType] = None,
+ on_start: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "ReactPlayer":
"""Create the component.
diff --git a/reflex/components/react_player/video.pyi b/reflex/components/react_player/video.pyi
index e60f03920..a50ccf71f 100644
--- a/reflex/components/react_player/video.pyi
+++ b/reflex/components/react_player/video.pyi
@@ -3,10 +3,10 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Optional, Union, overload
+from typing import Any, Dict, Optional, Union, overload
from reflex.components.react_player.react_player import ReactPlayer
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -33,73 +33,37 @@ class Video(ReactPlayer):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_buffer: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_buffer_end: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click_preview: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_disable_pip: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_duration: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_enable_pip: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_ended: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_error: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_pause: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_play: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_playback_quality_change: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_playback_rate_change: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_progress: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_ready: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_seek: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_start: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_buffer: Optional[EventType[[]]] = None,
+ on_buffer_end: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_click_preview: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_disable_pip: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_duration: Optional[EventType] = None,
+ on_enable_pip: Optional[EventType[[]]] = None,
+ on_ended: Optional[EventType[[]]] = None,
+ on_error: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_pause: Optional[EventType[[]]] = None,
+ on_play: Optional[EventType[[]]] = None,
+ on_playback_quality_change: Optional[EventType[[]]] = None,
+ on_playback_rate_change: Optional[EventType[[]]] = None,
+ on_progress: Optional[EventType] = None,
+ on_ready: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_seek: Optional[EventType] = None,
+ on_start: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Video":
"""Create the component.
diff --git a/reflex/components/recharts/cartesian.py b/reflex/components/recharts/cartesian.py
index 06ca80dc5..865b50a32 100644
--- a/reflex/components/recharts/cartesian.py
+++ b/reflex/components/recharts/cartesian.py
@@ -6,7 +6,7 @@ from typing import Any, Dict, List, Union
from reflex.constants import EventTriggers
from reflex.constants.colors import Color
-from reflex.event import EventHandler
+from reflex.event import EventHandler, empty_event
from reflex.vars.base import LiteralVar, Var
from .recharts import (
@@ -15,6 +15,7 @@ from .recharts import (
LiteralDirection,
LiteralIfOverflow,
LiteralInterval,
+ LiteralIntervalAxis,
LiteralLayout,
LiteralLegendType,
LiteralLineType,
@@ -24,6 +25,7 @@ from .recharts import (
LiteralPolarRadiusType,
LiteralScale,
LiteralShape,
+ LiteralTextAnchor,
Recharts,
)
@@ -34,7 +36,7 @@ class Axis(Recharts):
# The key of data displayed in the axis.
data_key: Var[Union[str, int]]
- # If set true, the axis do not display in the chart.
+ # If set true, the axis do not display in the chart. Default: False
hide: Var[bool]
# The width of axis which is usually calculated internally.
@@ -46,28 +48,34 @@ class Axis(Recharts):
# The type of axis 'number' | 'category'
type_: Var[LiteralPolarRadiusType]
- # Allow the ticks of XAxis to be decimals or not.
+ # If set 0, all the ticks will be shown. If set preserveStart", "preserveEnd" or "preserveStartEnd", the ticks which is to be shown or hidden will be calculated automatically. Default: "preserveEnd"
+ interval: Var[Union[LiteralIntervalAxis, int]]
+
+ # Allow the ticks of Axis to be decimals or not. Default: True
allow_decimals: Var[bool]
- # When domain of the axis is specified and the type of the axis is 'number', if allowDataOverflow is set to be false, the domain will be adjusted when the minimum value of data is smaller than domain[0] or the maximum value of data is greater than domain[1] so that the axis displays all data values. If set to true, graphic elements (line, area, bars) will be clipped to conform to the specified domain.
+ # When domain of the axis is specified and the type of the axis is 'number', if allowDataOverflow is set to be false, the domain will be adjusted when the minimum value of data is smaller than domain[0] or the maximum value of data is greater than domain[1] so that the axis displays all data values. If set to true, graphic elements (line, area, bars) will be clipped to conform to the specified domain. Default: False
allow_data_overflow: Var[bool]
- # Allow the axis has duplicated categorys or not when the type of axis is "category".
+ # Allow the axis has duplicated categorys or not when the type of axis is "category". Default: True
allow_duplicated_category: Var[bool]
- # If set false, no axis line will be drawn. If set a object, the option is the configuration of axis line.
+ # The range of the axis. Work best in conjuction with allow_data_overflow. Default: [0, "auto"]
+ domain: Var[List]
+
+ # If set false, no axis line will be drawn. Default: True
axis_line: Var[bool]
- # If set true, flips ticks around the axis line, displaying the labels inside the chart instead of outside.
+ # If set true, flips ticks around the axis line, displaying the labels inside the chart instead of outside. Default: False
mirror: Var[bool]
- # Reverse the ticks or not.
+ # Reverse the ticks or not. Default: False
reversed: Var[bool]
# The label of axis, which appears next to the axis.
label: Var[Union[str, int, Dict[str, Any]]]
- # If 'auto' set, the scale function is decided by the type of chart, and the props type. 'auto' | 'linear' | 'pow' | 'sqrt' | 'log' | 'identity' | 'time' | 'band' | 'point' | 'ordinal' | 'quantile' | 'quantize' | 'utc' | 'sequential' | 'threshold' | Function
+ # If 'auto' set, the scale function is decided by the type of chart, and the props type. 'auto' | 'linear' | 'pow' | 'sqrt' | 'log' | 'identity' | 'time' | 'band' | 'point' | 'ordinal' | 'quantile' | 'quantize' | 'utc' | 'sequential' | 'threshold'. Default: "auto"
scale: Var[LiteralScale]
# The unit of data displayed in the axis. This option will be used to represent an index unit in a scatter chart.
@@ -82,44 +90,44 @@ class Axis(Recharts):
# If set false, no ticks will be drawn.
tick: Var[bool]
- # The count of axis ticks.
+ # The count of axis ticks. Not used if 'type' is 'category'. Default: 5
tick_count: Var[int]
- # If set false, no axis tick lines will be drawn.
- tick_line: Var[bool] = LiteralVar.create(False)
+ # If set false, no axis tick lines will be drawn. Default: True
+ tick_line: Var[bool]
- # The length of tick line.
+ # The length of tick line. Default: 6
tick_size: Var[int]
- # The minimum gap between two adjacent labels
+ # The minimum gap between two adjacent labels. Default: 5
min_tick_gap: Var[int]
- # The stroke color of axis
+ # The stroke color of axis. Default: rx.color("gray", 9)
stroke: Var[Union[str, Color]] = LiteralVar.create(Color("gray", 9))
- # The text anchor of axis
- text_anchor: Var[str] # 'start', 'middle', 'end'
+ # The text anchor of axis. Default: "middle"
+ text_anchor: Var[LiteralTextAnchor]
# The customized event handler of click on the ticks of this axis
- on_click: EventHandler[lambda: []]
+ on_click: EventHandler[empty_event]
# The customized event handler of mousedown on the ticks of this axis
- on_mouse_down: EventHandler[lambda: []]
+ on_mouse_down: EventHandler[empty_event]
# The customized event handler of mouseup on the ticks of this axis
- on_mouse_up: EventHandler[lambda: []]
+ on_mouse_up: EventHandler[empty_event]
# The customized event handler of mousemove on the ticks of this axis
- on_mouse_move: EventHandler[lambda: []]
+ on_mouse_move: EventHandler[empty_event]
# The customized event handler of mouseout on the ticks of this axis
- on_mouse_out: EventHandler[lambda: []]
+ on_mouse_out: EventHandler[empty_event]
# The customized event handler of mouseenter on the ticks of this axis
- on_mouse_enter: EventHandler[lambda: []]
+ on_mouse_enter: EventHandler[empty_event]
# The customized event handler of mouseleave on the ticks of this axis
- on_mouse_leave: EventHandler[lambda: []]
+ on_mouse_leave: EventHandler[empty_event]
class XAxis(Axis):
@@ -129,20 +137,20 @@ class XAxis(Axis):
alias = "RechartsXAxis"
- # The orientation of axis 'top' | 'bottom'
+ # The orientation of axis 'top' | 'bottom'. Default: "bottom"
orientation: Var[LiteralOrientationTopBottom]
- # The id of x-axis which is corresponding to the data.
+ # The id of x-axis which is corresponding to the data. Default: 0
x_axis_id: Var[Union[str, int]]
- # Ensures that all datapoints within a chart contribute to its domain calculation, even when they are hidden
- include_hidden: Var[bool] = LiteralVar.create(False)
+ # Ensures that all datapoints within a chart contribute to its domain calculation, even when they are hidden. Default: False
+ include_hidden: Var[bool]
- # The range of the axis. Work best in conjuction with allow_data_overflow.
- domain: Var[List]
+ # The angle of axis ticks. Default: 0
+ angle: Var[int]
- # The range of the axis. Work best in conjuction with allow_data_overflow.
- domain: Var[List]
+ # Specify the padding of x-axis. Default: {"left": 0, "right": 0}
+ padding: Var[Dict[str, int]]
class YAxis(Axis):
@@ -152,14 +160,14 @@ class YAxis(Axis):
alias = "RechartsYAxis"
- # The orientation of axis 'left' | 'right'
+ # The orientation of axis 'left' | 'right'. Default: "left"
orientation: Var[LiteralOrientationLeftRight]
- # The id of y-axis which is corresponding to the data.
+ # The id of y-axis which is corresponding to the data. Default: 0
y_axis_id: Var[Union[str, int]]
- # The range of the axis. Work best in conjuction with allow_data_overflow.
- domain: Var[List]
+ # Specify the padding of y-axis. Default: {"top": 0, "bottom": 0}
+ padding: Var[Dict[str, int]]
class ZAxis(Recharts):
@@ -172,7 +180,10 @@ class ZAxis(Recharts):
# The key of data displayed in the axis.
data_key: Var[Union[str, int]]
- # The range of axis.
+ # The unique id of z-axis. Default: 0
+ z_axis_id: Var[Union[str, int]]
+
+ # The range of axis. Default: [10, 10]
range: Var[List[int]]
# The unit of data displayed in the axis. This option will be used to represent an index unit in a scatter chart.
@@ -181,7 +192,7 @@ class ZAxis(Recharts):
# The name of data displayed in the axis. This option will be used to represent an index in a scatter chart.
name: Var[Union[str, int]]
- # If 'auto' set, the scale function is decided by the type of chart, and the props type.
+ # If 'auto' set, the scale function is decided by the type of chart, and the props type. Default: "auto"
scale: Var[LiteralScale]
@@ -192,40 +203,40 @@ class Brush(Recharts):
alias = "RechartsBrush"
- # Stroke color
+ # Stroke color. Default: rx.color("gray", 9)
stroke: Var[Union[str, Color]] = LiteralVar.create(Color("gray", 9))
- # The fill color of brush.
+ # The fill color of brush. Default: rx.color("gray", 2)
fill: Var[Union[str, Color]] = LiteralVar.create(Color("gray", 2))
# The key of data displayed in the axis.
data_key: Var[Union[str, int]]
- # The x-coordinate of brush.
+ # The x-coordinate of brush. Default: 0
x: Var[int]
- # The y-coordinate of brush.
+ # The y-coordinate of brush. Default: 0
y: Var[int]
- # The width of brush.
+ # The width of brush. Default: 0
width: Var[int]
- # The height of brush.
+ # The height of brush. Default: 40
height: Var[int]
- # The data domain of brush, [min, max].
+ # The original data of a LineChart, a BarChart or an AreaChart.
data: Var[List[Any]]
- # The width of each traveller.
+ # The width of each traveller. Default: 5
traveller_width: Var[int]
- # The data with gap of refreshing chart. If the option is not set, the chart will be refreshed every time
+ # The data with gap of refreshing chart. If the option is not set, the chart will be refreshed every time. Default: 1
gap: Var[int]
- # The default start index of brush. If the option is not set, the start index will be 0.
+ # The default start index of brush. If the option is not set, the start index will be 0. Default: 0
start_index: Var[int]
- # The default end index of brush. If the option is not set, the end index will be 1.
+ # The default end index of brush. If the option is not set, the end index will be calculated by the length of data.
end_index: Var[int]
# The fill color of brush
@@ -241,7 +252,7 @@ class Brush(Recharts):
A dict mapping the event trigger to the var that is passed to the handler.
"""
return {
- EventTriggers.ON_CHANGE: lambda: [],
+ EventTriggers.ON_CHANGE: empty_event,
}
@@ -254,38 +265,62 @@ class Cartesian(Recharts):
# The key of a group of data which should be unique in an area chart.
data_key: Var[Union[str, int]]
- # The id of x-axis which is corresponding to the data.
+ # The id of x-axis which is corresponding to the data. Default: 0
x_axis_id: Var[Union[str, int]]
- # The id of y-axis which is corresponding to the data.
+ # The id of y-axis which is corresponding to the data. Default: 0
y_axis_id: Var[Union[str, int]]
- # The type of icon in legend. If set to 'none', no legend item will be rendered. 'line' | 'plainline' | 'square' | 'rect'| 'circle' | 'cross' | 'diamond' | 'star' | 'triangle' | 'wye' | 'none'optional
+ # The type of icon in legend. If set to 'none', no legend item will be rendered. 'line' | 'plainline' | 'square' | 'rect'| 'circle' | 'cross' | 'diamond' | 'star' | 'triangle' | 'wye' | 'none' optional
legend_type: Var[LiteralLegendType]
+ # If set false, animation of bar will be disabled. Default: True
+ is_animation_active: Var[bool]
+
+ # Specifies when the animation should begin, the unit of this option is ms. Default: 0
+ animation_begin: Var[int]
+
+ # Specifies the duration of animation, the unit of this option is ms. Default: 1500
+ animation_duration: Var[int]
+
+ # The type of easing function. Default: "ease"
+ animation_easing: Var[LiteralAnimationEasing]
+
+ # The unit of data. This option will be used in tooltip.
+ unit: Var[Union[str, int]]
+
+ # The name of data. This option will be used in tooltip and legend to represent the component. If no value was set to this option, the value of dataKey will be used alternatively.
+ name: Var[Union[str, int]]
+
+ # The customized event handler of animation start
+ on_animation_start: EventHandler[empty_event]
+
+ # The customized event handler of animation end
+ on_animation_end: EventHandler[empty_event]
+
# The customized event handler of click on the component in this group
- on_click: EventHandler[lambda: []]
+ on_click: EventHandler[empty_event]
# The customized event handler of mousedown on the component in this group
- on_mouse_down: EventHandler[lambda: []]
+ on_mouse_down: EventHandler[empty_event]
# The customized event handler of mouseup on the component in this group
- on_mouse_up: EventHandler[lambda: []]
+ on_mouse_up: EventHandler[empty_event]
# The customized event handler of mousemove on the component in this group
- on_mouse_move: EventHandler[lambda: []]
+ on_mouse_move: EventHandler[empty_event]
# The customized event handler of mouseover on the component in this group
- on_mouse_over: EventHandler[lambda: []]
+ on_mouse_over: EventHandler[empty_event]
# The customized event handler of mouseout on the component in this group
- on_mouse_out: EventHandler[lambda: []]
+ on_mouse_out: EventHandler[empty_event]
# The customized event handler of mouseenter on the component in this group
- on_mouse_enter: EventHandler[lambda: []]
+ on_mouse_enter: EventHandler[empty_event]
# The customized event handler of mouseleave on the component in this group
- on_mouse_leave: EventHandler[lambda: []]
+ on_mouse_leave: EventHandler[empty_event]
class Area(Cartesian):
@@ -295,22 +330,22 @@ class Area(Cartesian):
alias = "RechartsArea"
- # The color of the line stroke.
+ # The color of the line stroke. Default: rx.color("accent", 9)
stroke: Var[Union[str, Color]] = LiteralVar.create(Color("accent", 9))
- # The width of the line stroke.
- stroke_width: Var[int] = LiteralVar.create(1)
+ # The width of the line stroke. Default: 1
+ stroke_width: Var[int]
- # The color of the area fill.
+ # The color of the area fill. Default: rx.color("accent", 5)
fill: Var[Union[str, Color]] = LiteralVar.create(Color("accent", 5))
- # The interpolation type of area. And customized interpolation function can be set to type. 'basis' | 'basisClosed' | 'basisOpen' | 'bumpX' | 'bumpY' | 'bump' | 'linear' | 'linearClosed' | 'natural' | 'monotoneX' | 'monotoneY' | 'monotone' | 'step' | 'stepBefore' | 'stepAfter' |
+ # The interpolation type of area. And customized interpolation function can be set to type. 'basis' | 'basisClosed' | 'basisOpen' | 'bumpX' | 'bumpY' | 'bump' | 'linear' | 'linearClosed' | 'natural' | 'monotoneX' | 'monotoneY' | 'monotone' | 'step' | 'stepBefore' | 'stepAfter'. Default: "monotone"
type_: Var[LiteralAreaType] = LiteralVar.create("monotone")
- # If false set, dots will not be drawn. If true set, dots will be drawn which have the props calculated internally.
+ # If false set, dots will not be drawn. If true set, dots will be drawn which have the props calculated internally. Default: False
dot: Var[Union[bool, Dict[str, Any]]]
- # The dot is shown when user enter an area chart and this chart has tooltip. If false set, no active dot will not be drawn. If true set, active dot will be drawn which have the props calculated internally.
+ # The dot is shown when user enter an area chart and this chart has tooltip. If false set, no active dot will not be drawn. If true set, active dot will be drawn which have the props calculated internally. Default: {stroke: rx.color("accent", 2), fill: rx.color("accent", 10)}
active_dot: Var[Union[bool, Dict[str, Any]]] = LiteralVar.create(
{
"stroke": Color("accent", 2),
@@ -318,17 +353,20 @@ class Area(Cartesian):
}
)
- # If set false, labels will not be drawn. If set true, labels will be drawn which have the props calculated internally.
+ # If set false, labels will not be drawn. If set true, labels will be drawn which have the props calculated internally. Default: False
label: Var[bool]
+ # The value which can describle the line, usually calculated internally.
+ base_line: Var[Union[str, List[Dict[str, Any]]]]
+
+ # The coordinates of all the points in the area, usually calculated internally.
+ points: Var[List[Dict[str, Any]]]
+
# The stack id of area, when two areas have the same value axis and same stack_id, then the two areas are stacked in order.
stack_id: Var[Union[str, int]]
- # The unit of data. This option will be used in tooltip.
- unit: Var[Union[str, int]]
-
- # The name of data. This option will be used in tooltip and legend to represent a bar. If no value was set to this option, the value of dataKey will be used alternatively.
- name: Var[Union[str, int]]
+ # Whether to connect a graph area across null points. Default: False
+ connect_nulls: Var[bool]
# Valid children components
_valid_children: List[str] = ["LabelList"]
@@ -347,12 +385,13 @@ class Bar(Cartesian):
# The width of the line stroke.
stroke_width: Var[int]
- # The width of the line stroke.
+ # The width of the line stroke. Default: Color("accent", 9)
fill: Var[Union[str, Color]] = LiteralVar.create(Color("accent", 9))
- # If false set, background of bars will not be drawn. If true set, background of bars will be drawn which have the props calculated internally.
+
+ # If false set, background of bars will not be drawn. If true set, background of bars will be drawn which have the props calculated internally. Default: False
background: Var[bool]
- # If false set, labels will not be drawn. If true set, labels will be drawn which have the props calculated internally.
+ # If false set, labels will not be drawn. If true set, labels will be drawn which have the props calculated internally. Default: False
label: Var[bool]
# The stack id of bar, when two bars have the same value axis and same stack_id, then the two bars are stacked in order.
@@ -373,30 +412,15 @@ class Bar(Cartesian):
# Max size of the bar
max_bar_size: Var[int]
+ # If set a value, the option is the radius of all the rounded corners. If set a array, the option are in turn the radiuses of top-left corner, top-right corner, bottom-right corner, bottom-left corner. Default: 0
+ radius: Var[Union[int, List[int]]]
+
# The active bar is shown when a user enters a bar chart and this chart has tooltip. If set to false, no active bar will be drawn. If set to true, active bar will be drawn with the props calculated internally. If passed an object, active bar will be drawn, and the internally calculated props will be merged with the key value pairs of the passed object.
# active_bar: Var[Union[bool, Dict[str, Any]]]
# Valid children components
_valid_children: List[str] = ["Cell", "LabelList", "ErrorBar"]
- # If set false, animation of bar will be disabled.
- is_animation_active: Var[bool]
-
- # Specifies when the animation should begin, the unit of this option is ms, default 0.
- animation_begin: Var[int]
-
- # Specifies the duration of animation, the unit of this option is ms, default 1500.
- animation_duration: Var[int]
-
- # The type of easing function, default 'ease'
- animation_easing: Var[LiteralAnimationEasing]
-
- # The customized event handler of animation start
- on_animation_start: EventHandler[lambda: []]
-
- # The customized event handler of animation end
- on_animation_end: EventHandler[lambda: []]
-
class Line(Cartesian):
"""A Line component in Recharts."""
@@ -408,13 +432,13 @@ class Line(Cartesian):
# The interpolation type of line. And customized interpolation function can be set to type. It's the same as type in Area.
type_: Var[LiteralAreaType]
- # The color of the line stroke.
+ # The color of the line stroke. Default: rx.color("accent", 9)
stroke: Var[Union[str, Color]] = LiteralVar.create(Color("accent", 9))
- # The width of the line stroke.
+ # The width of the line stroke. Default: 1
stroke_width: Var[int]
- # The dot is shown when mouse enter a line chart and this chart has tooltip. If false set, no active dot will not be drawn. If true set, active dot will be drawn which have the props calculated internally.
+ # The dot is shown when mouse enter a line chart and this chart has tooltip. If false set, no active dot will not be drawn. If true set, active dot will be drawn which have the props calculated internally. Default: {"stroke": rx.color("accent", 10), "fill": rx.color("accent", 4)}
dot: Var[Union[bool, Dict[str, Any]]] = LiteralVar.create(
{
"stroke": Color("accent", 10),
@@ -422,7 +446,7 @@ class Line(Cartesian):
}
)
- # The dot is shown when user enter an area chart and this chart has tooltip. If false set, no active dot will not be drawn. If true set, active dot will be drawn which have the props calculated internally.
+ # The dot is shown when user enter an area chart and this chart has tooltip. If false set, no active dot will not be drawn. If true set, active dot will be drawn which have the props calculated internally. Default: {"stroke": rx.color("accent", 2), "fill": rx.color("accent", 10)}
active_dot: Var[Union[bool, Dict[str, Any]]] = LiteralVar.create(
{
"stroke": Color("accent", 2),
@@ -430,10 +454,10 @@ class Line(Cartesian):
}
)
- # If false set, labels will not be drawn. If true set, labels will be drawn which have the props calculated internally.
+ # If false set, labels will not be drawn. If true set, labels will be drawn which have the props calculated internally. Default: False
label: Var[bool]
- # Hides the line when true, useful when toggling visibility state via legend.
+ # Hides the line when true, useful when toggling visibility state via legend. Default: False
hide: Var[bool]
# Whether to connect a graph line across null points.
@@ -442,8 +466,11 @@ class Line(Cartesian):
# The unit of data. This option will be used in tooltip.
unit: Var[Union[str, int]]
- # The name of data displayed in the axis. This option will be used to represent an index in a scatter chart.
- name: Var[Union[str, int]]
+ # The coordinates of all the points in the line, usually calculated internally.
+ points: Var[List[Dict[str, Any]]]
+
+ # The pattern of dashes and gaps used to paint the line.
+ stroke_dasharray: Var[str]
# Valid children components
_valid_children: List[str] = ["LabelList", "ErrorBar"]
@@ -459,71 +486,68 @@ class Scatter(Recharts):
# The source data, in which each element is an object.
data: Var[List[Dict[str, Any]]]
- # The type of icon in legend. If set to 'none', no legend item will be rendered. 'line' | 'plainline' | 'square' | 'rect'| 'circle' | 'cross' | 'diamond' | 'square' | 'star' | 'triangle' | 'wye' | 'none'
+ # The type of icon in legend. If set to 'none', no legend item will be rendered. 'line' | 'plainline' | 'square' | 'rect'| 'circle' | 'cross' | 'diamond' | 'square' | 'star' | 'triangle' | 'wye' | 'none'. Default: "circle"
legend_type: Var[LiteralLegendType]
- # The id of x-axis which is corresponding to the data.
+ # The id of x-axis which is corresponding to the data. Default: 0
x_axis_id: Var[Union[str, int]]
- # The id of y-axis which is corresponding to the data.
+ # The id of y-axis which is corresponding to the data. Default: 0
y_axis_id: Var[Union[str, int]]
- # The id of z-axis which is corresponding to the data.
- z_axis_id: Var[str]
+ # The id of z-axis which is corresponding to the data. Default: 0
+ z_axis_id: Var[Union[str, int]]
- # If false set, line will not be drawn. If true set, line will be drawn which have the props calculated internally.
+ # If false set, line will not be drawn. If true set, line will be drawn which have the props calculated internally. Default: False
line: Var[bool]
- # If a string set, specified symbol will be used to show scatter item. 'circle' | 'cross' | 'diamond' | 'square' | 'star' | 'triangle' | 'wye'
+ # If a string set, specified symbol will be used to show scatter item. 'circle' | 'cross' | 'diamond' | 'square' | 'star' | 'triangle' | 'wye'. Default: "circle"
shape: Var[LiteralShape]
- # If 'joint' set, line will generated by just jointing all the points. If 'fitting' set, line will be generated by fitting algorithm. 'joint' | 'fitting'
+ # If 'joint' set, line will generated by just jointing all the points. If 'fitting' set, line will be generated by fitting algorithm. 'joint' | 'fitting'. Default: "joint"
line_type: Var[LiteralLineType]
- # The fill
+ # The fill color of the scatter. Default: rx.color("accent", 9)
fill: Var[Union[str, Color]] = LiteralVar.create(Color("accent", 9))
- # the name
- name: Var[Union[str, int]]
-
# Valid children components.
_valid_children: List[str] = ["LabelList", "ErrorBar"]
- # If set false, animation of bar will be disabled.
+ # If set false, animation of bar will be disabled. Default: True in CSR, False in SSR
is_animation_active: Var[bool]
- # Specifies when the animation should begin, the unit of this option is ms, default 0.
+ # Specifies when the animation should begin, the unit of this option is ms. Default: 0
animation_begin: Var[int]
- # Specifies the duration of animation, the unit of this option is ms, default 1500.
+ # Specifies the duration of animation, the unit of this option is ms. Default: 1500
animation_duration: Var[int]
- # The type of easing function, default 'ease'
+ # The type of easing function. Default: "ease"
animation_easing: Var[LiteralAnimationEasing]
# The customized event handler of click on the component in this group
- on_click: EventHandler[lambda: []]
+ on_click: EventHandler[empty_event]
# The customized event handler of mousedown on the component in this group
- on_mouse_down: EventHandler[lambda: []]
+ on_mouse_down: EventHandler[empty_event]
# The customized event handler of mouseup on the component in this group
- on_mouse_up: EventHandler[lambda: []]
+ on_mouse_up: EventHandler[empty_event]
# The customized event handler of mousemove on the component in this group
- on_mouse_move: EventHandler[lambda: []]
+ on_mouse_move: EventHandler[empty_event]
# The customized event handler of mouseover on the component in this group
- on_mouse_over: EventHandler[lambda: []]
+ on_mouse_over: EventHandler[empty_event]
# The customized event handler of mouseout on the component in this group
- on_mouse_out: EventHandler[lambda: []]
+ on_mouse_out: EventHandler[empty_event]
# The customized event handler of mouseenter on the component in this group
- on_mouse_enter: EventHandler[lambda: []]
+ on_mouse_enter: EventHandler[empty_event]
# The customized event handler of mouseleave on the component in this group
- on_mouse_leave: EventHandler[lambda: []]
+ on_mouse_leave: EventHandler[empty_event]
class Funnel(Recharts):
@@ -536,62 +560,65 @@ class Funnel(Recharts):
# The source data, in which each element is an object.
data: Var[List[Dict[str, Any]]]
- # The key of a group of data which should be unique in an area chart.
+ # The key or getter of a group of data which should be unique in a FunnelChart.
data_key: Var[Union[str, int]]
- # The key or getter of a group of data which should be unique in a LineChart.
+ # The key of each sector's name. Default: "name"
name_key: Var[str]
- # The type of icon in legend. If set to 'none', no legend item will be rendered.
+ # The type of icon in legend. If set to 'none', no legend item will be rendered. Default: "line"
legend_type: Var[LiteralLegendType]
- # If set false, animation of line will be disabled.
+ # If set false, animation of line will be disabled. Default: True
is_animation_active: Var[bool]
- # Specifies when the animation should begin, the unit of this option is ms.
+ # Specifies when the animation should begin, the unit of this option is ms. Default: 0
animation_begin: Var[int]
- # Specifies the duration of animation, the unit of this option is ms.
+ # Specifies the duration of animation, the unit of this option is ms. Default: 1500
animation_duration: Var[int]
- # The type of easing function. 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'linear'
+ # The type of easing function. 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'linear'. Default "ease"
animation_easing: Var[LiteralAnimationEasing]
- # stroke color
+ # Stroke color. Default: rx.color("gray", 3)
stroke: Var[Union[str, Color]] = LiteralVar.create(Color("gray", 3))
+ # The coordinates of all the trapezoids in the funnel, usually calculated internally.
+ trapezoids: Var[List[Dict[str, Any]]]
+
# Valid children components
_valid_children: List[str] = ["LabelList", "Cell"]
# The customized event handler of animation start
- on_animation_start: EventHandler[lambda: []]
+ on_animation_start: EventHandler[empty_event]
# The customized event handler of animation end
- on_animation_end: EventHandler[lambda: []]
+ on_animation_end: EventHandler[empty_event]
# The customized event handler of click on the component in this group
- on_click: EventHandler[lambda: []]
+ on_click: EventHandler[empty_event]
# The customized event handler of mousedown on the component in this group
- on_mouse_down: EventHandler[lambda: []]
+ on_mouse_down: EventHandler[empty_event]
# The customized event handler of mouseup on the component in this group
- on_mouse_up: EventHandler[lambda: []]
+ on_mouse_up: EventHandler[empty_event]
# The customized event handler of mousemove on the component in this group
- on_mouse_move: EventHandler[lambda: []]
+ on_mouse_move: EventHandler[empty_event]
# The customized event handler of mouseover on the component in this group
- on_mouse_over: EventHandler[lambda: []]
+ on_mouse_over: EventHandler[empty_event]
# The customized event handler of mouseout on the component in this group
- on_mouse_out: EventHandler[lambda: []]
+ on_mouse_out: EventHandler[empty_event]
# The customized event handler of mouseenter on the component in this group
- on_mouse_enter: EventHandler[lambda: []]
+ on_mouse_enter: EventHandler[empty_event]
# The customized event handler of mouseleave on the component in this group
- on_mouse_leave: EventHandler[lambda: []]
+ on_mouse_leave: EventHandler[empty_event]
class ErrorBar(Recharts):
@@ -601,38 +628,38 @@ class ErrorBar(Recharts):
alias = "RechartsErrorBar"
- # The direction of error bar. 'x' | 'y' | 'both'
+ # Only used for ScatterChart with error bars in two directions. Only accepts a value of "x" or "y" and makes the error bars lie in that direction.
direction: Var[LiteralDirection]
# The key of a group of data which should be unique in an area chart.
data_key: Var[Union[str, int]]
- # The width of the error bar ends.
+ # The width of the error bar ends. Default: 5
width: Var[int]
- # The stroke color of error bar.
+ # The stroke color of error bar. Default: rx.color("gray", 8)
stroke: Var[Union[str, Color]] = LiteralVar.create(Color("gray", 8))
- # The stroke width of error bar.
- stroke_width: Var[int]
+ # The stroke width of error bar. Default: 1.5
+ stroke_width: Var[Union[int, float]]
class Reference(Recharts):
"""A base class for reference components in Reference."""
- # The id of x-axis which is corresponding to the data.
+ # The id of x-axis which is corresponding to the data. Default: 0
x_axis_id: Var[Union[str, int]]
- # The id of y-axis which is corresponding to the data.
+ # The id of y-axis which is corresponding to the data. Default: 0
y_axis_id: Var[Union[str, int]]
- # Defines how to draw the reference line if it falls partly outside the canvas. If set to 'discard', the reference line will not be drawn at all. If set to 'hidden', the reference line will be clipped to the canvas. If set to 'visible', the reference line will be drawn completely. If set to 'extendDomain', the domain of the overflown axis will be extended such that the reference line fits into the canvas.
+ # Defines how to draw the reference line if it falls partly outside the canvas. If set to 'discard', the reference line will not be drawn at all. If set to 'hidden', the reference line will be clipped to the canvas. If set to 'visible', the reference line will be drawn completely. If set to 'extendDomain', the domain of the overflown axis will be extended such that the reference line fits into the canvas. Default: "discard"
if_overflow: Var[LiteralIfOverflow]
# If set a string or a number, default label will be drawn, and the option is content.
label: Var[Union[str, int]]
- # If set true, the line will be rendered in front of bars in BarChart, etc.
+ # If set true, the line will be rendered in front of bars in BarChart, etc. Default: False
is_front: Var[bool]
@@ -652,7 +679,7 @@ class ReferenceLine(Reference):
# The color of the reference line.
stroke: Var[Union[str, Color]]
- # The width of the stroke.
+ # The width of the stroke. Default: 1
stroke_width: Var[Union[str, int]]
# Valid children components
@@ -688,28 +715,28 @@ class ReferenceDot(Reference):
_valid_children: List[str] = ["Label"]
# The customized event handler of click on the component in this chart
- on_click: EventHandler[lambda: []]
+ on_click: EventHandler[empty_event]
# The customized event handler of mousedown on the component in this chart
- on_mouse_down: EventHandler[lambda: []]
+ on_mouse_down: EventHandler[empty_event]
# The customized event handler of mouseup on the component in this chart
- on_mouse_up: EventHandler[lambda: []]
+ on_mouse_up: EventHandler[empty_event]
# The customized event handler of mouseover on the component in this chart
- on_mouse_over: EventHandler[lambda: []]
+ on_mouse_over: EventHandler[empty_event]
# The customized event handler of mouseout on the component in this chart
- on_mouse_out: EventHandler[lambda: []]
+ on_mouse_out: EventHandler[empty_event]
# The customized event handler of mouseenter on the component in this chart
- on_mouse_enter: EventHandler[lambda: []]
+ on_mouse_enter: EventHandler[empty_event]
# The customized event handler of mousemove on the component in this chart
- on_mouse_move: EventHandler[lambda: []]
+ on_mouse_move: EventHandler[empty_event]
# The customized event handler of mouseleave on the component in this chart
- on_mouse_leave: EventHandler[lambda: []]
+ on_mouse_leave: EventHandler[empty_event]
class ReferenceArea(Recharts):
@@ -746,10 +773,10 @@ class ReferenceArea(Recharts):
# A boundary value of the area. If the specified y-axis is a number axis, the type of y must be Number. If the specified y-axis is a category axis, the value of y must be one of the categorys. If one of y1 or y2 is invalidate, the area will cover along y-axis.
y2: Var[Union[str, int]]
- # Defines how to draw the reference line if it falls partly outside the canvas. If set to 'discard', the reference line will not be drawn at all. If set to 'hidden', the reference line will be clipped to the canvas. If set to 'visible', the reference line will be drawn completely. If set to 'extendDomain', the domain of the overflown axis will be extended such that the reference line fits into the canvas.
+ # Defines how to draw the reference line if it falls partly outside the canvas. If set to 'discard', the reference line will not be drawn at all. If set to 'hidden', the reference line will be clipped to the canvas. If set to 'visible', the reference line will be drawn completely. If set to 'extendDomain', the domain of the overflown axis will be extended such that the reference line fits into the canvas. Default: "discard"
if_overflow: Var[LiteralIfOverflow]
- # If set true, the line will be rendered in front of bars in BarChart, etc.
+ # If set true, the line will be rendered in front of bars in BarChart, etc. Default: False
is_front: Var[bool]
# Valid children components
@@ -759,16 +786,16 @@ class ReferenceArea(Recharts):
class Grid(Recharts):
"""A base class for grid components in Recharts."""
- # The x-coordinate of grid.
+ # The x-coordinate of grid. Default: 0
x: Var[int]
- # The y-coordinate of grid.
+ # The y-coordinate of grid. Default: 0
y: Var[int]
- # The width of grid.
+ # The width of grid. Default: 0
width: Var[int]
- # The height of grid.
+ # The height of grid. Default: 0
height: Var[int]
@@ -779,28 +806,28 @@ class CartesianGrid(Grid):
alias = "RechartsCartesianGrid"
- # The horizontal line configuration.
+ # The horizontal line configuration. Default: True
horizontal: Var[bool]
- # The vertical line configuration.
+ # The vertical line configuration. Default: True
vertical: Var[bool]
- # The x-coordinates in pixel values of all vertical lines.
+ # The x-coordinates in pixel values of all vertical lines. Default: []
vertical_points: Var[List[Union[str, int]]]
- # The x-coordinates in pixel values of all vertical lines.
+ # The x-coordinates in pixel values of all vertical lines. Default: []
horizontal_points: Var[List[Union[str, int]]]
# The background of grid.
fill: Var[Union[str, Color]]
- # The opacity of the background used to fill the space between grid lines
+ # The opacity of the background used to fill the space between grid lines.
fill_opacity: Var[float]
- # The pattern of dashes and gaps used to paint the lines of the grid
+ # The pattern of dashes and gaps used to paint the lines of the grid.
stroke_dasharray: Var[str]
- # the stroke color of grid
+ # the stroke color of grid. Default: rx.color("gray", 7)
stroke: Var[Union[str, Color]] = LiteralVar.create(Color("gray", 7))
@@ -811,28 +838,31 @@ class CartesianAxis(Grid):
alias = "RechartsCartesianAxis"
- # The orientation of axis 'top' | 'bottom' | 'left' | 'right'
+ # The orientation of axis 'top' | 'bottom' | 'left' | 'right'. Default: "bottom"
orientation: Var[LiteralOrientationTopBottomLeftRight]
- # If set false, no axis line will be drawn. If set a object, the option is the configuration of axis line.
+ # The box of viewing area. Default: {"x": 0, "y": 0, "width": 0, "height": 0}
+ view_box: Var[Dict[str, Any]]
+
+ # If set false, no axis line will be drawn. If set a object, the option is the configuration of axis line. Default: True
axis_line: Var[bool]
- # If set false, no axis tick lines will be drawn. If set a object, the option is the configuration of tick lines.
+ # If set false, no ticks will be drawn.
+ tick: Var[bool]
+
+ # If set false, no axis tick lines will be drawn. If set a object, the option is the configuration of tick lines. Default: True
tick_line: Var[bool]
- # The length of tick line.
+ # The length of tick line. Default: 6
tick_size: Var[int]
- # If set 0, all the ticks will be shown. If set preserveStart", "preserveEnd" or "preserveStartEnd", the ticks which is to be shown or hidden will be calculated automatically.
+ # If set 0, all the ticks will be shown. If set preserveStart", "preserveEnd" or "preserveStartEnd", the ticks which is to be shown or hidden will be calculated automatically. Default: "preserveEnd"
interval: Var[LiteralInterval]
- # If set false, no ticks will be drawn.
- ticks: Var[bool]
-
# If set a string or a number, default label will be drawn, and the option is content.
- label: Var[str]
+ label: Var[Union[str, int]]
- # If set true, flips ticks around the axis line, displaying the labels inside the chart instead of outside.
+ # If set true, flips ticks around the axis line, displaying the labels inside the chart instead of outside. Default: False
mirror: Var[bool]
# The margin between tick line and tick.
diff --git a/reflex/components/recharts/cartesian.pyi b/reflex/components/recharts/cartesian.pyi
index e7b186f6f..9772be792 100644
--- a/reflex/components/recharts/cartesian.pyi
+++ b/reflex/components/recharts/cartesian.pyi
@@ -3,10 +3,10 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, List, Literal, Optional, Union, overload
+from typing import Any, Dict, List, Literal, Optional, Union, overload
from reflex.constants.colors import Color
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -27,9 +27,32 @@ class Axis(Recharts):
type_: Optional[
Union[Literal["category", "number"], Var[Literal["category", "number"]]]
] = None,
+ interval: Optional[
+ Union[
+ Literal[
+ "equidistantPreserveStart",
+ "preserveEnd",
+ "preserveStart",
+ "preserveStartEnd",
+ ],
+ Var[
+ Union[
+ Literal[
+ "equidistantPreserveStart",
+ "preserveEnd",
+ "preserveStart",
+ "preserveStartEnd",
+ ],
+ int,
+ ]
+ ],
+ int,
+ ]
+ ] = None,
allow_decimals: Optional[Union[Var[bool], bool]] = None,
allow_data_overflow: Optional[Union[Var[bool], bool]] = None,
allow_duplicated_category: Optional[Union[Var[bool], bool]] = None,
+ domain: Optional[Union[List, Var[List]]] = None,
axis_line: Optional[Union[Var[bool], bool]] = None,
mirror: Optional[Union[Var[bool], bool]] = None,
reversed: Optional[Union[Var[bool], bool]] = None,
@@ -87,48 +110,33 @@ class Axis(Recharts):
tick_size: Optional[Union[Var[int], int]] = None,
min_tick_gap: Optional[Union[Var[int], int]] = None,
stroke: Optional[Union[Color, Var[Union[Color, str]], str]] = None,
- text_anchor: Optional[Union[Var[str], str]] = None,
+ text_anchor: Optional[
+ Union[
+ Literal["end", "middle", "start"],
+ Var[Literal["end", "middle", "start"]],
+ ]
+ ] = None,
style: Optional[Style] = None,
key: Optional[Any] = None,
id: Optional[Any] = None,
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Axis":
"""Create the component.
@@ -136,28 +144,30 @@ class Axis(Recharts):
Args:
*children: The children of the component.
data_key: The key of data displayed in the axis.
- hide: If set true, the axis do not display in the chart.
+ hide: If set true, the axis do not display in the chart. Default: False
width: The width of axis which is usually calculated internally.
height: The height of axis, which can be setted by user.
type_: The type of axis 'number' | 'category'
- allow_decimals: Allow the ticks of XAxis to be decimals or not.
- allow_data_overflow: When domain of the axis is specified and the type of the axis is 'number', if allowDataOverflow is set to be false, the domain will be adjusted when the minimum value of data is smaller than domain[0] or the maximum value of data is greater than domain[1] so that the axis displays all data values. If set to true, graphic elements (line, area, bars) will be clipped to conform to the specified domain.
- allow_duplicated_category: Allow the axis has duplicated categorys or not when the type of axis is "category".
- axis_line: If set false, no axis line will be drawn. If set a object, the option is the configuration of axis line.
- mirror: If set true, flips ticks around the axis line, displaying the labels inside the chart instead of outside.
- reversed: Reverse the ticks or not.
+ interval: If set 0, all the ticks will be shown. If set preserveStart", "preserveEnd" or "preserveStartEnd", the ticks which is to be shown or hidden will be calculated automatically. Default: "preserveEnd"
+ allow_decimals: Allow the ticks of Axis to be decimals or not. Default: True
+ allow_data_overflow: When domain of the axis is specified and the type of the axis is 'number', if allowDataOverflow is set to be false, the domain will be adjusted when the minimum value of data is smaller than domain[0] or the maximum value of data is greater than domain[1] so that the axis displays all data values. If set to true, graphic elements (line, area, bars) will be clipped to conform to the specified domain. Default: False
+ allow_duplicated_category: Allow the axis has duplicated categorys or not when the type of axis is "category". Default: True
+ domain: The range of the axis. Work best in conjuction with allow_data_overflow. Default: [0, "auto"]
+ axis_line: If set false, no axis line will be drawn. Default: True
+ mirror: If set true, flips ticks around the axis line, displaying the labels inside the chart instead of outside. Default: False
+ reversed: Reverse the ticks or not. Default: False
label: The label of axis, which appears next to the axis.
- scale: If 'auto' set, the scale function is decided by the type of chart, and the props type. 'auto' | 'linear' | 'pow' | 'sqrt' | 'log' | 'identity' | 'time' | 'band' | 'point' | 'ordinal' | 'quantile' | 'quantize' | 'utc' | 'sequential' | 'threshold' | Function
+ scale: If 'auto' set, the scale function is decided by the type of chart, and the props type. 'auto' | 'linear' | 'pow' | 'sqrt' | 'log' | 'identity' | 'time' | 'band' | 'point' | 'ordinal' | 'quantile' | 'quantize' | 'utc' | 'sequential' | 'threshold'. Default: "auto"
unit: The unit of data displayed in the axis. This option will be used to represent an index unit in a scatter chart.
name: The name of data displayed in the axis. This option will be used to represent an index in a scatter chart.
ticks: Set the values of axis ticks manually.
tick: If set false, no ticks will be drawn.
- tick_count: The count of axis ticks.
- tick_line: If set false, no axis tick lines will be drawn.
- tick_size: The length of tick line.
- min_tick_gap: The minimum gap between two adjacent labels
- stroke: The stroke color of axis
- text_anchor: The text anchor of axis
+ tick_count: The count of axis ticks. Not used if 'type' is 'category'. Default: 5
+ tick_line: If set false, no axis tick lines will be drawn. Default: True
+ tick_size: The length of tick line. Default: 6
+ min_tick_gap: The minimum gap between two adjacent labels. Default: 5
+ stroke: The stroke color of axis. Default: rx.color("gray", 9)
+ text_anchor: The text anchor of axis. Default: "middle"
style: The style of the component.
key: A unique key for the component.
id: The id for the component.
@@ -182,7 +192,8 @@ class XAxis(Axis):
] = None,
x_axis_id: Optional[Union[Var[Union[int, str]], int, str]] = None,
include_hidden: Optional[Union[Var[bool], bool]] = None,
- domain: Optional[Union[List, Var[List]]] = None,
+ angle: Optional[Union[Var[int], int]] = None,
+ padding: Optional[Union[Dict[str, int], Var[Dict[str, int]]]] = None,
data_key: Optional[Union[Var[Union[int, str]], int, str]] = None,
hide: Optional[Union[Var[bool], bool]] = None,
width: Optional[Union[Var[Union[int, str]], int, str]] = None,
@@ -190,9 +201,32 @@ class XAxis(Axis):
type_: Optional[
Union[Literal["category", "number"], Var[Literal["category", "number"]]]
] = None,
+ interval: Optional[
+ Union[
+ Literal[
+ "equidistantPreserveStart",
+ "preserveEnd",
+ "preserveStart",
+ "preserveStartEnd",
+ ],
+ Var[
+ Union[
+ Literal[
+ "equidistantPreserveStart",
+ "preserveEnd",
+ "preserveStart",
+ "preserveStartEnd",
+ ],
+ int,
+ ]
+ ],
+ int,
+ ]
+ ] = None,
allow_decimals: Optional[Union[Var[bool], bool]] = None,
allow_data_overflow: Optional[Union[Var[bool], bool]] = None,
allow_duplicated_category: Optional[Union[Var[bool], bool]] = None,
+ domain: Optional[Union[List, Var[List]]] = None,
axis_line: Optional[Union[Var[bool], bool]] = None,
mirror: Optional[Union[Var[bool], bool]] = None,
reversed: Optional[Union[Var[bool], bool]] = None,
@@ -250,81 +284,69 @@ class XAxis(Axis):
tick_size: Optional[Union[Var[int], int]] = None,
min_tick_gap: Optional[Union[Var[int], int]] = None,
stroke: Optional[Union[Color, Var[Union[Color, str]], str]] = None,
- text_anchor: Optional[Union[Var[str], str]] = None,
+ text_anchor: Optional[
+ Union[
+ Literal["end", "middle", "start"],
+ Var[Literal["end", "middle", "start"]],
+ ]
+ ] = None,
style: Optional[Style] = None,
key: Optional[Any] = None,
id: Optional[Any] = None,
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "XAxis":
"""Create the component.
Args:
*children: The children of the component.
- orientation: The orientation of axis 'top' | 'bottom'
- x_axis_id: The id of x-axis which is corresponding to the data.
- include_hidden: Ensures that all datapoints within a chart contribute to its domain calculation, even when they are hidden
- domain: The range of the axis. Work best in conjuction with allow_data_overflow.
+ orientation: The orientation of axis 'top' | 'bottom'. Default: "bottom"
+ x_axis_id: The id of x-axis which is corresponding to the data. Default: 0
+ include_hidden: Ensures that all datapoints within a chart contribute to its domain calculation, even when they are hidden. Default: False
+ angle: The angle of axis ticks. Default: 0
+ padding: Specify the padding of x-axis. Default: {"left": 0, "right": 0}
data_key: The key of data displayed in the axis.
- hide: If set true, the axis do not display in the chart.
+ hide: If set true, the axis do not display in the chart. Default: False
width: The width of axis which is usually calculated internally.
height: The height of axis, which can be setted by user.
type_: The type of axis 'number' | 'category'
- allow_decimals: Allow the ticks of XAxis to be decimals or not.
- allow_data_overflow: When domain of the axis is specified and the type of the axis is 'number', if allowDataOverflow is set to be false, the domain will be adjusted when the minimum value of data is smaller than domain[0] or the maximum value of data is greater than domain[1] so that the axis displays all data values. If set to true, graphic elements (line, area, bars) will be clipped to conform to the specified domain.
- allow_duplicated_category: Allow the axis has duplicated categorys or not when the type of axis is "category".
- axis_line: If set false, no axis line will be drawn. If set a object, the option is the configuration of axis line.
- mirror: If set true, flips ticks around the axis line, displaying the labels inside the chart instead of outside.
- reversed: Reverse the ticks or not.
+ interval: If set 0, all the ticks will be shown. If set preserveStart", "preserveEnd" or "preserveStartEnd", the ticks which is to be shown or hidden will be calculated automatically. Default: "preserveEnd"
+ allow_decimals: Allow the ticks of Axis to be decimals or not. Default: True
+ allow_data_overflow: When domain of the axis is specified and the type of the axis is 'number', if allowDataOverflow is set to be false, the domain will be adjusted when the minimum value of data is smaller than domain[0] or the maximum value of data is greater than domain[1] so that the axis displays all data values. If set to true, graphic elements (line, area, bars) will be clipped to conform to the specified domain. Default: False
+ allow_duplicated_category: Allow the axis has duplicated categorys or not when the type of axis is "category". Default: True
+ domain: The range of the axis. Work best in conjuction with allow_data_overflow. Default: [0, "auto"]
+ axis_line: If set false, no axis line will be drawn. Default: True
+ mirror: If set true, flips ticks around the axis line, displaying the labels inside the chart instead of outside. Default: False
+ reversed: Reverse the ticks or not. Default: False
label: The label of axis, which appears next to the axis.
- scale: If 'auto' set, the scale function is decided by the type of chart, and the props type. 'auto' | 'linear' | 'pow' | 'sqrt' | 'log' | 'identity' | 'time' | 'band' | 'point' | 'ordinal' | 'quantile' | 'quantize' | 'utc' | 'sequential' | 'threshold' | Function
+ scale: If 'auto' set, the scale function is decided by the type of chart, and the props type. 'auto' | 'linear' | 'pow' | 'sqrt' | 'log' | 'identity' | 'time' | 'band' | 'point' | 'ordinal' | 'quantile' | 'quantize' | 'utc' | 'sequential' | 'threshold'. Default: "auto"
unit: The unit of data displayed in the axis. This option will be used to represent an index unit in a scatter chart.
name: The name of data displayed in the axis. This option will be used to represent an index in a scatter chart.
ticks: Set the values of axis ticks manually.
tick: If set false, no ticks will be drawn.
- tick_count: The count of axis ticks.
- tick_line: If set false, no axis tick lines will be drawn.
- tick_size: The length of tick line.
- min_tick_gap: The minimum gap between two adjacent labels
- stroke: The stroke color of axis
- text_anchor: The text anchor of axis
+ tick_count: The count of axis ticks. Not used if 'type' is 'category'. Default: 5
+ tick_line: If set false, no axis tick lines will be drawn. Default: True
+ tick_size: The length of tick line. Default: 6
+ min_tick_gap: The minimum gap between two adjacent labels. Default: 5
+ stroke: The stroke color of axis. Default: rx.color("gray", 9)
+ text_anchor: The text anchor of axis. Default: "middle"
style: The style of the component.
key: A unique key for the component.
id: The id for the component.
@@ -348,7 +370,7 @@ class YAxis(Axis):
Union[Literal["left", "right"], Var[Literal["left", "right"]]]
] = None,
y_axis_id: Optional[Union[Var[Union[int, str]], int, str]] = None,
- domain: Optional[Union[List, Var[List]]] = None,
+ padding: Optional[Union[Dict[str, int], Var[Dict[str, int]]]] = None,
data_key: Optional[Union[Var[Union[int, str]], int, str]] = None,
hide: Optional[Union[Var[bool], bool]] = None,
width: Optional[Union[Var[Union[int, str]], int, str]] = None,
@@ -356,9 +378,32 @@ class YAxis(Axis):
type_: Optional[
Union[Literal["category", "number"], Var[Literal["category", "number"]]]
] = None,
+ interval: Optional[
+ Union[
+ Literal[
+ "equidistantPreserveStart",
+ "preserveEnd",
+ "preserveStart",
+ "preserveStartEnd",
+ ],
+ Var[
+ Union[
+ Literal[
+ "equidistantPreserveStart",
+ "preserveEnd",
+ "preserveStart",
+ "preserveStartEnd",
+ ],
+ int,
+ ]
+ ],
+ int,
+ ]
+ ] = None,
allow_decimals: Optional[Union[Var[bool], bool]] = None,
allow_data_overflow: Optional[Union[Var[bool], bool]] = None,
allow_duplicated_category: Optional[Union[Var[bool], bool]] = None,
+ domain: Optional[Union[List, Var[List]]] = None,
axis_line: Optional[Union[Var[bool], bool]] = None,
mirror: Optional[Union[Var[bool], bool]] = None,
reversed: Optional[Union[Var[bool], bool]] = None,
@@ -416,80 +461,67 @@ class YAxis(Axis):
tick_size: Optional[Union[Var[int], int]] = None,
min_tick_gap: Optional[Union[Var[int], int]] = None,
stroke: Optional[Union[Color, Var[Union[Color, str]], str]] = None,
- text_anchor: Optional[Union[Var[str], str]] = None,
+ text_anchor: Optional[
+ Union[
+ Literal["end", "middle", "start"],
+ Var[Literal["end", "middle", "start"]],
+ ]
+ ] = None,
style: Optional[Style] = None,
key: Optional[Any] = None,
id: Optional[Any] = None,
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "YAxis":
"""Create the component.
Args:
*children: The children of the component.
- orientation: The orientation of axis 'left' | 'right'
- y_axis_id: The id of y-axis which is corresponding to the data.
- domain: The range of the axis. Work best in conjuction with allow_data_overflow.
+ orientation: The orientation of axis 'left' | 'right'. Default: "left"
+ y_axis_id: The id of y-axis which is corresponding to the data. Default: 0
+ padding: Specify the padding of y-axis. Default: {"top": 0, "bottom": 0}
data_key: The key of data displayed in the axis.
- hide: If set true, the axis do not display in the chart.
+ hide: If set true, the axis do not display in the chart. Default: False
width: The width of axis which is usually calculated internally.
height: The height of axis, which can be setted by user.
type_: The type of axis 'number' | 'category'
- allow_decimals: Allow the ticks of XAxis to be decimals or not.
- allow_data_overflow: When domain of the axis is specified and the type of the axis is 'number', if allowDataOverflow is set to be false, the domain will be adjusted when the minimum value of data is smaller than domain[0] or the maximum value of data is greater than domain[1] so that the axis displays all data values. If set to true, graphic elements (line, area, bars) will be clipped to conform to the specified domain.
- allow_duplicated_category: Allow the axis has duplicated categorys or not when the type of axis is "category".
- axis_line: If set false, no axis line will be drawn. If set a object, the option is the configuration of axis line.
- mirror: If set true, flips ticks around the axis line, displaying the labels inside the chart instead of outside.
- reversed: Reverse the ticks or not.
+ interval: If set 0, all the ticks will be shown. If set preserveStart", "preserveEnd" or "preserveStartEnd", the ticks which is to be shown or hidden will be calculated automatically. Default: "preserveEnd"
+ allow_decimals: Allow the ticks of Axis to be decimals or not. Default: True
+ allow_data_overflow: When domain of the axis is specified and the type of the axis is 'number', if allowDataOverflow is set to be false, the domain will be adjusted when the minimum value of data is smaller than domain[0] or the maximum value of data is greater than domain[1] so that the axis displays all data values. If set to true, graphic elements (line, area, bars) will be clipped to conform to the specified domain. Default: False
+ allow_duplicated_category: Allow the axis has duplicated categorys or not when the type of axis is "category". Default: True
+ domain: The range of the axis. Work best in conjuction with allow_data_overflow. Default: [0, "auto"]
+ axis_line: If set false, no axis line will be drawn. Default: True
+ mirror: If set true, flips ticks around the axis line, displaying the labels inside the chart instead of outside. Default: False
+ reversed: Reverse the ticks or not. Default: False
label: The label of axis, which appears next to the axis.
- scale: If 'auto' set, the scale function is decided by the type of chart, and the props type. 'auto' | 'linear' | 'pow' | 'sqrt' | 'log' | 'identity' | 'time' | 'band' | 'point' | 'ordinal' | 'quantile' | 'quantize' | 'utc' | 'sequential' | 'threshold' | Function
+ scale: If 'auto' set, the scale function is decided by the type of chart, and the props type. 'auto' | 'linear' | 'pow' | 'sqrt' | 'log' | 'identity' | 'time' | 'band' | 'point' | 'ordinal' | 'quantile' | 'quantize' | 'utc' | 'sequential' | 'threshold'. Default: "auto"
unit: The unit of data displayed in the axis. This option will be used to represent an index unit in a scatter chart.
name: The name of data displayed in the axis. This option will be used to represent an index in a scatter chart.
ticks: Set the values of axis ticks manually.
tick: If set false, no ticks will be drawn.
- tick_count: The count of axis ticks.
- tick_line: If set false, no axis tick lines will be drawn.
- tick_size: The length of tick line.
- min_tick_gap: The minimum gap between two adjacent labels
- stroke: The stroke color of axis
- text_anchor: The text anchor of axis
+ tick_count: The count of axis ticks. Not used if 'type' is 'category'. Default: 5
+ tick_line: If set false, no axis tick lines will be drawn. Default: True
+ tick_size: The length of tick line. Default: 6
+ min_tick_gap: The minimum gap between two adjacent labels. Default: 5
+ stroke: The stroke color of axis. Default: rx.color("gray", 9)
+ text_anchor: The text anchor of axis. Default: "middle"
style: The style of the component.
key: A unique key for the component.
id: The id for the component.
@@ -510,6 +542,7 @@ class ZAxis(Recharts):
cls,
*children,
data_key: Optional[Union[Var[Union[int, str]], int, str]] = None,
+ z_axis_id: Optional[Union[Var[Union[int, str]], int, str]] = None,
range: Optional[Union[List[int], Var[List[int]]]] = None,
unit: Optional[Union[Var[Union[int, str]], int, str]] = None,
name: Optional[Union[Var[Union[int, str]], int, str]] = None,
@@ -559,41 +592,21 @@ class ZAxis(Recharts):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "ZAxis":
"""Create the component.
@@ -601,10 +614,11 @@ class ZAxis(Recharts):
Args:
*children: The children of the component.
data_key: The key of data displayed in the axis.
- range: The range of axis.
+ z_axis_id: The unique id of z-axis. Default: 0
+ range: The range of axis. Default: [10, 10]
unit: The unit of data displayed in the axis. This option will be used to represent an index unit in a scatter chart.
name: The name of data displayed in the axis. This option will be used to represent an index in a scatter chart.
- scale: If 'auto' set, the scale function is decided by the type of chart, and the props type.
+ scale: If 'auto' set, the scale function is decided by the type of chart, and the props type. Default: "auto"
style: The style of the component.
key: A unique key for the component.
id: The id for the component.
@@ -643,7 +657,7 @@ class Brush(Recharts):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_change: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
+ on_change: Optional[EventType[[]]] = None,
**props,
) -> "Brush":
"""Create the component.
@@ -653,15 +667,15 @@ class Brush(Recharts):
stroke: The stroke color of brush
fill: The fill color of brush
data_key: The key of data displayed in the axis.
- x: The x-coordinate of brush.
- y: The y-coordinate of brush.
- width: The width of brush.
- height: The height of brush.
- data: The data domain of brush, [min, max].
- traveller_width: The width of each traveller.
- gap: The data with gap of refreshing chart. If the option is not set, the chart will be refreshed every time
- start_index: The default start index of brush. If the option is not set, the start index will be 0.
- end_index: The default end index of brush. If the option is not set, the end index will be 1.
+ x: The x-coordinate of brush. Default: 0
+ y: The y-coordinate of brush. Default: 0
+ width: The width of brush. Default: 0
+ height: The height of brush. Default: 40
+ data: The original data of a LineChart, a BarChart or an AreaChart.
+ traveller_width: The width of each traveller. Default: 5
+ gap: The data with gap of refreshing chart. If the option is not set, the chart will be refreshed every time. Default: 1
+ start_index: The default start index of brush. If the option is not set, the start index will be 0. Default: 0
+ end_index: The default end index of brush. If the option is not set, the end index will be calculated by the length of data.
style: The style of the component.
key: A unique key for the component.
id: The id for the component.
@@ -722,47 +736,40 @@ class Cartesian(Recharts):
],
]
] = None,
+ is_animation_active: Optional[Union[Var[bool], bool]] = None,
+ animation_begin: Optional[Union[Var[int], int]] = None,
+ animation_duration: Optional[Union[Var[int], int]] = None,
+ animation_easing: Optional[
+ Union[
+ Literal["ease", "ease-in", "ease-in-out", "ease-out", "linear"],
+ Var[Literal["ease", "ease-in", "ease-in-out", "ease-out", "linear"]],
+ ]
+ ] = None,
+ unit: Optional[Union[Var[Union[int, str]], int, str]] = None,
+ name: Optional[Union[Var[Union[int, str]], int, str]] = None,
style: Optional[Style] = None,
key: Optional[Any] = None,
id: Optional[Any] = None,
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_animation_end: Optional[EventType[[]]] = None,
+ on_animation_start: Optional[EventType[[]]] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Cartesian":
"""Create the component.
@@ -771,9 +778,15 @@ class Cartesian(Recharts):
*children: The children of the component.
layout: The layout of bar in the chart, usually inherited from parent. 'horizontal' | 'vertical'
data_key: The key of a group of data which should be unique in an area chart.
- x_axis_id: The id of x-axis which is corresponding to the data.
- y_axis_id: The id of y-axis which is corresponding to the data.
- legend_type: The type of icon in legend. If set to 'none', no legend item will be rendered. 'line' | 'plainline' | 'square' | 'rect'| 'circle' | 'cross' | 'diamond' | 'star' | 'triangle' | 'wye' | 'none'optional
+ x_axis_id: The id of x-axis which is corresponding to the data. Default: 0
+ y_axis_id: The id of y-axis which is corresponding to the data. Default: 0
+ legend_type: The type of icon in legend. If set to 'none', no legend item will be rendered. 'line' | 'plainline' | 'square' | 'rect'| 'circle' | 'cross' | 'diamond' | 'star' | 'triangle' | 'wye' | 'none' optional
+ is_animation_active: If set false, animation of bar will be disabled. Default: True
+ animation_begin: Specifies when the animation should begin, the unit of this option is ms. Default: 0
+ animation_duration: Specifies the duration of animation, the unit of this option is ms. Default: 1500
+ animation_easing: The type of easing function. Default: "ease"
+ unit: The unit of data. This option will be used in tooltip.
+ name: The name of data. This option will be used in tooltip and legend to represent the component. If no value was set to this option, the value of dataKey will be used alternatively.
style: The style of the component.
key: A unique key for the component.
id: The id for the component.
@@ -843,9 +856,12 @@ class Area(Cartesian):
Union[Dict[str, Any], Var[Union[Dict[str, Any], bool]], bool]
] = None,
label: Optional[Union[Var[bool], bool]] = None,
+ base_line: Optional[
+ Union[List[Dict[str, Any]], Var[Union[List[Dict[str, Any]], str]], str]
+ ] = None,
+ points: Optional[Union[List[Dict[str, Any]], Var[List[Dict[str, Any]]]]] = None,
stack_id: Optional[Union[Var[Union[int, str]], int, str]] = None,
- unit: Optional[Union[Var[Union[int, str]], int, str]] = None,
- name: Optional[Union[Var[Union[int, str]], int, str]] = None,
+ connect_nulls: Optional[Union[Var[bool], bool]] = None,
layout: Optional[
Union[
Literal["horizontal", "vertical"],
@@ -887,68 +903,68 @@ class Area(Cartesian):
],
]
] = None,
+ is_animation_active: Optional[Union[Var[bool], bool]] = None,
+ animation_begin: Optional[Union[Var[int], int]] = None,
+ animation_duration: Optional[Union[Var[int], int]] = None,
+ animation_easing: Optional[
+ Union[
+ Literal["ease", "ease-in", "ease-in-out", "ease-out", "linear"],
+ Var[Literal["ease", "ease-in", "ease-in-out", "ease-out", "linear"]],
+ ]
+ ] = None,
+ unit: Optional[Union[Var[Union[int, str]], int, str]] = None,
+ name: Optional[Union[Var[Union[int, str]], int, str]] = None,
style: Optional[Style] = None,
key: Optional[Any] = None,
id: Optional[Any] = None,
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_animation_end: Optional[EventType[[]]] = None,
+ on_animation_start: Optional[EventType[[]]] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Area":
"""Create the component.
Args:
*children: The children of the component.
- stroke: The color of the line stroke.
- stroke_width: The width of the line stroke.
- fill: The color of the area fill.
- type_: The interpolation type of area. And customized interpolation function can be set to type. 'basis' | 'basisClosed' | 'basisOpen' | 'bumpX' | 'bumpY' | 'bump' | 'linear' | 'linearClosed' | 'natural' | 'monotoneX' | 'monotoneY' | 'monotone' | 'step' | 'stepBefore' | 'stepAfter' |
- dot: If false set, dots will not be drawn. If true set, dots will be drawn which have the props calculated internally.
- active_dot: The dot is shown when user enter an area chart and this chart has tooltip. If false set, no active dot will not be drawn. If true set, active dot will be drawn which have the props calculated internally.
- label: If set false, labels will not be drawn. If set true, labels will be drawn which have the props calculated internally.
+ stroke: The color of the line stroke. Default: rx.color("accent", 9)
+ stroke_width: The width of the line stroke. Default: 1
+ fill: The color of the area fill. Default: rx.color("accent", 5)
+ type_: The interpolation type of area. And customized interpolation function can be set to type. 'basis' | 'basisClosed' | 'basisOpen' | 'bumpX' | 'bumpY' | 'bump' | 'linear' | 'linearClosed' | 'natural' | 'monotoneX' | 'monotoneY' | 'monotone' | 'step' | 'stepBefore' | 'stepAfter'. Default: "monotone"
+ dot: If false set, dots will not be drawn. If true set, dots will be drawn which have the props calculated internally. Default: False
+ active_dot: The dot is shown when user enter an area chart and this chart has tooltip. If false set, no active dot will not be drawn. If true set, active dot will be drawn which have the props calculated internally. Default: {stroke: rx.color("accent", 2), fill: rx.color("accent", 10)}
+ label: If set false, labels will not be drawn. If set true, labels will be drawn which have the props calculated internally. Default: False
+ base_line: The value which can describle the line, usually calculated internally.
+ points: The coordinates of all the points in the area, usually calculated internally.
stack_id: The stack id of area, when two areas have the same value axis and same stack_id, then the two areas are stacked in order.
- unit: The unit of data. This option will be used in tooltip.
- name: The name of data. This option will be used in tooltip and legend to represent a bar. If no value was set to this option, the value of dataKey will be used alternatively.
+ connect_nulls: Whether to connect a graph area across null points. Default: False
layout: The layout of bar in the chart, usually inherited from parent. 'horizontal' | 'vertical'
data_key: The key of a group of data which should be unique in an area chart.
- x_axis_id: The id of x-axis which is corresponding to the data.
- y_axis_id: The id of y-axis which is corresponding to the data.
- legend_type: The type of icon in legend. If set to 'none', no legend item will be rendered. 'line' | 'plainline' | 'square' | 'rect'| 'circle' | 'cross' | 'diamond' | 'star' | 'triangle' | 'wye' | 'none'optional
+ x_axis_id: The id of x-axis which is corresponding to the data. Default: 0
+ y_axis_id: The id of y-axis which is corresponding to the data. Default: 0
+ legend_type: The type of icon in legend. If set to 'none', no legend item will be rendered. 'line' | 'plainline' | 'square' | 'rect'| 'circle' | 'cross' | 'diamond' | 'star' | 'triangle' | 'wye' | 'none' optional
+ is_animation_active: If set false, animation of bar will be disabled. Default: True
+ animation_begin: Specifies when the animation should begin, the unit of this option is ms. Default: 0
+ animation_duration: Specifies the duration of animation, the unit of this option is ms. Default: 1500
+ animation_easing: The type of easing function. Default: "ease"
+ unit: The unit of data. This option will be used in tooltip.
+ name: The name of data. This option will be used in tooltip and legend to represent the component. If no value was set to this option, the value of dataKey will be used alternatively.
style: The style of the component.
key: A unique key for the component.
id: The id for the component.
@@ -979,15 +995,7 @@ class Bar(Cartesian):
name: Optional[Union[Var[Union[int, str]], int, str]] = None,
bar_size: Optional[Union[Var[int], int]] = None,
max_bar_size: Optional[Union[Var[int], int]] = None,
- is_animation_active: Optional[Union[Var[bool], bool]] = None,
- animation_begin: Optional[Union[Var[int], int]] = None,
- animation_duration: Optional[Union[Var[int], int]] = None,
- animation_easing: Optional[
- Union[
- Literal["ease", "ease-in", "ease-in-out", "ease-out", "linear"],
- Var[Literal["ease", "ease-in", "ease-in-out", "ease-out", "linear"]],
- ]
- ] = None,
+ radius: Optional[Union[List[int], Var[Union[List[int], int]], int]] = None,
layout: Optional[
Union[
Literal["horizontal", "vertical"],
@@ -1029,53 +1037,38 @@ class Bar(Cartesian):
],
]
] = None,
+ is_animation_active: Optional[Union[Var[bool], bool]] = None,
+ animation_begin: Optional[Union[Var[int], int]] = None,
+ animation_duration: Optional[Union[Var[int], int]] = None,
+ animation_easing: Optional[
+ Union[
+ Literal["ease", "ease-in", "ease-in-out", "ease-out", "linear"],
+ Var[Literal["ease", "ease-in", "ease-in-out", "ease-out", "linear"]],
+ ]
+ ] = None,
style: Optional[Style] = None,
key: Optional[Any] = None,
id: Optional[Any] = None,
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_animation_end: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_animation_start: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_animation_end: Optional[EventType[[]]] = None,
+ on_animation_start: Optional[EventType[[]]] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Bar":
"""Create the component.
@@ -1084,24 +1077,25 @@ class Bar(Cartesian):
*children: The children of the component.
stroke: The color of the line stroke.
stroke_width: The width of the line stroke.
- fill: The width of the line stroke.
- background: If false set, background of bars will not be drawn. If true set, background of bars will be drawn which have the props calculated internally.
- label: If false set, labels will not be drawn. If true set, labels will be drawn which have the props calculated internally.
+ fill: The width of the line stroke. Default: Color("accent", 9)
+ background: If false set, background of bars will not be drawn. If true set, background of bars will be drawn which have the props calculated internally. Default: False
+ label: If false set, labels will not be drawn. If true set, labels will be drawn which have the props calculated internally. Default: False
stack_id: The stack id of bar, when two bars have the same value axis and same stack_id, then the two bars are stacked in order.
unit: The unit of data. This option will be used in tooltip.
min_point_size: The minimal height of a bar in a horizontal BarChart, or the minimal width of a bar in a vertical BarChart. By default, 0 values are not shown. To visualize a 0 (or close to zero) point, set the minimal point size to a pixel value like 3. In stacked bar charts, minPointSize might not be respected for tightly packed values. So we strongly recommend not using this prop in stacked BarCharts.
- name: The name of data. This option will be used in tooltip and legend to represent a bar. If no value was set to this option, the value of dataKey will be used alternatively.
+ name: The name of data. This option will be used in tooltip and legend to represent the component. If no value was set to this option, the value of dataKey will be used alternatively.
bar_size: Size of the bar (if one bar_size is set then a bar_size must be set for all bars)
max_bar_size: Max size of the bar
- is_animation_active: If set false, animation of bar will be disabled.
- animation_begin: Specifies when the animation should begin, the unit of this option is ms, default 0.
- animation_duration: Specifies the duration of animation, the unit of this option is ms, default 1500.
- animation_easing: The type of easing function, default 'ease'
+ radius: If set a value, the option is the radius of all the rounded corners. If set a array, the option are in turn the radiuses of top-left corner, top-right corner, bottom-right corner, bottom-left corner. Default: 0
layout: The layout of bar in the chart, usually inherited from parent. 'horizontal' | 'vertical'
data_key: The key of a group of data which should be unique in an area chart.
- x_axis_id: The id of x-axis which is corresponding to the data.
- y_axis_id: The id of y-axis which is corresponding to the data.
- legend_type: The type of icon in legend. If set to 'none', no legend item will be rendered. 'line' | 'plainline' | 'square' | 'rect'| 'circle' | 'cross' | 'diamond' | 'star' | 'triangle' | 'wye' | 'none'optional
+ x_axis_id: The id of x-axis which is corresponding to the data. Default: 0
+ y_axis_id: The id of y-axis which is corresponding to the data. Default: 0
+ legend_type: The type of icon in legend. If set to 'none', no legend item will be rendered. 'line' | 'plainline' | 'square' | 'rect'| 'circle' | 'cross' | 'diamond' | 'star' | 'triangle' | 'wye' | 'none' optional
+ is_animation_active: If set false, animation of bar will be disabled. Default: True
+ animation_begin: Specifies when the animation should begin, the unit of this option is ms. Default: 0
+ animation_duration: Specifies the duration of animation, the unit of this option is ms. Default: 1500
+ animation_easing: The type of easing function. Default: "ease"
style: The style of the component.
key: A unique key for the component.
id: The id for the component.
@@ -1173,7 +1167,8 @@ class Line(Cartesian):
hide: Optional[Union[Var[bool], bool]] = None,
connect_nulls: Optional[Union[Var[bool], bool]] = None,
unit: Optional[Union[Var[Union[int, str]], int, str]] = None,
- name: Optional[Union[Var[Union[int, str]], int, str]] = None,
+ points: Optional[Union[List[Dict[str, Any]], Var[List[Dict[str, Any]]]]] = None,
+ stroke_dasharray: Optional[Union[Var[str], str]] = None,
layout: Optional[
Union[
Literal["horizontal", "vertical"],
@@ -1215,47 +1210,39 @@ class Line(Cartesian):
],
]
] = None,
+ is_animation_active: Optional[Union[Var[bool], bool]] = None,
+ animation_begin: Optional[Union[Var[int], int]] = None,
+ animation_duration: Optional[Union[Var[int], int]] = None,
+ animation_easing: Optional[
+ Union[
+ Literal["ease", "ease-in", "ease-in-out", "ease-out", "linear"],
+ Var[Literal["ease", "ease-in", "ease-in-out", "ease-out", "linear"]],
+ ]
+ ] = None,
+ name: Optional[Union[Var[Union[int, str]], int, str]] = None,
style: Optional[Style] = None,
key: Optional[Any] = None,
id: Optional[Any] = None,
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_animation_end: Optional[EventType[[]]] = None,
+ on_animation_start: Optional[EventType[[]]] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Line":
"""Create the component.
@@ -1263,20 +1250,26 @@ class Line(Cartesian):
Args:
*children: The children of the component.
type_: The interpolation type of line. And customized interpolation function can be set to type. It's the same as type in Area.
- stroke: The color of the line stroke.
- stroke_width: The width of the line stroke.
- dot: The dot is shown when mouse enter a line chart and this chart has tooltip. If false set, no active dot will not be drawn. If true set, active dot will be drawn which have the props calculated internally.
- active_dot: The dot is shown when user enter an area chart and this chart has tooltip. If false set, no active dot will not be drawn. If true set, active dot will be drawn which have the props calculated internally.
- label: If false set, labels will not be drawn. If true set, labels will be drawn which have the props calculated internally.
- hide: Hides the line when true, useful when toggling visibility state via legend.
+ stroke: The color of the line stroke. Default: rx.color("accent", 9)
+ stroke_width: The width of the line stroke. Default: 1
+ dot: The dot is shown when mouse enter a line chart and this chart has tooltip. If false set, no active dot will not be drawn. If true set, active dot will be drawn which have the props calculated internally. Default: {"stroke": rx.color("accent", 10), "fill": rx.color("accent", 4)}
+ active_dot: The dot is shown when user enter an area chart and this chart has tooltip. If false set, no active dot will not be drawn. If true set, active dot will be drawn which have the props calculated internally. Default: {"stroke": rx.color("accent", 2), "fill": rx.color("accent", 10)}
+ label: If false set, labels will not be drawn. If true set, labels will be drawn which have the props calculated internally. Default: False
+ hide: Hides the line when true, useful when toggling visibility state via legend. Default: False
connect_nulls: Whether to connect a graph line across null points.
unit: The unit of data. This option will be used in tooltip.
- name: The name of data displayed in the axis. This option will be used to represent an index in a scatter chart.
+ points: The coordinates of all the points in the line, usually calculated internally.
+ stroke_dasharray: The pattern of dashes and gaps used to paint the line.
layout: The layout of bar in the chart, usually inherited from parent. 'horizontal' | 'vertical'
data_key: The key of a group of data which should be unique in an area chart.
- x_axis_id: The id of x-axis which is corresponding to the data.
- y_axis_id: The id of y-axis which is corresponding to the data.
- legend_type: The type of icon in legend. If set to 'none', no legend item will be rendered. 'line' | 'plainline' | 'square' | 'rect'| 'circle' | 'cross' | 'diamond' | 'star' | 'triangle' | 'wye' | 'none'optional
+ x_axis_id: The id of x-axis which is corresponding to the data. Default: 0
+ y_axis_id: The id of y-axis which is corresponding to the data. Default: 0
+ legend_type: The type of icon in legend. If set to 'none', no legend item will be rendered. 'line' | 'plainline' | 'square' | 'rect'| 'circle' | 'cross' | 'diamond' | 'star' | 'triangle' | 'wye' | 'none' optional
+ is_animation_active: If set false, animation of bar will be disabled. Default: True
+ animation_begin: Specifies when the animation should begin, the unit of this option is ms. Default: 0
+ animation_duration: Specifies the duration of animation, the unit of this option is ms. Default: 1500
+ animation_easing: The type of easing function. Default: "ease"
+ name: The name of data. This option will be used in tooltip and legend to represent the component. If no value was set to this option, the value of dataKey will be used alternatively.
style: The style of the component.
key: A unique key for the component.
id: The id for the component.
@@ -1331,7 +1324,7 @@ class Scatter(Recharts):
] = None,
x_axis_id: Optional[Union[Var[Union[int, str]], int, str]] = None,
y_axis_id: Optional[Union[Var[Union[int, str]], int, str]] = None,
- z_axis_id: Optional[Union[Var[str], str]] = None,
+ z_axis_id: Optional[Union[Var[Union[int, str]], int, str]] = None,
line: Optional[Union[Var[bool], bool]] = None,
shape: Optional[
Union[
@@ -1355,7 +1348,6 @@ class Scatter(Recharts):
Union[Literal["fitting", "joint"], Var[Literal["fitting", "joint"]]]
] = None,
fill: Optional[Union[Color, Var[Union[Color, str]], str]] = None,
- name: Optional[Union[Var[Union[int, str]], int, str]] = None,
is_animation_active: Optional[Union[Var[bool], bool]] = None,
animation_begin: Optional[Union[Var[int], int]] = None,
animation_duration: Optional[Union[Var[int], int]] = None,
@@ -1371,41 +1363,21 @@ class Scatter(Recharts):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Scatter":
"""Create the component.
@@ -1413,19 +1385,18 @@ class Scatter(Recharts):
Args:
*children: The children of the component.
data: The source data, in which each element is an object.
- legend_type: The type of icon in legend. If set to 'none', no legend item will be rendered. 'line' | 'plainline' | 'square' | 'rect'| 'circle' | 'cross' | 'diamond' | 'square' | 'star' | 'triangle' | 'wye' | 'none'
- x_axis_id: The id of x-axis which is corresponding to the data.
- y_axis_id: The id of y-axis which is corresponding to the data.
- z_axis_id: The id of z-axis which is corresponding to the data.
- line: If false set, line will not be drawn. If true set, line will be drawn which have the props calculated internally.
- shape: If a string set, specified symbol will be used to show scatter item. 'circle' | 'cross' | 'diamond' | 'square' | 'star' | 'triangle' | 'wye'
- line_type: If 'joint' set, line will generated by just jointing all the points. If 'fitting' set, line will be generated by fitting algorithm. 'joint' | 'fitting'
- fill: The fill
- name: the name
- is_animation_active: If set false, animation of bar will be disabled.
- animation_begin: Specifies when the animation should begin, the unit of this option is ms, default 0.
- animation_duration: Specifies the duration of animation, the unit of this option is ms, default 1500.
- animation_easing: The type of easing function, default 'ease'
+ legend_type: The type of icon in legend. If set to 'none', no legend item will be rendered. 'line' | 'plainline' | 'square' | 'rect'| 'circle' | 'cross' | 'diamond' | 'square' | 'star' | 'triangle' | 'wye' | 'none'. Default: "circle"
+ x_axis_id: The id of x-axis which is corresponding to the data. Default: 0
+ y_axis_id: The id of y-axis which is corresponding to the data. Default: 0
+ z_axis_id: The id of z-axis which is corresponding to the data. Default: 0
+ line: If false set, line will not be drawn. If true set, line will be drawn which have the props calculated internally. Default: False
+ shape: If a string set, specified symbol will be used to show scatter item. 'circle' | 'cross' | 'diamond' | 'square' | 'star' | 'triangle' | 'wye'. Default: "circle"
+ line_type: If 'joint' set, line will generated by just jointing all the points. If 'fitting' set, line will be generated by fitting algorithm. 'joint' | 'fitting'. Default: "joint"
+ fill: The fill color of the scatter. Default: rx.color("accent", 9)
+ is_animation_active: If set false, animation of bar will be disabled. Default: True in CSR, False in SSR
+ animation_begin: Specifies when the animation should begin, the unit of this option is ms. Default: 0
+ animation_duration: Specifies the duration of animation, the unit of this option is ms. Default: 1500
+ animation_easing: The type of easing function. Default: "ease"
style: The style of the component.
key: A unique key for the component.
id: The id for the component.
@@ -1490,53 +1461,32 @@ class Funnel(Recharts):
]
] = None,
stroke: Optional[Union[Color, Var[Union[Color, str]], str]] = None,
+ trapezoids: Optional[
+ Union[List[Dict[str, Any]], Var[List[Dict[str, Any]]]]
+ ] = None,
style: Optional[Style] = None,
key: Optional[Any] = None,
id: Optional[Any] = None,
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_animation_end: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_animation_start: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_animation_end: Optional[EventType[[]]] = None,
+ on_animation_start: Optional[EventType[[]]] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Funnel":
"""Create the component.
@@ -1544,14 +1494,15 @@ class Funnel(Recharts):
Args:
*children: The children of the component.
data: The source data, in which each element is an object.
- data_key: The key of a group of data which should be unique in an area chart.
- name_key: The key or getter of a group of data which should be unique in a LineChart.
- legend_type: The type of icon in legend. If set to 'none', no legend item will be rendered.
- is_animation_active: If set false, animation of line will be disabled.
- animation_begin: Specifies when the animation should begin, the unit of this option is ms.
- animation_duration: Specifies the duration of animation, the unit of this option is ms.
- animation_easing: The type of easing function. 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'linear'
- stroke: stroke color
+ data_key: The key or getter of a group of data which should be unique in a FunnelChart.
+ name_key: The key of each sector's name. Default: "name"
+ legend_type: The type of icon in legend. If set to 'none', no legend item will be rendered. Default: "line"
+ is_animation_active: If set false, animation of line will be disabled. Default: True
+ animation_begin: Specifies when the animation should begin, the unit of this option is ms. Default: 0
+ animation_duration: Specifies the duration of animation, the unit of this option is ms. Default: 1500
+ animation_easing: The type of easing function. 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'linear'. Default "ease"
+ stroke: Stroke color. Default: rx.color("gray", 3)
+ trapezoids: The coordinates of all the trapezoids in the funnel, usually calculated internally.
style: The style of the component.
key: A unique key for the component.
id: The id for the component.
@@ -1571,65 +1522,43 @@ class ErrorBar(Recharts):
def create( # type: ignore
cls,
*children,
- direction: Optional[
- Union[Literal["both", "x", "y"], Var[Literal["both", "x", "y"]]]
- ] = None,
+ direction: Optional[Union[Literal["x", "y"], Var[Literal["x", "y"]]]] = None,
data_key: Optional[Union[Var[Union[int, str]], int, str]] = None,
width: Optional[Union[Var[int], int]] = None,
stroke: Optional[Union[Color, Var[Union[Color, str]], str]] = None,
- stroke_width: Optional[Union[Var[int], int]] = None,
+ stroke_width: Optional[Union[Var[Union[float, int]], float, int]] = None,
style: Optional[Style] = None,
key: Optional[Any] = None,
id: Optional[Any] = None,
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "ErrorBar":
"""Create the component.
Args:
*children: The children of the component.
- direction: The direction of error bar. 'x' | 'y' | 'both'
+ direction: Only used for ScatterChart with error bars in two directions. Only accepts a value of "x" or "y" and makes the error bars lie in that direction.
data_key: The key of a group of data which should be unique in an area chart.
- width: The width of the error bar ends.
- stroke: The stroke color of error bar.
- stroke_width: The stroke width of error bar.
+ width: The width of the error bar ends. Default: 5
+ stroke: The stroke color of error bar. Default: rx.color("gray", 8)
+ stroke_width: The stroke width of error bar. Default: 1.5
style: The style of the component.
key: A unique key for the component.
id: The id for the component.
@@ -1665,52 +1594,32 @@ class Reference(Recharts):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Reference":
"""Create the component.
Args:
*children: The children of the component.
- x_axis_id: The id of x-axis which is corresponding to the data.
- y_axis_id: The id of y-axis which is corresponding to the data.
- if_overflow: Defines how to draw the reference line if it falls partly outside the canvas. If set to 'discard', the reference line will not be drawn at all. If set to 'hidden', the reference line will be clipped to the canvas. If set to 'visible', the reference line will be drawn completely. If set to 'extendDomain', the domain of the overflown axis will be extended such that the reference line fits into the canvas.
+ x_axis_id: The id of x-axis which is corresponding to the data. Default: 0
+ y_axis_id: The id of y-axis which is corresponding to the data. Default: 0
+ if_overflow: Defines how to draw the reference line if it falls partly outside the canvas. If set to 'discard', the reference line will not be drawn at all. If set to 'hidden', the reference line will be clipped to the canvas. If set to 'visible', the reference line will be drawn completely. If set to 'extendDomain', the domain of the overflown axis will be extended such that the reference line fits into the canvas. Default: "discard"
label: If set a string or a number, default label will be drawn, and the option is content.
- is_front: If set true, the line will be rendered in front of bars in BarChart, etc.
+ is_front: If set true, the line will be rendered in front of bars in BarChart, etc. Default: False
style: The style of the component.
key: A unique key for the component.
id: The id for the component.
@@ -1751,41 +1660,21 @@ class ReferenceLine(Reference):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "ReferenceLine":
"""Create the component.
@@ -1795,13 +1684,13 @@ class ReferenceLine(Reference):
x: If set a string or a number, a vertical line perpendicular to the x-axis specified by xAxisId will be drawn. If the specified x-axis is a number axis, the type of x must be Number. If the specified x-axis is a category axis, the value of x must be one of the categorys, otherwise no line will be drawn.
y: If set a string or a number, a horizontal line perpendicular to the y-axis specified by yAxisId will be drawn. If the specified y-axis is a number axis, the type of y must be Number. If the specified y-axis is a category axis, the value of y must be one of the categorys, otherwise no line will be drawn.
stroke: The color of the reference line.
- stroke_width: The width of the stroke.
+ stroke_width: The width of the stroke. Default: 1
segment: Array of endpoints in { x, y } format. These endpoints would be used to draw the ReferenceLine.
- x_axis_id: The id of x-axis which is corresponding to the data.
- y_axis_id: The id of y-axis which is corresponding to the data.
- if_overflow: Defines how to draw the reference line if it falls partly outside the canvas. If set to 'discard', the reference line will not be drawn at all. If set to 'hidden', the reference line will be clipped to the canvas. If set to 'visible', the reference line will be drawn completely. If set to 'extendDomain', the domain of the overflown axis will be extended such that the reference line fits into the canvas.
+ x_axis_id: The id of x-axis which is corresponding to the data. Default: 0
+ y_axis_id: The id of y-axis which is corresponding to the data. Default: 0
+ if_overflow: Defines how to draw the reference line if it falls partly outside the canvas. If set to 'discard', the reference line will not be drawn at all. If set to 'hidden', the reference line will be clipped to the canvas. If set to 'visible', the reference line will be drawn completely. If set to 'extendDomain', the domain of the overflown axis will be extended such that the reference line fits into the canvas. Default: "discard"
label: If set a string or a number, default label will be drawn, and the option is content.
- is_front: If set true, the line will be rendered in front of bars in BarChart, etc.
+ is_front: If set true, the line will be rendered in front of bars in BarChart, etc. Default: False
style: The style of the component.
key: A unique key for the component.
id: The id for the component.
@@ -1842,41 +1731,21 @@ class ReferenceDot(Reference):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "ReferenceDot":
"""Create the component.
@@ -1888,11 +1757,11 @@ class ReferenceDot(Reference):
r: The radius of dot.
fill: The color of the area fill.
stroke: The color of the line stroke.
- x_axis_id: The id of x-axis which is corresponding to the data.
- y_axis_id: The id of y-axis which is corresponding to the data.
- if_overflow: Defines how to draw the reference line if it falls partly outside the canvas. If set to 'discard', the reference line will not be drawn at all. If set to 'hidden', the reference line will be clipped to the canvas. If set to 'visible', the reference line will be drawn completely. If set to 'extendDomain', the domain of the overflown axis will be extended such that the reference line fits into the canvas.
+ x_axis_id: The id of x-axis which is corresponding to the data. Default: 0
+ y_axis_id: The id of y-axis which is corresponding to the data. Default: 0
+ if_overflow: Defines how to draw the reference line if it falls partly outside the canvas. If set to 'discard', the reference line will not be drawn at all. If set to 'hidden', the reference line will be clipped to the canvas. If set to 'visible', the reference line will be drawn completely. If set to 'extendDomain', the domain of the overflown axis will be extended such that the reference line fits into the canvas. Default: "discard"
label: If set a string or a number, default label will be drawn, and the option is content.
- is_front: If set true, the line will be rendered in front of bars in BarChart, etc.
+ is_front: If set true, the line will be rendered in front of bars in BarChart, etc. Default: False
style: The style of the component.
key: A unique key for the component.
id: The id for the component.
@@ -1934,41 +1803,21 @@ class ReferenceArea(Recharts):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "ReferenceArea":
"""Create the component.
@@ -1984,8 +1833,8 @@ class ReferenceArea(Recharts):
x2: A boundary value of the area. If the specified x-axis is a number axis, the type of x must be Number. If the specified x-axis is a category axis, the value of x must be one of the categorys. If one of x1 or x2 is invalidate, the area will cover along x-axis.
y1: A boundary value of the area. If the specified y-axis is a number axis, the type of y must be Number. If the specified y-axis is a category axis, the value of y must be one of the categorys. If one of y1 or y2 is invalidate, the area will cover along y-axis.
y2: A boundary value of the area. If the specified y-axis is a number axis, the type of y must be Number. If the specified y-axis is a category axis, the value of y must be one of the categorys. If one of y1 or y2 is invalidate, the area will cover along y-axis.
- if_overflow: Defines how to draw the reference line if it falls partly outside the canvas. If set to 'discard', the reference line will not be drawn at all. If set to 'hidden', the reference line will be clipped to the canvas. If set to 'visible', the reference line will be drawn completely. If set to 'extendDomain', the domain of the overflown axis will be extended such that the reference line fits into the canvas.
- is_front: If set true, the line will be rendered in front of bars in BarChart, etc.
+ if_overflow: Defines how to draw the reference line if it falls partly outside the canvas. If set to 'discard', the reference line will not be drawn at all. If set to 'hidden', the reference line will be clipped to the canvas. If set to 'visible', the reference line will be drawn completely. If set to 'extendDomain', the domain of the overflown axis will be extended such that the reference line fits into the canvas. Default: "discard"
+ is_front: If set true, the line will be rendered in front of bars in BarChart, etc. Default: False
style: The style of the component.
key: A unique key for the component.
id: The id for the component.
@@ -2015,51 +1864,31 @@ class Grid(Recharts):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Grid":
"""Create the component.
Args:
*children: The children of the component.
- x: The x-coordinate of grid.
- y: The y-coordinate of grid.
- width: The width of grid.
- height: The height of grid.
+ x: The x-coordinate of grid. Default: 0
+ y: The y-coordinate of grid. Default: 0
+ width: The width of grid. Default: 0
+ height: The height of grid. Default: 0
style: The style of the component.
key: A unique key for the component.
id: The id for the component.
@@ -2101,59 +1930,39 @@ class CartesianGrid(Grid):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "CartesianGrid":
"""Create the component.
Args:
*children: The children of the component.
- horizontal: The horizontal line configuration.
- vertical: The vertical line configuration.
- vertical_points: The x-coordinates in pixel values of all vertical lines.
- horizontal_points: The x-coordinates in pixel values of all vertical lines.
+ horizontal: The horizontal line configuration. Default: True
+ vertical: The vertical line configuration. Default: True
+ vertical_points: The x-coordinates in pixel values of all vertical lines. Default: []
+ horizontal_points: The x-coordinates in pixel values of all vertical lines. Default: []
fill: The background of grid.
- fill_opacity: The opacity of the background used to fill the space between grid lines
- stroke_dasharray: The pattern of dashes and gaps used to paint the lines of the grid
- stroke: the stroke color of grid
- x: The x-coordinate of grid.
- y: The y-coordinate of grid.
- width: The width of grid.
- height: The height of grid.
+ fill_opacity: The opacity of the background used to fill the space between grid lines.
+ stroke_dasharray: The pattern of dashes and gaps used to paint the lines of the grid.
+ stroke: the stroke color of grid. Default: rx.color("gray", 7)
+ x: The x-coordinate of grid. Default: 0
+ y: The y-coordinate of grid. Default: 0
+ width: The width of grid. Default: 0
+ height: The height of grid. Default: 0
style: The style of the component.
key: A unique key for the component.
id: The id for the component.
@@ -2179,7 +1988,9 @@ class CartesianAxis(Grid):
Var[Literal["bottom", "left", "right", "top"]],
]
] = None,
+ view_box: Optional[Union[Dict[str, Any], Var[Dict[str, Any]]]] = None,
axis_line: Optional[Union[Var[bool], bool]] = None,
+ tick: Optional[Union[Var[bool], bool]] = None,
tick_line: Optional[Union[Var[bool], bool]] = None,
tick_size: Optional[Union[Var[int], int]] = None,
interval: Optional[
@@ -2188,8 +1999,7 @@ class CartesianAxis(Grid):
Var[Literal["preserveEnd", "preserveStart", "preserveStartEnd"]],
]
] = None,
- ticks: Optional[Union[Var[bool], bool]] = None,
- label: Optional[Union[Var[str], str]] = None,
+ label: Optional[Union[Var[Union[int, str]], int, str]] = None,
mirror: Optional[Union[Var[bool], bool]] = None,
tick_margin: Optional[Union[Var[int], int]] = None,
x: Optional[Union[Var[int], int]] = None,
@@ -2202,60 +2012,41 @@ class CartesianAxis(Grid):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "CartesianAxis":
"""Create the component.
Args:
*children: The children of the component.
- orientation: The orientation of axis 'top' | 'bottom' | 'left' | 'right'
- axis_line: If set false, no axis line will be drawn. If set a object, the option is the configuration of axis line.
- tick_line: If set false, no axis tick lines will be drawn. If set a object, the option is the configuration of tick lines.
- tick_size: The length of tick line.
- interval: If set 0, all the ticks will be shown. If set preserveStart", "preserveEnd" or "preserveStartEnd", the ticks which is to be shown or hidden will be calculated automatically.
- ticks: If set false, no ticks will be drawn.
+ orientation: The orientation of axis 'top' | 'bottom' | 'left' | 'right'. Default: "bottom"
+ view_box: The box of viewing area. Default: {"x": 0, "y": 0, "width": 0, "height": 0}
+ axis_line: If set false, no axis line will be drawn. If set a object, the option is the configuration of axis line. Default: True
+ tick: If set false, no ticks will be drawn.
+ tick_line: If set false, no axis tick lines will be drawn. If set a object, the option is the configuration of tick lines. Default: True
+ tick_size: The length of tick line. Default: 6
+ interval: If set 0, all the ticks will be shown. If set preserveStart", "preserveEnd" or "preserveStartEnd", the ticks which is to be shown or hidden will be calculated automatically. Default: "preserveEnd"
label: If set a string or a number, default label will be drawn, and the option is content.
- mirror: If set true, flips ticks around the axis line, displaying the labels inside the chart instead of outside.
+ mirror: If set true, flips ticks around the axis line, displaying the labels inside the chart instead of outside. Default: False
tick_margin: The margin between tick line and tick.
- x: The x-coordinate of grid.
- y: The y-coordinate of grid.
- width: The width of grid.
- height: The height of grid.
+ x: The x-coordinate of grid. Default: 0
+ y: The y-coordinate of grid. Default: 0
+ width: The width of grid. Default: 0
+ height: The height of grid. Default: 0
style: The style of the component.
key: A unique key for the component.
id: The id for the component.
diff --git a/reflex/components/recharts/charts.py b/reflex/components/recharts/charts.py
index 6f79a70ae..d7e07b2d8 100644
--- a/reflex/components/recharts/charts.py
+++ b/reflex/components/recharts/charts.py
@@ -8,8 +8,8 @@ from reflex.components.component import Component
from reflex.components.recharts.general import ResponsiveContainer
from reflex.constants import EventTriggers
from reflex.constants.colors import Color
-from reflex.event import EventHandler
-from reflex.vars.base import LiteralVar, Var
+from reflex.event import EventHandler, empty_event
+from reflex.vars.base import Var
from .recharts import (
LiteralAnimationEasing,
@@ -31,16 +31,16 @@ class ChartBase(RechartsCharts):
height: Var[Union[str, int]] = "100%" # type: ignore
# The customized event handler of click on the component in this chart
- on_click: EventHandler[lambda: []]
+ on_click: EventHandler[empty_event]
# The customized event handler of mouseenter on the component in this chart
- on_mouse_enter: EventHandler[lambda: []]
+ on_mouse_enter: EventHandler[empty_event]
# The customized event handler of mousemove on the component in this chart
- on_mouse_move: EventHandler[lambda: []]
+ on_mouse_move: EventHandler[empty_event]
# The customized event handler of mouseleave on the component in this chart
- on_mouse_leave: EventHandler[lambda: []]
+ on_mouse_leave: EventHandler[empty_event]
@staticmethod
def _ensure_valid_dimension(name: str, value: Any) -> None:
@@ -112,10 +112,10 @@ class CategoricalChartBase(ChartBase):
# If any two categorical charts(rx.line_chart, rx.area_chart, rx.bar_chart, rx.composed_chart) have the same sync_id, these two charts can sync the position GraphingTooltip, and the start_index, end_index of Brush.
sync_id: Var[str]
- # When sync_id is provided, allows customisation of how the charts will synchronize GraphingTooltips and brushes. Using 'index' (default setting), other charts will reuse current datum's index within the data array. In cases where data does not have the same length, this might yield unexpected results. In that case use 'value' which will try to match other charts values, or a fully custom function which will receive tick, data as argument and should return an index. 'index' | 'value' | function
+ # When sync_id is provided, allows customisation of how the charts will synchronize GraphingTooltips and brushes. Using 'index' (default setting), other charts will reuse current datum's index within the data array. In cases where data does not have the same length, this might yield unexpected results. In that case use 'value' which will try to match other charts values, or a fully custom function which will receive tick, data as argument and should return an index. 'index' | 'value' | function. Default: "index"
sync_method: Var[LiteralSyncMethod]
- # The layout of area in the chart. 'horizontal' | 'vertical'
+ # The layout of area in the chart. 'horizontal' | 'vertical'. Default: "horizontal"
layout: Var[LiteralLayout]
# The type of offset function used to generate the lower and upper values in the series array. The four types are built-in offsets in d3-shape. 'expand' | 'none' | 'wiggle' | 'silhouette'
@@ -129,7 +129,7 @@ class AreaChart(CategoricalChartBase):
alias = "RechartsAreaChart"
- # The base value of area. Number | 'dataMin' | 'dataMax' | 'auto'
+ # The base value of area. Number | 'dataMin' | 'dataMax' | 'auto'. Default: "auto"
base_value: Var[Union[int, LiteralComposedChartBaseValue]]
# Valid children components
@@ -155,11 +155,11 @@ class BarChart(CategoricalChartBase):
alias = "RechartsBarChart"
- # The gap between two bar categories, which can be a percent value or a fixed value. Percentage | Number
- bar_category_gap: Var[Union[str, int]] = LiteralVar.create("10%")
+ # The gap between two bar categories, which can be a percent value or a fixed value. Percentage | Number. Default: "10%"
+ bar_category_gap: Var[Union[str, int]]
- # The gap between two bars in the same category, which can be a percent value or a fixed value. Percentage | Number
- bar_gap: Var[Union[str, int]] = LiteralVar.create(4) # type: ignore
+ # The gap between two bars in the same category, which can be a percent value or a fixed value. Percentage | Number. Default: 4
+ bar_gap: Var[Union[str, int]]
# The width of all the bars in the chart. Number
bar_size: Var[int]
@@ -167,10 +167,10 @@ class BarChart(CategoricalChartBase):
# The maximum width of all the bars in a horizontal BarChart, or maximum height in a vertical BarChart.
max_bar_size: Var[int]
- # The type of offset function used to generate the lower and upper values in the series array. The four types are built-in offsets in d3-shape.
+ # The type of offset function used to generate the lower and upper values in the series array. The four types are built-in offsets in d3-shape. Default: "none"
stack_offset: Var[LiteralStackOffset]
- # If false set, stacked items will be rendered left to right. If true set, stacked items will be rendered right to left. (Render direction affects SVG layering, not x position.)
+ # If false set, stacked items will be rendered left to right. If true set, stacked items will be rendered right to left. (Render direction affects SVG layering, not x position.) Default: False
reverse_stack_order: Var[bool]
# Valid children components
@@ -217,19 +217,19 @@ class ComposedChart(CategoricalChartBase):
alias = "RechartsComposedChart"
- # The base value of area. Number | 'dataMin' | 'dataMax' | 'auto'
+ # The base value of area. Number | 'dataMin' | 'dataMax' | 'auto'. Default: "auto"
base_value: Var[Union[int, LiteralComposedChartBaseValue]]
- # The gap between two bar categories, which can be a percent value or a fixed value. Percentage | Number
- bar_category_gap: Var[Union[str, int]] # type: ignore
+ # The gap between two bar categories, which can be a percent value or a fixed value. Percentage | Number. Default: "10%"
+ bar_category_gap: Var[Union[str, int]]
- # The gap between two bars in the same category, which can be a percent value or a fixed value. Percentage | Number
- bar_gap: Var[Union[str, int]] # type: ignore
+ # The gap between two bars in the same category. Default: 4
+ bar_gap: Var[int]
- # The width of all the bars in the chart. Number
+ # The width or height of each bar. If the barSize is not specified, the size of the bar will be calculated by the barCategoryGap, barGap and the quantity of bar groups.
bar_size: Var[int]
- # If false set, stacked items will be rendered left to right. If true set, stacked items will be rendered right to left. (Render direction affects SVG layering, not x position.)
+ # If false set, stacked items will be rendered left to right. If true set, stacked items will be rendered right to left. (Render direction affects SVG layering, not x position). Default: False
reverse_stack_order: Var[bool]
# Valid children components
@@ -270,16 +270,16 @@ class PieChart(ChartBase):
]
# The customized event handler of mousedown on the sectors in this group
- on_mouse_down: EventHandler[lambda: []]
+ on_mouse_down: EventHandler[empty_event]
# The customized event handler of mouseup on the sectors in this group
- on_mouse_up: EventHandler[lambda: []]
+ on_mouse_up: EventHandler[empty_event]
# The customized event handler of mouseover on the sectors in this group
- on_mouse_over: EventHandler[lambda: []]
+ on_mouse_over: EventHandler[empty_event]
# The customized event handler of mouseout on the sectors in this group
- on_mouse_out: EventHandler[lambda: []]
+ on_mouse_out: EventHandler[empty_event]
class RadarChart(ChartBase):
@@ -292,25 +292,25 @@ class RadarChart(ChartBase):
# The source data, in which each element is an object.
data: Var[List[Dict[str, Any]]]
- # The sizes of whitespace around the chart, i.e. {"top": 50, "right": 30, "left": 20, "bottom": 5}.
+ # The sizes of whitespace around the chart, i.e. {"top": 50, "right": 30, "left": 20, "bottom": 5}. Default: {"top": 0, "right": 0, "left": 0, "bottom": 0}
margin: Var[Dict[str, Any]]
- # The The x-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of width. Number | Percentage
+ # The The x-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of width. Number | Percentage. Default: "50%"
cx: Var[Union[int, str]]
- # The The y-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of height. Number | Percentage
+ # The The y-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of height. Number | Percentage. Default: "50%"
cy: Var[Union[int, str]]
- # The angle of first radial direction line.
+ # The angle of first radial direction line. Default: 90
start_angle: Var[int]
- # The angle of last point in the circle which should be startAngle - 360 or startAngle + 360. We'll calculate the direction of chart by 'startAngle' and 'endAngle'.
+ # The angle of last point in the circle which should be startAngle - 360 or startAngle + 360. We'll calculate the direction of chart by 'startAngle' and 'endAngle'. Default: -270
end_angle: Var[int]
- # The inner radius of first circle grid. If set a percentage, the final value is obtained by multiplying the percentage of maxRadius which is calculated by the width, height, cx, cy. Number | Percentage
+ # The inner radius of first circle grid. If set a percentage, the final value is obtained by multiplying the percentage of maxRadius which is calculated by the width, height, cx, cy. Number | Percentage. Default: 0
inner_radius: Var[Union[int, str]]
- # The outer radius of last circle grid. If set a percentage, the final value is obtained by multiplying the percentage of maxRadius which is calculated by the width, height, cx, cy. Number | Percentage
+ # The outer radius of last circle grid. If set a percentage, the final value is obtained by multiplying the percentage of maxRadius which is calculated by the width, height, cx, cy. Number | Percentage. Default: "80%"
outer_radius: Var[Union[int, str]]
# Valid children components
@@ -330,9 +330,9 @@ class RadarChart(ChartBase):
A dict mapping the event trigger to the var that is passed to the handler.
"""
return {
- EventTriggers.ON_CLICK: lambda: [],
- EventTriggers.ON_MOUSE_ENTER: lambda: [],
- EventTriggers.ON_MOUSE_LEAVE: lambda: [],
+ EventTriggers.ON_CLICK: empty_event,
+ EventTriggers.ON_MOUSE_ENTER: empty_event,
+ EventTriggers.ON_MOUSE_LEAVE: empty_event,
}
@@ -346,31 +346,31 @@ class RadialBarChart(ChartBase):
# The source data which each element is an object.
data: Var[List[Dict[str, Any]]]
- # The sizes of whitespace around the chart, i.e. {"top": 50, "right": 30, "left": 20, "bottom": 5}.
+ # The sizes of whitespace around the chart. Default: {"top": 5, "right": 5, "left": 5 "bottom": 5}
margin: Var[Dict[str, Any]]
- # The The x-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of width. Number | Percentage
+ # The The x-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of width. Number | Percentage. Default: "50%"
cx: Var[Union[int, str]]
- # The The y-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of height. Number | Percentage
+ # The The y-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of height. Number | Percentage. Default: "50%"
cy: Var[Union[int, str]]
- # The angle of first radial direction line.
+ # The angle of first radial direction line. Default: 0
start_angle: Var[int]
- # The angle of last point in the circle which should be startAngle - 360 or startAngle + 360. We'll calculate the direction of chart by 'startAngle' and 'endAngle'.
+ # The angle of last point in the circle which should be startAngle - 360 or startAngle + 360. We'll calculate the direction of chart by 'startAngle' and 'endAngle'. Default: 360
end_angle: Var[int]
- # The inner radius of first circle grid. If set a percentage, the final value is obtained by multiplying the percentage of maxRadius which is calculated by the width, height, cx, cy. Number | Percentage
+ # The inner radius of first circle grid. If set a percentage, the final value is obtained by multiplying the percentage of maxRadius which is calculated by the width, height, cx, cy. Number | Percentage. Default: "30%"
inner_radius: Var[Union[int, str]]
- # The outer radius of last circle grid. If set a percentage, the final value is obtained by multiplying the percentage of maxRadius which is calculated by the width, height, cx, cy. Number | Percentage
+ # The outer radius of last circle grid. If set a percentage, the final value is obtained by multiplying the percentage of maxRadius which is calculated by the width, height, cx, cy. Number | Percentage. Default: "100%"
outer_radius: Var[Union[int, str]]
- # The gap between two bar categories, which can be a percent value or a fixed value. Percentage | Number
+ # The gap between two bar categories, which can be a percent value or a fixed value. Percentage | Number. Default: "10%"
bar_category_gap: Var[Union[int, str]]
- # The gap between two bars in the same category, which can be a percent value or a fixed value. Percentage | Number
+ # The gap between two bars in the same category, which can be a percent value or a fixed value. Percentage | Number. Default: 4
bar_gap: Var[str]
# The size of each bar. If the barSize is not specified, the size of bar will be calculated by the barCategoryGap, barGap and the quantity of bar groups.
@@ -394,7 +394,7 @@ class ScatterChart(ChartBase):
alias = "RechartsScatterChart"
- # The sizes of whitespace around the chart, i.e. {"top": 50, "right": 30, "left": 20, "bottom": 5}.
+ # The sizes of whitespace around the chart. Default: {"top": 5, "right": 5, "bottom": 5, "left": 5}
margin: Var[Dict[str, Any]]
# Valid children components
@@ -419,14 +419,14 @@ class ScatterChart(ChartBase):
A dict mapping the event trigger to the var that is passed to the handler.
"""
return {
- EventTriggers.ON_CLICK: lambda: [],
- EventTriggers.ON_MOUSE_DOWN: lambda: [],
- EventTriggers.ON_MOUSE_UP: lambda: [],
- EventTriggers.ON_MOUSE_MOVE: lambda: [],
- EventTriggers.ON_MOUSE_OVER: lambda: [],
- EventTriggers.ON_MOUSE_OUT: lambda: [],
- EventTriggers.ON_MOUSE_ENTER: lambda: [],
- EventTriggers.ON_MOUSE_LEAVE: lambda: [],
+ EventTriggers.ON_CLICK: empty_event,
+ EventTriggers.ON_MOUSE_DOWN: empty_event,
+ EventTriggers.ON_MOUSE_UP: empty_event,
+ EventTriggers.ON_MOUSE_MOVE: empty_event,
+ EventTriggers.ON_MOUSE_OVER: empty_event,
+ EventTriggers.ON_MOUSE_OUT: empty_event,
+ EventTriggers.ON_MOUSE_ENTER: empty_event,
+ EventTriggers.ON_MOUSE_LEAVE: empty_event,
}
@@ -437,10 +437,10 @@ class FunnelChart(ChartBase):
alias = "RechartsFunnelChart"
- # The layout of bars in the chart. centeric
+ # The layout of bars in the chart. Default: "centric"
layout: Var[str]
- # The sizes of whitespace around the chart, i.e. {"top": 50, "right": 30, "left": 20, "bottom": 5}.
+ # The sizes of whitespace around the chart. Default: {"top": 5, "right": 5, "bottom": 5, "left": 5}
margin: Var[Dict[str, Any]]
# The stroke color of each bar. String | Object
@@ -457,38 +457,41 @@ class Treemap(RechartsCharts):
alias = "RechartsTreemap"
- # The width of chart container. String or Integer
+ # The width of chart container. String or Integer. Default: "100%"
width: Var[Union[str, int]] = "100%" # type: ignore
- # The height of chart container.
+ # The height of chart container. String or Integer. Default: "100%"
height: Var[Union[str, int]] = "100%" # type: ignore
# data of treemap. Array
data: Var[List[Dict[str, Any]]]
- # The key of a group of data which should be unique in a treemap. String | Number | Function
+ # The key of a group of data which should be unique in a treemap. String | Number. Default: "value"
data_key: Var[Union[str, int]]
+ # The key of each sector's name. String. Default: "name"
+ name_key: Var[str]
+
# The treemap will try to keep every single rectangle's aspect ratio near the aspectRatio given. Number
aspect_ratio: Var[int]
- # If set false, animation of area will be disabled.
+ # If set false, animation of area will be disabled. Default: True
is_animation_active: Var[bool]
- # Specifies when the animation should begin, the unit of this option is ms.
+ # Specifies when the animation should begin, the unit of this option is ms. Default: 0
animation_begin: Var[int]
- # Specifies the duration of animation, the unit of this option is ms.
+ # Specifies the duration of animation, the unit of this option is ms. Default: 1500
animation_duration: Var[int]
- # The type of easing function. 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'linear'
+ # The type of easing function. 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'linear'. Default: "ease"
animation_easing: Var[LiteralAnimationEasing]
# The customized event handler of animation start
- on_animation_start: EventHandler[lambda: []]
+ on_animation_start: EventHandler[empty_event]
# The customized event handler of animation end
- on_animation_end: EventHandler[lambda: []]
+ on_animation_end: EventHandler[empty_event]
@classmethod
def create(cls, *children, **props) -> Component:
diff --git a/reflex/components/recharts/charts.pyi b/reflex/components/recharts/charts.pyi
index 2d5036656..f0b494ff8 100644
--- a/reflex/components/recharts/charts.pyi
+++ b/reflex/components/recharts/charts.pyi
@@ -3,10 +3,10 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, List, Literal, Optional, Union, overload
+from typing import Any, Dict, List, Literal, Optional, Union, overload
from reflex.constants.colors import Color
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -28,41 +28,21 @@ class ChartBase(RechartsCharts):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "ChartBase":
"""Create a chart component.
@@ -116,41 +96,21 @@ class CategoricalChartBase(ChartBase):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "CategoricalChartBase":
"""Create a chart component.
@@ -160,8 +120,8 @@ class CategoricalChartBase(ChartBase):
data: The source data, in which each element is an object.
margin: The sizes of whitespace around the chart, i.e. {"top": 50, "right": 30, "left": 20, "bottom": 5}.
sync_id: If any two categorical charts(rx.line_chart, rx.area_chart, rx.bar_chart, rx.composed_chart) have the same sync_id, these two charts can sync the position GraphingTooltip, and the start_index, end_index of Brush.
- sync_method: When sync_id is provided, allows customisation of how the charts will synchronize GraphingTooltips and brushes. Using 'index' (default setting), other charts will reuse current datum's index within the data array. In cases where data does not have the same length, this might yield unexpected results. In that case use 'value' which will try to match other charts values, or a fully custom function which will receive tick, data as argument and should return an index. 'index' | 'value' | function
- layout: The layout of area in the chart. 'horizontal' | 'vertical'
+ sync_method: When sync_id is provided, allows customisation of how the charts will synchronize GraphingTooltips and brushes. Using 'index' (default setting), other charts will reuse current datum's index within the data array. In cases where data does not have the same length, this might yield unexpected results. In that case use 'value' which will try to match other charts values, or a fully custom function which will receive tick, data as argument and should return an index. 'index' | 'value' | function. Default: "index"
+ layout: The layout of area in the chart. 'horizontal' | 'vertical'. Default: "horizontal"
stack_offset: The type of offset function used to generate the lower and upper values in the series array. The four types are built-in offsets in d3-shape. 'expand' | 'none' | 'wiggle' | 'silhouette'
width: The width of chart container. String or Integer
height: The height of chart container.
@@ -217,53 +177,33 @@ class AreaChart(CategoricalChartBase):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "AreaChart":
"""Create a chart component.
Args:
*children: The children of the chart component.
- base_value: The base value of area. Number | 'dataMin' | 'dataMax' | 'auto'
+ base_value: The base value of area. Number | 'dataMin' | 'dataMax' | 'auto'. Default: "auto"
data: The source data, in which each element is an object.
margin: The sizes of whitespace around the chart, i.e. {"top": 50, "right": 30, "left": 20, "bottom": 5}.
sync_id: If any two categorical charts(rx.line_chart, rx.area_chart, rx.bar_chart, rx.composed_chart) have the same sync_id, these two charts can sync the position GraphingTooltip, and the start_index, end_index of Brush.
- sync_method: When sync_id is provided, allows customisation of how the charts will synchronize GraphingTooltips and brushes. Using 'index' (default setting), other charts will reuse current datum's index within the data array. In cases where data does not have the same length, this might yield unexpected results. In that case use 'value' which will try to match other charts values, or a fully custom function which will receive tick, data as argument and should return an index. 'index' | 'value' | function
- layout: The layout of area in the chart. 'horizontal' | 'vertical'
+ sync_method: When sync_id is provided, allows customisation of how the charts will synchronize GraphingTooltips and brushes. Using 'index' (default setting), other charts will reuse current datum's index within the data array. In cases where data does not have the same length, this might yield unexpected results. In that case use 'value' which will try to match other charts values, or a fully custom function which will receive tick, data as argument and should return an index. 'index' | 'value' | function. Default: "index"
+ layout: The layout of area in the chart. 'horizontal' | 'vertical'. Default: "horizontal"
stack_offset: The type of offset function used to generate the lower and upper values in the series array. The four types are built-in offsets in d3-shape. 'expand' | 'none' | 'wiggle' | 'silhouette'
width: The width of chart container. String or Integer
height: The height of chart container.
@@ -317,58 +257,38 @@ class BarChart(CategoricalChartBase):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "BarChart":
"""Create a chart component.
Args:
*children: The children of the chart component.
- bar_category_gap: The gap between two bar categories, which can be a percent value or a fixed value. Percentage | Number
- bar_gap: The gap between two bars in the same category, which can be a percent value or a fixed value. Percentage | Number
+ bar_category_gap: The gap between two bar categories, which can be a percent value or a fixed value. Percentage | Number. Default: "10%"
+ bar_gap: The gap between two bars in the same category, which can be a percent value or a fixed value. Percentage | Number. Default: 4
bar_size: The width of all the bars in the chart. Number
max_bar_size: The maximum width of all the bars in a horizontal BarChart, or maximum height in a vertical BarChart.
stack_offset: The type of offset function used to generate the lower and upper values in the series array. The four types are built-in offsets in d3-shape. 'expand' | 'none' | 'wiggle' | 'silhouette'
- reverse_stack_order: If false set, stacked items will be rendered left to right. If true set, stacked items will be rendered right to left. (Render direction affects SVG layering, not x position.)
+ reverse_stack_order: If false set, stacked items will be rendered left to right. If true set, stacked items will be rendered right to left. (Render direction affects SVG layering, not x position.) Default: False
data: The source data, in which each element is an object.
margin: The sizes of whitespace around the chart, i.e. {"top": 50, "right": 30, "left": 20, "bottom": 5}.
sync_id: If any two categorical charts(rx.line_chart, rx.area_chart, rx.bar_chart, rx.composed_chart) have the same sync_id, these two charts can sync the position GraphingTooltip, and the start_index, end_index of Brush.
- sync_method: When sync_id is provided, allows customisation of how the charts will synchronize GraphingTooltips and brushes. Using 'index' (default setting), other charts will reuse current datum's index within the data array. In cases where data does not have the same length, this might yield unexpected results. In that case use 'value' which will try to match other charts values, or a fully custom function which will receive tick, data as argument and should return an index. 'index' | 'value' | function
- layout: The layout of area in the chart. 'horizontal' | 'vertical'
+ sync_method: When sync_id is provided, allows customisation of how the charts will synchronize GraphingTooltips and brushes. Using 'index' (default setting), other charts will reuse current datum's index within the data array. In cases where data does not have the same length, this might yield unexpected results. In that case use 'value' which will try to match other charts values, or a fully custom function which will receive tick, data as argument and should return an index. 'index' | 'value' | function. Default: "index"
+ layout: The layout of area in the chart. 'horizontal' | 'vertical'. Default: "horizontal"
width: The width of chart container. String or Integer
height: The height of chart container.
style: The style of the component.
@@ -416,41 +336,21 @@ class LineChart(CategoricalChartBase):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "LineChart":
"""Create a chart component.
@@ -460,8 +360,8 @@ class LineChart(CategoricalChartBase):
data: The source data, in which each element is an object.
margin: The sizes of whitespace around the chart, i.e. {"top": 50, "right": 30, "left": 20, "bottom": 5}.
sync_id: If any two categorical charts(rx.line_chart, rx.area_chart, rx.bar_chart, rx.composed_chart) have the same sync_id, these two charts can sync the position GraphingTooltip, and the start_index, end_index of Brush.
- sync_method: When sync_id is provided, allows customisation of how the charts will synchronize GraphingTooltips and brushes. Using 'index' (default setting), other charts will reuse current datum's index within the data array. In cases where data does not have the same length, this might yield unexpected results. In that case use 'value' which will try to match other charts values, or a fully custom function which will receive tick, data as argument and should return an index. 'index' | 'value' | function
- layout: The layout of area in the chart. 'horizontal' | 'vertical'
+ sync_method: When sync_id is provided, allows customisation of how the charts will synchronize GraphingTooltips and brushes. Using 'index' (default setting), other charts will reuse current datum's index within the data array. In cases where data does not have the same length, this might yield unexpected results. In that case use 'value' which will try to match other charts values, or a fully custom function which will receive tick, data as argument and should return an index. 'index' | 'value' | function. Default: "index"
+ layout: The layout of area in the chart. 'horizontal' | 'vertical'. Default: "horizontal"
stack_offset: The type of offset function used to generate the lower and upper values in the series array. The four types are built-in offsets in d3-shape. 'expand' | 'none' | 'wiggle' | 'silhouette'
width: The width of chart container. String or Integer
height: The height of chart container.
@@ -492,7 +392,7 @@ class ComposedChart(CategoricalChartBase):
]
] = None,
bar_category_gap: Optional[Union[Var[Union[int, str]], int, str]] = None,
- bar_gap: Optional[Union[Var[Union[int, str]], int, str]] = None,
+ bar_gap: Optional[Union[Var[int], int]] = None,
bar_size: Optional[Union[Var[int], int]] = None,
reverse_stack_order: Optional[Union[Var[bool], bool]] = None,
data: Optional[Union[List[Dict[str, Any]], Var[List[Dict[str, Any]]]]] = None,
@@ -521,57 +421,37 @@ class ComposedChart(CategoricalChartBase):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "ComposedChart":
"""Create a chart component.
Args:
*children: The children of the chart component.
- base_value: The base value of area. Number | 'dataMin' | 'dataMax' | 'auto'
- bar_category_gap: The gap between two bar categories, which can be a percent value or a fixed value. Percentage | Number
- bar_gap: The gap between two bars in the same category, which can be a percent value or a fixed value. Percentage | Number
- bar_size: The width of all the bars in the chart. Number
- reverse_stack_order: If false set, stacked items will be rendered left to right. If true set, stacked items will be rendered right to left. (Render direction affects SVG layering, not x position.)
+ base_value: The base value of area. Number | 'dataMin' | 'dataMax' | 'auto'. Default: "auto"
+ bar_category_gap: The gap between two bar categories, which can be a percent value or a fixed value. Percentage | Number. Default: "10%"
+ bar_gap: The gap between two bars in the same category. Default: 4
+ bar_size: The width or height of each bar. If the barSize is not specified, the size of the bar will be calculated by the barCategoryGap, barGap and the quantity of bar groups.
+ reverse_stack_order: If false set, stacked items will be rendered left to right. If true set, stacked items will be rendered right to left. (Render direction affects SVG layering, not x position). Default: False
data: The source data, in which each element is an object.
margin: The sizes of whitespace around the chart, i.e. {"top": 50, "right": 30, "left": 20, "bottom": 5}.
sync_id: If any two categorical charts(rx.line_chart, rx.area_chart, rx.bar_chart, rx.composed_chart) have the same sync_id, these two charts can sync the position GraphingTooltip, and the start_index, end_index of Brush.
- sync_method: When sync_id is provided, allows customisation of how the charts will synchronize GraphingTooltips and brushes. Using 'index' (default setting), other charts will reuse current datum's index within the data array. In cases where data does not have the same length, this might yield unexpected results. In that case use 'value' which will try to match other charts values, or a fully custom function which will receive tick, data as argument and should return an index. 'index' | 'value' | function
- layout: The layout of area in the chart. 'horizontal' | 'vertical'
+ sync_method: When sync_id is provided, allows customisation of how the charts will synchronize GraphingTooltips and brushes. Using 'index' (default setting), other charts will reuse current datum's index within the data array. In cases where data does not have the same length, this might yield unexpected results. In that case use 'value' which will try to match other charts values, or a fully custom function which will receive tick, data as argument and should return an index. 'index' | 'value' | function. Default: "index"
+ layout: The layout of area in the chart. 'horizontal' | 'vertical'. Default: "horizontal"
stack_offset: The type of offset function used to generate the lower and upper values in the series array. The four types are built-in offsets in d3-shape. 'expand' | 'none' | 'wiggle' | 'silhouette'
width: The width of chart container. String or Integer
height: The height of chart container.
@@ -603,41 +483,21 @@ class PieChart(ChartBase):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "PieChart":
"""Create a chart component.
@@ -683,13 +543,9 @@ class RadarChart(ChartBase):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
**props,
) -> "RadarChart":
"""Create a chart component.
@@ -697,13 +553,13 @@ class RadarChart(ChartBase):
Args:
*children: The children of the chart component.
data: The source data, in which each element is an object.
- margin: The sizes of whitespace around the chart, i.e. {"top": 50, "right": 30, "left": 20, "bottom": 5}.
- cx: The The x-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of width. Number | Percentage
- cy: The The y-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of height. Number | Percentage
- start_angle: The angle of first radial direction line.
- end_angle: The angle of last point in the circle which should be startAngle - 360 or startAngle + 360. We'll calculate the direction of chart by 'startAngle' and 'endAngle'.
- inner_radius: The inner radius of first circle grid. If set a percentage, the final value is obtained by multiplying the percentage of maxRadius which is calculated by the width, height, cx, cy. Number | Percentage
- outer_radius: The outer radius of last circle grid. If set a percentage, the final value is obtained by multiplying the percentage of maxRadius which is calculated by the width, height, cx, cy. Number | Percentage
+ margin: The sizes of whitespace around the chart, i.e. {"top": 50, "right": 30, "left": 20, "bottom": 5}. Default: {"top": 0, "right": 0, "left": 0, "bottom": 0}
+ cx: The The x-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of width. Number | Percentage. Default: "50%"
+ cy: The The y-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of height. Number | Percentage. Default: "50%"
+ start_angle: The angle of first radial direction line. Default: 90
+ end_angle: The angle of last point in the circle which should be startAngle - 360 or startAngle + 360. We'll calculate the direction of chart by 'startAngle' and 'endAngle'. Default: -270
+ inner_radius: The inner radius of first circle grid. If set a percentage, the final value is obtained by multiplying the percentage of maxRadius which is calculated by the width, height, cx, cy. Number | Percentage. Default: 0
+ outer_radius: The outer radius of last circle grid. If set a percentage, the final value is obtained by multiplying the percentage of maxRadius which is calculated by the width, height, cx, cy. Number | Percentage. Default: "80%"
width: The width of chart container. String or Integer
height: The height of chart container.
style: The style of the component.
@@ -744,41 +600,21 @@ class RadialBarChart(ChartBase):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "RadialBarChart":
"""Create a chart component.
@@ -786,15 +622,15 @@ class RadialBarChart(ChartBase):
Args:
*children: The children of the chart component.
data: The source data which each element is an object.
- margin: The sizes of whitespace around the chart, i.e. {"top": 50, "right": 30, "left": 20, "bottom": 5}.
- cx: The The x-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of width. Number | Percentage
- cy: The The y-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of height. Number | Percentage
- start_angle: The angle of first radial direction line.
- end_angle: The angle of last point in the circle which should be startAngle - 360 or startAngle + 360. We'll calculate the direction of chart by 'startAngle' and 'endAngle'.
- inner_radius: The inner radius of first circle grid. If set a percentage, the final value is obtained by multiplying the percentage of maxRadius which is calculated by the width, height, cx, cy. Number | Percentage
- outer_radius: The outer radius of last circle grid. If set a percentage, the final value is obtained by multiplying the percentage of maxRadius which is calculated by the width, height, cx, cy. Number | Percentage
- bar_category_gap: The gap between two bar categories, which can be a percent value or a fixed value. Percentage | Number
- bar_gap: The gap between two bars in the same category, which can be a percent value or a fixed value. Percentage | Number
+ margin: The sizes of whitespace around the chart. Default: {"top": 5, "right": 5, "left": 5 "bottom": 5}
+ cx: The The x-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of width. Number | Percentage. Default: "50%"
+ cy: The The y-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of height. Number | Percentage. Default: "50%"
+ start_angle: The angle of first radial direction line. Default: 0
+ end_angle: The angle of last point in the circle which should be startAngle - 360 or startAngle + 360. We'll calculate the direction of chart by 'startAngle' and 'endAngle'. Default: 360
+ inner_radius: The inner radius of first circle grid. If set a percentage, the final value is obtained by multiplying the percentage of maxRadius which is calculated by the width, height, cx, cy. Number | Percentage. Default: "30%"
+ outer_radius: The outer radius of last circle grid. If set a percentage, the final value is obtained by multiplying the percentage of maxRadius which is calculated by the width, height, cx, cy. Number | Percentage. Default: "100%"
+ bar_category_gap: The gap between two bar categories, which can be a percent value or a fixed value. Percentage | Number. Default: "10%"
+ bar_gap: The gap between two bars in the same category, which can be a percent value or a fixed value. Percentage | Number. Default: 4
bar_size: The size of each bar. If the barSize is not specified, the size of bar will be calculated by the barCategoryGap, barGap and the quantity of bar groups.
width: The width of chart container. String or Integer
height: The height of chart container.
@@ -827,35 +663,21 @@ class ScatterChart(ChartBase):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
**props,
) -> "ScatterChart":
"""Create a chart component.
Args:
*children: The children of the chart component.
- margin: The sizes of whitespace around the chart, i.e. {"top": 50, "right": 30, "left": 20, "bottom": 5}.
+ margin: The sizes of whitespace around the chart. Default: {"top": 5, "right": 5, "bottom": 5, "left": 5}
width: The width of chart container. String or Integer
height: The height of chart container.
style: The style of the component.
@@ -888,49 +710,29 @@ class FunnelChart(ChartBase):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "FunnelChart":
"""Create a chart component.
Args:
*children: The children of the chart component.
- layout: The layout of bars in the chart. centeric
- margin: The sizes of whitespace around the chart, i.e. {"top": 50, "right": 30, "left": 20, "bottom": 5}.
+ layout: The layout of bars in the chart. Default: "centric"
+ margin: The sizes of whitespace around the chart. Default: {"top": 5, "right": 5, "bottom": 5, "left": 5}
stroke: The stroke color of each bar. String | Object
width: The width of chart container. String or Integer
height: The height of chart container.
@@ -957,6 +759,7 @@ class Treemap(RechartsCharts):
height: Optional[Union[Var[Union[int, str]], int, str]] = None,
data: Optional[Union[List[Dict[str, Any]], Var[List[Dict[str, Any]]]]] = None,
data_key: Optional[Union[Var[Union[int, str]], int, str]] = None,
+ name_key: Optional[Union[Var[str], str]] = None,
aspect_ratio: Optional[Union[Var[int], int]] = None,
is_animation_active: Optional[Union[Var[bool], bool]] = None,
animation_begin: Optional[Union[Var[int], int]] = None,
@@ -973,62 +776,39 @@ class Treemap(RechartsCharts):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_animation_end: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_animation_start: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_animation_end: Optional[EventType[[]]] = None,
+ on_animation_start: Optional[EventType[[]]] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Treemap":
"""Create a chart component.
Args:
*children: The children of the chart component.
- width: The width of chart container. String or Integer
- height: The height of chart container.
+ width: The width of chart container. String or Integer. Default: "100%"
+ height: The height of chart container. String or Integer. Default: "100%"
data: data of treemap. Array
- data_key: The key of a group of data which should be unique in a treemap. String | Number | Function
+ data_key: The key of a group of data which should be unique in a treemap. String | Number. Default: "value"
+ name_key: The key of each sector's name. String. Default: "name"
aspect_ratio: The treemap will try to keep every single rectangle's aspect ratio near the aspectRatio given. Number
- is_animation_active: If set false, animation of area will be disabled.
- animation_begin: Specifies when the animation should begin, the unit of this option is ms.
- animation_duration: Specifies the duration of animation, the unit of this option is ms.
- animation_easing: The type of easing function. 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'linear'
+ is_animation_active: If set false, animation of area will be disabled. Default: True
+ animation_begin: Specifies when the animation should begin, the unit of this option is ms. Default: 0
+ animation_duration: Specifies the duration of animation, the unit of this option is ms. Default: 1500
+ animation_easing: The type of easing function. 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'linear'. Default: "ease"
style: The style of the component.
key: A unique key for the component.
id: The id for the component.
diff --git a/reflex/components/recharts/general.py b/reflex/components/recharts/general.py
index cc252de57..641e1562a 100644
--- a/reflex/components/recharts/general.py
+++ b/reflex/components/recharts/general.py
@@ -6,7 +6,7 @@ from typing import Any, Dict, List, Union
from reflex.components.component import MemoizationLeaf
from reflex.constants.colors import Color
-from reflex.event import EventHandler
+from reflex.event import EventHandler, empty_event
from reflex.vars.base import LiteralVar, Var
from .recharts import (
@@ -30,21 +30,24 @@ class ResponsiveContainer(Recharts, MemoizationLeaf):
# The aspect ratio of the container. The final aspect ratio of the SVG element will be (width / height) * aspect. Number
aspect: Var[int]
- # The width of chart container. Can be a number or string
+ # The width of chart container. Can be a number or string. Default: "100%"
width: Var[Union[int, str]]
- # The height of chart container. Number
+ # The height of chart container. Can be a number or string. Default: "100%"
height: Var[Union[int, str]]
- # The minimum width of chart container.
+ # The minimum width of chart container. Number
min_width: Var[int]
# The minimum height of chart container. Number
min_height: Var[int]
- # If specified a positive number, debounced function will be used to handle the resize event.
+ # If specified a positive number, debounced function will be used to handle the resize event. Default: 0
debounce: Var[int]
+ # If specified provides a callback providing the updated chart width and height values.
+ on_resize: EventHandler[empty_event]
+
# Valid children components
_valid_children: List[str] = [
"AreaChart",
@@ -73,21 +76,24 @@ class Legend(Recharts):
# The height of legend container. Number
height: Var[int]
- # The layout of legend items. 'horizontal' | 'vertical'
+ # The layout of legend items. 'horizontal' | 'vertical'. Default: "horizontal"
layout: Var[LiteralLayout]
- # The alignment of legend items in 'horizontal' direction, which can be 'left', 'center', 'right'.
+ # The alignment of legend items in 'horizontal' direction, which can be 'left', 'center', 'right'. Default: "center"
align: Var[LiteralLegendAlign]
- # The alignment of legend items in 'vertical' direction, which can be 'top', 'middle', 'bottom'.
+ # The alignment of legend items in 'vertical' direction, which can be 'top', 'middle', 'bottom'. Default: "bottom"
vertical_align: Var[LiteralVerticalAlign]
- # The size of icon in each legend item.
+ # The size of icon in each legend item. Default: 14
icon_size: Var[int]
# The type of icon in each legend item. 'line' | 'plainline' | 'square' | 'rect' | 'circle' | 'cross' | 'diamond' | 'star' | 'triangle' | 'wye'
icon_type: Var[LiteralIconType]
+ # The source data of the content to be displayed in the legend, usually calculated internally. Default: []
+ payload: Var[List[Dict[str, Any]]]
+
# The width of chart container, usually calculated internally.
chart_width: Var[int]
@@ -98,28 +104,28 @@ class Legend(Recharts):
margin: Var[Dict[str, Any]]
# The customized event handler of click on the items in this group
- on_click: EventHandler[lambda: []]
+ on_click: EventHandler[empty_event]
# The customized event handler of mousedown on the items in this group
- on_mouse_down: EventHandler[lambda: []]
+ on_mouse_down: EventHandler[empty_event]
# The customized event handler of mouseup on the items in this group
- on_mouse_up: EventHandler[lambda: []]
+ on_mouse_up: EventHandler[empty_event]
# The customized event handler of mousemove on the items in this group
- on_mouse_move: EventHandler[lambda: []]
+ on_mouse_move: EventHandler[empty_event]
# The customized event handler of mouseover on the items in this group
- on_mouse_over: EventHandler[lambda: []]
+ on_mouse_over: EventHandler[empty_event]
# The customized event handler of mouseout on the items in this group
- on_mouse_out: EventHandler[lambda: []]
+ on_mouse_out: EventHandler[empty_event]
# The customized event handler of mouseenter on the items in this group
- on_mouse_enter: EventHandler[lambda: []]
+ on_mouse_enter: EventHandler[empty_event]
# The customized event handler of mouseleave on the items in this group
- on_mouse_leave: EventHandler[lambda: []]
+ on_mouse_leave: EventHandler[empty_event]
class GraphingTooltip(Recharts):
@@ -224,16 +230,16 @@ class LabelList(Recharts):
# The key of a group of label values in data.
data_key: Var[Union[str, int]]
- # The position of each label relative to it view box。"Top" | "left" | "right" | "bottom" | "inside" | "outside" | "insideLeft" | "insideRight" | "insideTop" | "insideBottom" | "insideTopLeft" | "insideBottomLeft" | "insideTopRight" | "insideBottomRight" | "insideStart" | "insideEnd" | "end" | "center"
+ # The position of each label relative to it view box. "Top" | "left" | "right" | "bottom" | "inside" | "outside" | "insideLeft" | "insideRight" | "insideTop" | "insideBottom" | "insideTopLeft" | "insideBottomLeft" | "insideTopRight" | "insideBottomRight" | "insideStart" | "insideEnd" | "end" | "center"
position: Var[LiteralPosition]
- # The offset to the specified "position"
+ # The offset to the specified "position". Default: 5
offset: Var[int]
- # The fill color of each label
+ # The fill color of each label. Default: rx.color("gray", 10)
fill: Var[Union[str, Color]] = LiteralVar.create(Color("gray", 10))
- # The stroke color of each label
+ # The stroke color of each label. Default: "none"
stroke: Var[Union[str, Color]] = LiteralVar.create("none")
diff --git a/reflex/components/recharts/general.pyi b/reflex/components/recharts/general.pyi
index 0e21c8b85..4a8f61c5e 100644
--- a/reflex/components/recharts/general.pyi
+++ b/reflex/components/recharts/general.pyi
@@ -3,11 +3,11 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Literal, Optional, Union, overload
+from typing import Any, Dict, List, Literal, Optional, Union, overload
from reflex.components.component import MemoizationLeaf
from reflex.constants.colors import Color
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -33,41 +33,22 @@ class ResponsiveContainer(Recharts, MemoizationLeaf):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_resize: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "ResponsiveContainer":
"""Create a new memoization leaf component.
@@ -75,11 +56,11 @@ class ResponsiveContainer(Recharts, MemoizationLeaf):
Args:
*children: The children of the component.
aspect: The aspect ratio of the container. The final aspect ratio of the SVG element will be (width / height) * aspect. Number
- width: The width of chart container. Can be a number or string
- height: The height of chart container. Number
- min_width: The minimum width of chart container.
+ width: The width of chart container. Can be a number or string. Default: "100%"
+ height: The height of chart container. Can be a number or string. Default: "100%"
+ min_width: The minimum width of chart container. Number
min_height: The minimum height of chart container. Number
- debounce: If specified a positive number, debounced function will be used to handle the resize event.
+ debounce: If specified a positive number, debounced function will be used to handle the resize event. Default: 0
style: The style of the component.
key: A unique key for the component.
id: The id for the component.
@@ -150,6 +131,9 @@ class Legend(Recharts):
],
]
] = None,
+ payload: Optional[
+ Union[List[Dict[str, Any]], Var[List[Dict[str, Any]]]]
+ ] = None,
chart_width: Optional[Union[Var[int], int]] = None,
chart_height: Optional[Union[Var[int], int]] = None,
margin: Optional[Union[Dict[str, Any], Var[Dict[str, Any]]]] = None,
@@ -159,41 +143,21 @@ class Legend(Recharts):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Legend":
"""Create the component.
@@ -202,11 +166,12 @@ class Legend(Recharts):
*children: The children of the component.
width: The width of legend container. Number
height: The height of legend container. Number
- layout: The layout of legend items. 'horizontal' | 'vertical'
- align: The alignment of legend items in 'horizontal' direction, which can be 'left', 'center', 'right'.
- vertical_align: The alignment of legend items in 'vertical' direction, which can be 'top', 'middle', 'bottom'.
- icon_size: The size of icon in each legend item.
+ layout: The layout of legend items. 'horizontal' | 'vertical'. Default: "horizontal"
+ align: The alignment of legend items in 'horizontal' direction, which can be 'left', 'center', 'right'. Default: "center"
+ vertical_align: The alignment of legend items in 'vertical' direction, which can be 'top', 'middle', 'bottom'. Default: "bottom"
+ icon_size: The size of icon in each legend item. Default: 14
icon_type: The type of icon in each legend item. 'line' | 'plainline' | 'square' | 'rect' | 'circle' | 'cross' | 'diamond' | 'star' | 'triangle' | 'wye'
+ payload: The source data of the content to be displayed in the legend, usually calculated internally. Default: []
chart_width: The width of chart container, usually calculated internally.
chart_height: The height of chart container, usually calculated internally.
margin: The margin of chart container, usually calculated internally.
@@ -260,41 +225,21 @@ class GraphingTooltip(Recharts):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "GraphingTooltip":
"""Create the component.
@@ -391,41 +336,21 @@ class Label(Recharts):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Label":
"""Create the component.
@@ -511,41 +436,21 @@ class LabelList(Recharts):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "LabelList":
"""Create the component.
@@ -553,10 +458,10 @@ class LabelList(Recharts):
Args:
*children: The children of the component.
data_key: The key of a group of label values in data.
- position: The position of each label relative to it view box。"Top" | "left" | "right" | "bottom" | "inside" | "outside" | "insideLeft" | "insideRight" | "insideTop" | "insideBottom" | "insideTopLeft" | "insideBottomLeft" | "insideTopRight" | "insideBottomRight" | "insideStart" | "insideEnd" | "end" | "center"
- offset: The offset to the specified "position"
- fill: The fill color of each label
- stroke: The stroke color of each label
+ position: The position of each label relative to it view box. "Top" | "left" | "right" | "bottom" | "inside" | "outside" | "insideLeft" | "insideRight" | "insideTop" | "insideBottom" | "insideTopLeft" | "insideBottomLeft" | "insideTopRight" | "insideBottomRight" | "insideStart" | "insideEnd" | "end" | "center"
+ offset: The offset to the specified "position". Default: 5
+ fill: The fill color of each label. Default: rx.color("gray", 10)
+ stroke: The stroke color of each label. Default: "none"
style: The style of the component.
key: A unique key for the component.
id: The id for the component.
diff --git a/reflex/components/recharts/polar.py b/reflex/components/recharts/polar.py
index adeb0eb91..ccb96f180 100644
--- a/reflex/components/recharts/polar.py
+++ b/reflex/components/recharts/polar.py
@@ -6,13 +6,14 @@ from typing import Any, Dict, List, Union
from reflex.constants import EventTriggers
from reflex.constants.colors import Color
-from reflex.event import EventHandler
+from reflex.event import EventHandler, empty_event
from reflex.vars.base import LiteralVar, Var
from .recharts import (
LiteralAnimationEasing,
LiteralGridType,
LiteralLegendType,
+ LiteralOrientationLeftRightMiddle,
LiteralPolarRadiusType,
LiteralScale,
Recharts,
@@ -26,57 +27,75 @@ class Pie(Recharts):
alias = "RechartsPie"
- # data
+ # The source data which each element is an object.
data: Var[List[Dict[str, Any]]]
# The key of each sector's value.
data_key: Var[Union[str, int]]
- # The x-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of container width.
+ # The x-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of container width. Default: "50%"
cx: Var[Union[int, str]]
- # The y-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of container height.
+ # The y-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of container height. Default: "50%"
cy: Var[Union[int, str]]
- # The inner radius of pie, which can be set to a percent value.
+ # The inner radius of pie, which can be set to a percent value. Default: 0
inner_radius: Var[Union[int, str]]
- # The outer radius of pie, which can be set to a percent value.
+ # The outer radius of pie, which can be set to a percent value. Default: "80%"
outer_radius: Var[Union[int, str]]
- # The angle of first sector.
+ # The angle of first sector. Default: 0
start_angle: Var[int]
- # The direction of sectors. 1 means clockwise and -1 means anticlockwise.
+ # The end angle of last sector, which should be unequal to start_angle. Default: 360
end_angle: Var[int]
- # The minimum angle of each unzero data.
+ # The minimum angle of each unzero data. Default: 0
min_angle: Var[int]
- # The angle between two sectors.
+ # The angle between two sectors. Default: 0
padding_angle: Var[int]
- # The key of each sector's name.
+ # The key of each sector's name. Default: "name"
name_key: Var[str]
- # The type of icon in legend. If set to 'none', no legend item will be rendered.
+ # The type of icon in legend. If set to 'none', no legend item will be rendered. Default: "rect"
legend_type: Var[LiteralLegendType]
- # If false set, labels will not be drawn.
+ # If false set, labels will not be drawn. If true set, labels will be drawn which have the props calculated internally. Default: False
label: Var[bool] = False # type: ignore
- # If false set, label lines will not be drawn.
+ # If false set, label lines will not be drawn. If true set, label lines will be drawn which have the props calculated internally. Default: False
label_line: Var[bool]
+ # The index of active sector in Pie, this option can be changed in mouse event handlers.
+ data: Var[List[Dict[str, Any]]]
+
# Valid children components
_valid_children: List[str] = ["Cell", "LabelList"]
- # Stoke color
+ # Stoke color. Default: rx.color("accent", 9)
stroke: Var[Union[str, Color]] = LiteralVar.create(Color("accent", 9))
- # Fill color
+ # Fill color. Default: rx.color("accent", 3)
fill: Var[Union[str, Color]] = LiteralVar.create(Color("accent", 3))
+ # If set false, animation of tooltip will be disabled. Default: true in CSR, and false in SSR
+ is_animation_active: Var[bool]
+
+ # Specifies when the animation should begin, the unit of this option is ms. Default: 400
+ animation_begin: Var[int]
+
+ # Specifies the duration of animation, the unit of this option is ms. Default: 1500
+ animation_duration: Var[int]
+
+ # The type of easing function. Default: "ease"
+ animation_easing: Var[LiteralAnimationEasing]
+
+ # The tabindex of wrapper surrounding the cells. Default: 0
+ root_tab_index: Var[int]
+
def get_event_triggers(self) -> dict[str, Union[Var, Any]]:
"""Get the event triggers that pass the component's value to the handler.
@@ -84,12 +103,14 @@ class Pie(Recharts):
A dict mapping the event trigger to the var that is passed to the handler.
"""
return {
- EventTriggers.ON_CLICK: lambda: [],
- EventTriggers.ON_MOUSE_MOVE: lambda: [],
- EventTriggers.ON_MOUSE_OVER: lambda: [],
- EventTriggers.ON_MOUSE_OUT: lambda: [],
- EventTriggers.ON_MOUSE_ENTER: lambda: [],
- EventTriggers.ON_MOUSE_LEAVE: lambda: [],
+ EventTriggers.ON_ANIMATION_START: empty_event,
+ EventTriggers.ON_ANIMATION_END: empty_event,
+ EventTriggers.ON_CLICK: empty_event,
+ EventTriggers.ON_MOUSE_MOVE: empty_event,
+ EventTriggers.ON_MOUSE_OVER: empty_event,
+ EventTriggers.ON_MOUSE_OUT: empty_event,
+ EventTriggers.ON_MOUSE_ENTER: empty_event,
+ EventTriggers.ON_MOUSE_LEAVE: empty_event,
}
@@ -106,36 +127,50 @@ class Radar(Recharts):
# The coordinates of all the vertexes of the radar shape, like [{ x, y }].
points: Var[List[Dict[str, Any]]]
- # If false set, dots will not be drawn
+ # If false set, dots will not be drawn. Default: True
dot: Var[bool]
- # Stoke color
+ # Stoke color. Default: rx.color("accent", 9)
stroke: Var[Union[str, Color]] = LiteralVar.create(Color("accent", 9))
- # Fill color
+ # Fill color. Default: rx.color("accent", 3)
fill: Var[str] = LiteralVar.create(Color("accent", 3))
- # opacity
+ # opacity. Default: 0.6
fill_opacity: Var[float] = LiteralVar.create(0.6)
- # The type of icon in legend. If set to 'none', no legend item will be rendered.
- legend_type: Var[str]
+ # The type of icon in legend. If set to 'none', no legend item will be rendered. Default: "rect"
+ legend_type: Var[LiteralLegendType]
- # If false set, labels will not be drawn
+ # If false set, labels will not be drawn. Default: True
label: Var[bool]
- # Specifies when the animation should begin, the unit of this option is ms.
+ # If set false, animation of polygon will be disabled. Default: True in CSR, and False in SSR
+ is_animation_active: Var[bool]
+
+ # Specifies when the animation should begin, the unit of this option is ms. Default: 0
animation_begin: Var[int]
- # Specifies the duration of animation, the unit of this option is ms.
+ # Specifies the duration of animation, the unit of this option is ms. Default: 1500
animation_duration: Var[int]
- # The type of easing function. 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'linear'
+ # The type of easing function. 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'linear'. Default: "ease"
animation_easing: Var[LiteralAnimationEasing]
# Valid children components
_valid_children: List[str] = ["LabelList"]
+ def get_event_triggers(self) -> dict[str, Union[Var, Any]]:
+ """Get the event triggers that pass the component's value to the handler.
+
+ Returns:
+ A dict mapping the event trigger to the var that is passed to the handler.
+ """
+ return {
+ EventTriggers.ON_ANIMATION_START: empty_event,
+ EventTriggers.ON_ANIMATION_END: empty_event,
+ }
+
class RadialBar(Recharts):
"""A RadialBar chart component in Recharts."""
@@ -144,31 +179,34 @@ class RadialBar(Recharts):
alias = "RechartsRadialBar"
+ # The source data which each element is an object.
+ data: Var[List[Dict[str, Any]]]
+
# The key of a group of data which should be unique to show the meaning of angle axis.
data_key: Var[Union[str, int]]
- # Min angle of each bar. A positive value between 0 and 360.
+ # Min angle of each bar. A positive value between 0 and 360. Default: 0
min_angle: Var[int]
- # Type of legend
- legend_type: Var[str]
+ # The type of icon in legend. If set to 'none', no legend item will be rendered. Default: "rect"
+ legend_type: Var[LiteralLegendType]
- # If false set, labels will not be drawn.
+ # If false set, labels will not be drawn. If true set, labels will be drawn which have the props calculated internally. Default: False
label: Var[Union[bool, Dict[str, Any]]]
- # If false set, background sector will not be drawn.
+ # If false set, background sector will not be drawn. Default: False
background: Var[Union[bool, Dict[str, Any]]]
- # If set false, animation of radial bars will be disabled. By default true in CSR, and false in SSR
+ # If set false, animation of radial bars will be disabled. Default: True
is_animation_active: Var[bool]
- # Specifies when the animation should begin, the unit of this option is ms. By default 0
+ # Specifies when the animation should begin, the unit of this option is ms. Default: 0
animation_begin: Var[int]
- # Specifies the duration of animation, the unit of this option is ms. By default 1500
+ # Specifies the duration of animation, the unit of this option is ms. Default 1500
animation_duration: Var[int]
- # The type of easing function. 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'linear'. By default 'ease'
+ # The type of easing function. 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'linear'. Default: "ease"
animation_easing: Var[LiteralAnimationEasing]
# Valid children components
@@ -181,14 +219,14 @@ class RadialBar(Recharts):
A dict mapping the event trigger to the var that is passed to the handler.
"""
return {
- EventTriggers.ON_CLICK: lambda: [],
- EventTriggers.ON_MOUSE_MOVE: lambda: [],
- EventTriggers.ON_MOUSE_OVER: lambda: [],
- EventTriggers.ON_MOUSE_OUT: lambda: [],
- EventTriggers.ON_MOUSE_ENTER: lambda: [],
- EventTriggers.ON_MOUSE_LEAVE: lambda: [],
- EventTriggers.ON_ANIMATION_START: lambda: [],
- EventTriggers.ON_ANIMATION_END: lambda: [],
+ EventTriggers.ON_CLICK: empty_event,
+ EventTriggers.ON_MOUSE_MOVE: empty_event,
+ EventTriggers.ON_MOUSE_OVER: empty_event,
+ EventTriggers.ON_MOUSE_OUT: empty_event,
+ EventTriggers.ON_MOUSE_ENTER: empty_event,
+ EventTriggers.ON_MOUSE_LEAVE: empty_event,
+ EventTriggers.ON_ANIMATION_START: empty_event,
+ EventTriggers.ON_ANIMATION_END: empty_event,
}
@@ -211,56 +249,56 @@ class PolarAngleAxis(Recharts):
# The outer radius of circle grid. If set a percentage, the final value is obtained by multiplying the percentage of maxRadius which is calculated by the width, height, cx, cy.
radius: Var[Union[int, str]]
- # If false set, axis line will not be drawn. If true set, axis line will be drawn which have the props calculated internally. If object set, axis line will be drawn which have the props mergered by the internal calculated props and the option.
+ # If false set, axis line will not be drawn. If true set, axis line will be drawn which have the props calculated internally. If object set, axis line will be drawn which have the props mergered by the internal calculated props and the option. Default: True
axis_line: Var[Union[bool, Dict[str, Any]]]
- # The type of axis line.
- axis_line_type: Var[str]
+ # The type of axis line. Default: "polygon"
+ axis_line_type: Var[LiteralGridType]
- # If false set, tick lines will not be drawn. If true set, tick lines will be drawn which have the props calculated internally. If object set, tick lines will be drawn which have the props mergered by the internal calculated props and the option.
+ # If false set, tick lines will not be drawn. If true set, tick lines will be drawn which have the props calculated internally. If object set, tick lines will be drawn which have the props mergered by the internal calculated props and the option. Default: False
tick_line: Var[Union[bool, Dict[str, Any]]] = LiteralVar.create(False)
- # The width or height of tick.
- tick: Var[Union[int, str]]
+ # If false set, ticks will not be drawn. If true set, ticks will be drawn which have the props calculated internally. If object set, ticks will be drawn which have the props mergered by the internal calculated props and the option. Default: True
+ tick: Var[Union[bool, Dict[str, Any]]]
# The array of every tick's value and angle.
ticks: Var[List[Dict[str, Any]]]
- # The orientation of axis text.
- orient: Var[str]
+ # The orientation of axis text. Default: "outer"
+ orientation: Var[str]
- # The stroke color of axis
+ # The stroke color of axis. Default: rx.color("gray", 10)
stroke: Var[Union[str, Color]] = LiteralVar.create(Color("gray", 10))
- # Allow the axis has duplicated categorys or not when the type of axis is "category".
+ # Allow the axis has duplicated categorys or not when the type of axis is "category". Default: True
allow_duplicated_category: Var[bool]
# Valid children components.
_valid_children: List[str] = ["Label"]
# The customized event handler of click on the ticks of this axis.
- on_click: EventHandler[lambda: []]
+ on_click: EventHandler[empty_event]
# The customized event handler of mousedown on the the ticks of this axis.
- on_mouse_down: EventHandler[lambda: []]
+ on_mouse_down: EventHandler[empty_event]
# The customized event handler of mouseup on the ticks of this axis.
- on_mouse_up: EventHandler[lambda: []]
+ on_mouse_up: EventHandler[empty_event]
# The customized event handler of mousemove on the ticks of this axis.
- on_mouse_move: EventHandler[lambda: []]
+ on_mouse_move: EventHandler[empty_event]
# The customized event handler of mouseover on the ticks of this axis.
- on_mouse_over: EventHandler[lambda: []]
+ on_mouse_over: EventHandler[empty_event]
# The customized event handler of mouseout on the ticks of this axis.
- on_mouse_out: EventHandler[lambda: []]
+ on_mouse_out: EventHandler[empty_event]
# The customized event handler of moustenter on the ticks of this axis.
- on_mouse_enter: EventHandler[lambda: []]
+ on_mouse_enter: EventHandler[empty_event]
# The customized event handler of mouseleave on the ticks of this axis.
- on_mouse_leave: EventHandler[lambda: []]
+ on_mouse_leave: EventHandler[empty_event]
class PolarGrid(Recharts):
@@ -270,17 +308,17 @@ class PolarGrid(Recharts):
alias = "RechartsPolarGrid"
- # The x-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of container width.
- cx: Var[Union[int, str]]
+ # The x-coordinate of center.
+ cx: Var[int]
- # The y-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of container height.
- cy: Var[Union[int, str]]
+ # The y-coordinate of center.
+ cy: Var[int]
# The radius of the inner polar grid.
- inner_radius: Var[Union[int, str]]
+ inner_radius: Var[int]
# The radius of the outer polar grid.
- outer_radius: Var[Union[int, str]]
+ outer_radius: Var[int]
# The array of every line grid's angle.
polar_angles: Var[List[int]]
@@ -288,10 +326,10 @@ class PolarGrid(Recharts):
# The array of every line grid's radius.
polar_radius: Var[List[int]]
- # The type of polar grids. 'polygon' | 'circle'
+ # The type of polar grids. 'polygon' | 'circle'. Default: "polygon"
grid_type: Var[LiteralGridType]
- # The stroke color of grid
+ # The stroke color of grid. Default: rx.color("gray", 10)
stroke: Var[Union[str, Color]] = LiteralVar.create(Color("gray", 10))
# Valid children components
@@ -305,46 +343,46 @@ class PolarRadiusAxis(Recharts):
alias = "RechartsPolarRadiusAxis"
- # The angle of radial direction line to display axis text.
+ # The angle of radial direction line to display axis text. Default: 0
angle: Var[int]
- # The type of axis line. 'number' | 'category'
+ # The type of axis line. 'number' | 'category'. Default: "category"
type_: Var[LiteralPolarRadiusType]
- # Allow the axis has duplicated categorys or not when the type of axis is "category".
+ # Allow the axis has duplicated categorys or not when the type of axis is "category". Default: True
allow_duplicated_category: Var[bool]
# The x-coordinate of center.
- cx: Var[Union[int, str]]
+ cx: Var[int]
# The y-coordinate of center.
- cy: Var[Union[int, str]]
+ cy: Var[int]
- # If set to true, the ticks of this axis are reversed.
+ # If set to true, the ticks of this axis are reversed. Default: False
reversed: Var[bool]
- # The orientation of axis text.
- orientation: Var[str]
+ # The orientation of axis text. Default: "right"
+ orientation: Var[LiteralOrientationLeftRightMiddle]
- # If false set, axis line will not be drawn. If true set, axis line will be drawn which have the props calculated internally. If object set, axis line will be drawn which have the props mergered by the internal calculated props and the option.
+ # If false set, axis line will not be drawn. If true set, axis line will be drawn which have the props calculated internally. If object set, axis line will be drawn which have the props mergered by the internal calculated props and the option. Default: True
axis_line: Var[Union[bool, Dict[str, Any]]]
- # The width or height of tick.
- tick: Var[Union[int, str]]
+ # If false set, ticks will not be drawn. If true set, ticks will be drawn which have the props calculated internally. If object set, ticks will be drawn which have the props mergered by the internal calculated props and the option. Default: True
+ tick: Var[Union[bool, Dict[str, Any]]]
- # The count of ticks.
+ # The count of axis ticks. Not used if 'type' is 'category'. Default: 5
tick_count: Var[int]
- # If 'auto' set, the scale funtion is linear scale. 'auto' | 'linear' | 'pow' | 'sqrt' | 'log' | 'identity' | 'time' | 'band' | 'point' | 'ordinal' | 'quantile' | 'quantize' | 'utc' | 'sequential' | 'threshold'
+ # If 'auto' set, the scale funtion is linear scale. 'auto' | 'linear' | 'pow' | 'sqrt' | 'log' | 'identity' | 'time' | 'band' | 'point' | 'ordinal' | 'quantile' | 'quantize' | 'utc' | 'sequential' | 'threshold'. Default: "auto"
scale: Var[LiteralScale]
# Valid children components
_valid_children: List[str] = ["Label"]
- # The domain of the polar radius axis, specifying the minimum and maximum values.
- domain: Var[List[int]] = LiteralVar.create([0, 250])
+ # The domain of the polar radius axis, specifying the minimum and maximum values. Default: [0, "auto"]
+ domain: Var[List[Union[int, str]]]
- # The stroke color of axis
+ # The stroke color of axis. Default: rx.color("gray", 10)
stroke: Var[Union[str, Color]] = LiteralVar.create(Color("gray", 10))
def get_event_triggers(self) -> dict[str, Union[Var, Any]]:
@@ -354,12 +392,12 @@ class PolarRadiusAxis(Recharts):
A dict mapping the event trigger to the var that is passed to the handler.
"""
return {
- EventTriggers.ON_CLICK: lambda: [],
- EventTriggers.ON_MOUSE_MOVE: lambda: [],
- EventTriggers.ON_MOUSE_OVER: lambda: [],
- EventTriggers.ON_MOUSE_OUT: lambda: [],
- EventTriggers.ON_MOUSE_ENTER: lambda: [],
- EventTriggers.ON_MOUSE_LEAVE: lambda: [],
+ EventTriggers.ON_CLICK: empty_event,
+ EventTriggers.ON_MOUSE_MOVE: empty_event,
+ EventTriggers.ON_MOUSE_OVER: empty_event,
+ EventTriggers.ON_MOUSE_OUT: empty_event,
+ EventTriggers.ON_MOUSE_ENTER: empty_event,
+ EventTriggers.ON_MOUSE_LEAVE: empty_event,
}
diff --git a/reflex/components/recharts/polar.pyi b/reflex/components/recharts/polar.pyi
index 9d793f3da..c02596006 100644
--- a/reflex/components/recharts/polar.pyi
+++ b/reflex/components/recharts/polar.pyi
@@ -3,10 +3,10 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, List, Literal, Optional, Union, overload
+from typing import Any, Dict, List, Literal, Optional, Union, overload
from reflex.constants.colors import Color
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -68,50 +68,57 @@ class Pie(Recharts):
label_line: Optional[Union[Var[bool], bool]] = None,
stroke: Optional[Union[Color, Var[Union[Color, str]], str]] = None,
fill: Optional[Union[Color, Var[Union[Color, str]], str]] = None,
+ is_animation_active: Optional[Union[Var[bool], bool]] = None,
+ animation_begin: Optional[Union[Var[int], int]] = None,
+ animation_duration: Optional[Union[Var[int], int]] = None,
+ animation_easing: Optional[
+ Union[
+ Literal["ease", "ease-in", "ease-in-out", "ease-out", "linear"],
+ Var[Literal["ease", "ease-in", "ease-in-out", "ease-out", "linear"]],
+ ]
+ ] = None,
+ root_tab_index: Optional[Union[Var[int], int]] = None,
style: Optional[Style] = None,
key: Optional[Any] = None,
id: Optional[Any] = None,
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_animation_end: Optional[EventType[[]]] = None,
+ on_animation_start: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
**props,
) -> "Pie":
"""Create the component.
Args:
*children: The children of the component.
- data: data
+ data: The index of active sector in Pie, this option can be changed in mouse event handlers.
data_key: The key of each sector's value.
- cx: The x-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of container width.
- cy: The y-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of container height.
- inner_radius: The inner radius of pie, which can be set to a percent value.
- outer_radius: The outer radius of pie, which can be set to a percent value.
- start_angle: The angle of first sector.
- end_angle: The direction of sectors. 1 means clockwise and -1 means anticlockwise.
- min_angle: The minimum angle of each unzero data.
- padding_angle: The angle between two sectors.
- name_key: The key of each sector's name.
- legend_type: The type of icon in legend. If set to 'none', no legend item will be rendered.
- label: If false set, labels will not be drawn.
- label_line: If false set, label lines will not be drawn.
- stroke: Stoke color
- fill: Fill color
+ cx: The x-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of container width. Default: "50%"
+ cy: The y-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of container height. Default: "50%"
+ inner_radius: The inner radius of pie, which can be set to a percent value. Default: 0
+ outer_radius: The outer radius of pie, which can be set to a percent value. Default: "80%"
+ start_angle: The angle of first sector. Default: 0
+ end_angle: The end angle of last sector, which should be unequal to start_angle. Default: 360
+ min_angle: The minimum angle of each unzero data. Default: 0
+ padding_angle: The angle between two sectors. Default: 0
+ name_key: The key of each sector's name. Default: "name"
+ legend_type: The type of icon in legend. If set to 'none', no legend item will be rendered. Default: "rect"
+ label: If false set, labels will not be drawn. If true set, labels will be drawn which have the props calculated internally. Default: False
+ label_line: If false set, label lines will not be drawn. If true set, label lines will be drawn which have the props calculated internally. Default: False
+ stroke: Stoke color. Default: rx.color("accent", 9)
+ fill: Fill color. Default: rx.color("accent", 3)
+ is_animation_active: If set false, animation of tooltip will be disabled. Default: true in CSR, and false in SSR
+ animation_begin: Specifies when the animation should begin, the unit of this option is ms. Default: 400
+ animation_duration: Specifies the duration of animation, the unit of this option is ms. Default: 1500
+ animation_easing: The type of easing function. Default: "ease"
+ root_tab_index: The tabindex of wrapper surrounding the cells. Default: 0
style: The style of the component.
key: A unique key for the component.
id: The id for the component.
@@ -126,6 +133,7 @@ class Pie(Recharts):
...
class Radar(Recharts):
+ def get_event_triggers(self) -> dict[str, Union[Var, Any]]: ...
@overload
@classmethod
def create( # type: ignore
@@ -137,8 +145,40 @@ class Radar(Recharts):
stroke: Optional[Union[Color, Var[Union[Color, str]], str]] = None,
fill: Optional[Union[Var[str], str]] = None,
fill_opacity: Optional[Union[Var[float], float]] = None,
- legend_type: Optional[Union[Var[str], str]] = None,
+ legend_type: Optional[
+ Union[
+ Literal[
+ "circle",
+ "cross",
+ "diamond",
+ "line",
+ "none",
+ "plainline",
+ "rect",
+ "square",
+ "star",
+ "triangle",
+ "wye",
+ ],
+ Var[
+ Literal[
+ "circle",
+ "cross",
+ "diamond",
+ "line",
+ "none",
+ "plainline",
+ "rect",
+ "square",
+ "star",
+ "triangle",
+ "wye",
+ ]
+ ],
+ ]
+ ] = None,
label: Optional[Union[Var[bool], bool]] = None,
+ is_animation_active: Optional[Union[Var[bool], bool]] = None,
animation_begin: Optional[Union[Var[int], int]] = None,
animation_duration: Optional[Union[Var[int], int]] = None,
animation_easing: Optional[
@@ -153,41 +193,8 @@ class Radar(Recharts):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_animation_end: Optional[EventType[[]]] = None,
+ on_animation_start: Optional[EventType[[]]] = None,
**props,
) -> "Radar":
"""Create the component.
@@ -196,15 +203,16 @@ class Radar(Recharts):
*children: The children of the component.
data_key: The key of a group of data which should be unique in a radar chart.
points: The coordinates of all the vertexes of the radar shape, like [{ x, y }].
- dot: If false set, dots will not be drawn
- stroke: Stoke color
- fill: Fill color
- fill_opacity: opacity
- legend_type: The type of icon in legend. If set to 'none', no legend item will be rendered.
- label: If false set, labels will not be drawn
- animation_begin: Specifies when the animation should begin, the unit of this option is ms.
- animation_duration: Specifies the duration of animation, the unit of this option is ms.
- animation_easing: The type of easing function. 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'linear'
+ dot: If false set, dots will not be drawn. Default: True
+ stroke: Stoke color. Default: rx.color("accent", 9)
+ fill: Fill color. Default: rx.color("accent", 3)
+ fill_opacity: opacity. Default: 0.6
+ legend_type: The type of icon in legend. If set to 'none', no legend item will be rendered. Default: "rect"
+ label: If false set, labels will not be drawn. Default: True
+ is_animation_active: If set false, animation of polygon will be disabled. Default: True in CSR, and False in SSR
+ animation_begin: Specifies when the animation should begin, the unit of this option is ms. Default: 0
+ animation_duration: Specifies the duration of animation, the unit of this option is ms. Default: 1500
+ animation_easing: The type of easing function. 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'linear'. Default: "ease"
style: The style of the component.
key: A unique key for the component.
id: The id for the component.
@@ -225,9 +233,41 @@ class RadialBar(Recharts):
def create( # type: ignore
cls,
*children,
+ data: Optional[Union[List[Dict[str, Any]], Var[List[Dict[str, Any]]]]] = None,
data_key: Optional[Union[Var[Union[int, str]], int, str]] = None,
min_angle: Optional[Union[Var[int], int]] = None,
- legend_type: Optional[Union[Var[str], str]] = None,
+ legend_type: Optional[
+ Union[
+ Literal[
+ "circle",
+ "cross",
+ "diamond",
+ "line",
+ "none",
+ "plainline",
+ "rect",
+ "square",
+ "star",
+ "triangle",
+ "wye",
+ ],
+ Var[
+ Literal[
+ "circle",
+ "cross",
+ "diamond",
+ "line",
+ "none",
+ "plainline",
+ "rect",
+ "square",
+ "star",
+ "triangle",
+ "wye",
+ ]
+ ],
+ ]
+ ] = None,
label: Optional[
Union[Dict[str, Any], Var[Union[Dict[str, Any], bool]], bool]
] = None,
@@ -249,43 +289,30 @@ class RadialBar(Recharts):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_animation_end: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_animation_start: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_animation_end: Optional[EventType[[]]] = None,
+ on_animation_start: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
**props,
) -> "RadialBar":
"""Create the component.
Args:
*children: The children of the component.
+ data: The source data which each element is an object.
data_key: The key of a group of data which should be unique to show the meaning of angle axis.
- min_angle: Min angle of each bar. A positive value between 0 and 360.
- legend_type: Type of legend
- label: If false set, labels will not be drawn.
- background: If false set, background sector will not be drawn.
- is_animation_active: If set false, animation of radial bars will be disabled. By default true in CSR, and false in SSR
- animation_begin: Specifies when the animation should begin, the unit of this option is ms. By default 0
- animation_duration: Specifies the duration of animation, the unit of this option is ms. By default 1500
- animation_easing: The type of easing function. 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'linear'. By default 'ease'
+ min_angle: Min angle of each bar. A positive value between 0 and 360. Default: 0
+ legend_type: The type of icon in legend. If set to 'none', no legend item will be rendered. Default: "rect"
+ label: If false set, labels will not be drawn. If true set, labels will be drawn which have the props calculated internally. Default: False
+ background: If false set, background sector will not be drawn. Default: False
+ is_animation_active: If set false, animation of radial bars will be disabled. Default: True
+ animation_begin: Specifies when the animation should begin, the unit of this option is ms. Default: 0
+ animation_duration: Specifies the duration of animation, the unit of this option is ms. Default 1500
+ animation_easing: The type of easing function. 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'linear'. Default: "ease"
style: The style of the component.
key: A unique key for the component.
id: The id for the component.
@@ -312,13 +339,17 @@ class PolarAngleAxis(Recharts):
axis_line: Optional[
Union[Dict[str, Any], Var[Union[Dict[str, Any], bool]], bool]
] = None,
- axis_line_type: Optional[Union[Var[str], str]] = None,
+ axis_line_type: Optional[
+ Union[Literal["circle", "polygon"], Var[Literal["circle", "polygon"]]]
+ ] = None,
tick_line: Optional[
Union[Dict[str, Any], Var[Union[Dict[str, Any], bool]], bool]
] = None,
- tick: Optional[Union[Var[Union[int, str]], int, str]] = None,
+ tick: Optional[
+ Union[Dict[str, Any], Var[Union[Dict[str, Any], bool]], bool]
+ ] = None,
ticks: Optional[Union[List[Dict[str, Any]], Var[List[Dict[str, Any]]]]] = None,
- orient: Optional[Union[Var[str], str]] = None,
+ orientation: Optional[Union[Var[str], str]] = None,
stroke: Optional[Union[Color, Var[Union[Color, str]], str]] = None,
allow_duplicated_category: Optional[Union[Var[bool], bool]] = None,
style: Optional[Style] = None,
@@ -327,41 +358,21 @@ class PolarAngleAxis(Recharts):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "PolarAngleAxis":
"""Create the component.
@@ -372,14 +383,14 @@ class PolarAngleAxis(Recharts):
cx: The x-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of container width.
cy: The y-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of container height.
radius: The outer radius of circle grid. If set a percentage, the final value is obtained by multiplying the percentage of maxRadius which is calculated by the width, height, cx, cy.
- axis_line: If false set, axis line will not be drawn. If true set, axis line will be drawn which have the props calculated internally. If object set, axis line will be drawn which have the props mergered by the internal calculated props and the option.
- axis_line_type: The type of axis line.
- tick_line: If false set, tick lines will not be drawn. If true set, tick lines will be drawn which have the props calculated internally. If object set, tick lines will be drawn which have the props mergered by the internal calculated props and the option.
- tick: The width or height of tick.
+ axis_line: If false set, axis line will not be drawn. If true set, axis line will be drawn which have the props calculated internally. If object set, axis line will be drawn which have the props mergered by the internal calculated props and the option. Default: True
+ axis_line_type: The type of axis line. Default: "polygon"
+ tick_line: If false set, tick lines will not be drawn. If true set, tick lines will be drawn which have the props calculated internally. If object set, tick lines will be drawn which have the props mergered by the internal calculated props and the option. Default: False
+ tick: If false set, ticks will not be drawn. If true set, ticks will be drawn which have the props calculated internally. If object set, ticks will be drawn which have the props mergered by the internal calculated props and the option. Default: True
ticks: The array of every tick's value and angle.
- orient: The orientation of axis text.
- stroke: The stroke color of axis
- allow_duplicated_category: Allow the axis has duplicated categorys or not when the type of axis is "category".
+ orientation: The orientation of axis text. Default: "outer"
+ stroke: The stroke color of axis. Default: rx.color("gray", 10)
+ allow_duplicated_category: Allow the axis has duplicated categorys or not when the type of axis is "category". Default: True
style: The style of the component.
key: A unique key for the component.
id: The id for the component.
@@ -399,10 +410,10 @@ class PolarGrid(Recharts):
def create( # type: ignore
cls,
*children,
- cx: Optional[Union[Var[Union[int, str]], int, str]] = None,
- cy: Optional[Union[Var[Union[int, str]], int, str]] = None,
- inner_radius: Optional[Union[Var[Union[int, str]], int, str]] = None,
- outer_radius: Optional[Union[Var[Union[int, str]], int, str]] = None,
+ cx: Optional[Union[Var[int], int]] = None,
+ cy: Optional[Union[Var[int], int]] = None,
+ inner_radius: Optional[Union[Var[int], int]] = None,
+ outer_radius: Optional[Union[Var[int], int]] = None,
polar_angles: Optional[Union[List[int], Var[List[int]]]] = None,
polar_radius: Optional[Union[List[int], Var[List[int]]]] = None,
grid_type: Optional[
@@ -415,55 +426,35 @@ class PolarGrid(Recharts):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "PolarGrid":
"""Create the component.
Args:
*children: The children of the component.
- cx: The x-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of container width.
- cy: The y-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of container height.
+ cx: The x-coordinate of center.
+ cy: The y-coordinate of center.
inner_radius: The radius of the inner polar grid.
outer_radius: The radius of the outer polar grid.
polar_angles: The array of every line grid's angle.
polar_radius: The array of every line grid's radius.
- grid_type: The type of polar grids. 'polygon' | 'circle'
- stroke: The stroke color of grid
+ grid_type: The type of polar grids. 'polygon' | 'circle'. Default: "polygon"
+ stroke: The stroke color of grid. Default: rx.color("gray", 10)
style: The style of the component.
key: A unique key for the component.
id: The id for the component.
@@ -489,14 +480,21 @@ class PolarRadiusAxis(Recharts):
Union[Literal["category", "number"], Var[Literal["category", "number"]]]
] = None,
allow_duplicated_category: Optional[Union[Var[bool], bool]] = None,
- cx: Optional[Union[Var[Union[int, str]], int, str]] = None,
- cy: Optional[Union[Var[Union[int, str]], int, str]] = None,
+ cx: Optional[Union[Var[int], int]] = None,
+ cy: Optional[Union[Var[int], int]] = None,
reversed: Optional[Union[Var[bool], bool]] = None,
- orientation: Optional[Union[Var[str], str]] = None,
+ orientation: Optional[
+ Union[
+ Literal["left", "middle", "right"],
+ Var[Literal["left", "middle", "right"]],
+ ]
+ ] = None,
axis_line: Optional[
Union[Dict[str, Any], Var[Union[Dict[str, Any], bool]], bool]
] = None,
- tick: Optional[Union[Var[Union[int, str]], int, str]] = None,
+ tick: Optional[
+ Union[Dict[str, Any], Var[Union[Dict[str, Any], bool]], bool]
+ ] = None,
tick_count: Optional[Union[Var[int], int]] = None,
scale: Optional[
Union[
@@ -538,7 +536,9 @@ class PolarRadiusAxis(Recharts):
],
]
] = None,
- domain: Optional[Union[List[int], Var[List[int]]]] = None,
+ domain: Optional[
+ Union[List[Union[int, str]], Var[List[Union[int, str]]]]
+ ] = None,
stroke: Optional[Union[Color, Var[Union[Color, str]], str]] = None,
style: Optional[Style] = None,
key: Optional[Any] = None,
@@ -546,41 +546,31 @@ class PolarRadiusAxis(Recharts):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
**props,
) -> "PolarRadiusAxis":
"""Create the component.
Args:
*children: The children of the component.
- angle: The angle of radial direction line to display axis text.
- type_: The type of axis line. 'number' | 'category'
- allow_duplicated_category: Allow the axis has duplicated categorys or not when the type of axis is "category".
+ angle: The angle of radial direction line to display axis text. Default: 0
+ type_: The type of axis line. 'number' | 'category'. Default: "category"
+ allow_duplicated_category: Allow the axis has duplicated categorys or not when the type of axis is "category". Default: True
cx: The x-coordinate of center.
cy: The y-coordinate of center.
- reversed: If set to true, the ticks of this axis are reversed.
- orientation: The orientation of axis text.
- axis_line: If false set, axis line will not be drawn. If true set, axis line will be drawn which have the props calculated internally. If object set, axis line will be drawn which have the props mergered by the internal calculated props and the option.
- tick: The width or height of tick.
- tick_count: The count of ticks.
- scale: If 'auto' set, the scale funtion is linear scale. 'auto' | 'linear' | 'pow' | 'sqrt' | 'log' | 'identity' | 'time' | 'band' | 'point' | 'ordinal' | 'quantile' | 'quantize' | 'utc' | 'sequential' | 'threshold'
- domain: The domain of the polar radius axis, specifying the minimum and maximum values.
- stroke: The stroke color of axis
+ reversed: If set to true, the ticks of this axis are reversed. Default: False
+ orientation: The orientation of axis text. Default: "right"
+ axis_line: If false set, axis line will not be drawn. If true set, axis line will be drawn which have the props calculated internally. If object set, axis line will be drawn which have the props mergered by the internal calculated props and the option. Default: True
+ tick: If false set, ticks will not be drawn. If true set, ticks will be drawn which have the props calculated internally. If object set, ticks will be drawn which have the props mergered by the internal calculated props and the option. Default: True
+ tick_count: The count of axis ticks. Not used if 'type' is 'category'. Default: 5
+ scale: If 'auto' set, the scale funtion is linear scale. 'auto' | 'linear' | 'pow' | 'sqrt' | 'log' | 'identity' | 'time' | 'band' | 'point' | 'ordinal' | 'quantile' | 'quantize' | 'utc' | 'sequential' | 'threshold'. Default: "auto"
+ domain: The domain of the polar radius axis, specifying the minimum and maximum values. Default: [0, "auto"]
+ stroke: The stroke color of axis. Default: rx.color("gray", 10)
style: The style of the component.
key: A unique key for the component.
id: The id for the component.
diff --git a/reflex/components/recharts/recharts.py b/reflex/components/recharts/recharts.py
index adb7bfdf9..a0d683f72 100644
--- a/reflex/components/recharts/recharts.py
+++ b/reflex/components/recharts/recharts.py
@@ -9,7 +9,7 @@ from reflex.utils import console
class Recharts(Component):
"""A component that wraps a recharts lib."""
- library = "recharts@2.12.7"
+ library = "recharts@2.13.0"
def render(self) -> Dict:
"""Render the tag.
@@ -29,7 +29,7 @@ class Recharts(Component):
class RechartsCharts(NoSSRComponent, MemoizationLeaf):
"""A component that wraps a recharts lib."""
- library = "recharts@2.12.7"
+ library = "recharts@2.13.0"
LiteralAnimationEasing = Literal["ease", "ease-in", "ease-out", "ease-in-out", "linear"]
@@ -60,6 +60,7 @@ LiteralScale = Literal[
"sequential",
"threshold",
]
+LiteralTextAnchor = Literal["start", "middle", "end"]
LiteralLayout = Literal["horizontal", "vertical"]
LiteralPolarRadiusType = Literal["number", "category"]
LiteralGridType = Literal["polygon", "circle"]
@@ -131,6 +132,9 @@ LiteralAreaType = Literal[
"stepBefore",
"stepAfter",
]
-LiteralDirection = Literal["x", "y", "both"]
+LiteralDirection = Literal["x", "y"]
LiteralInterval = Literal["preserveStart", "preserveEnd", "preserveStartEnd"]
+LiteralIntervalAxis = Literal[
+ "preserveStart", "preserveEnd", "preserveStartEnd", "equidistantPreserveStart"
+]
LiteralSyncMethod = Literal["index", "value"]
diff --git a/reflex/components/recharts/recharts.pyi b/reflex/components/recharts/recharts.pyi
index 1f1937dc6..c13519f05 100644
--- a/reflex/components/recharts/recharts.pyi
+++ b/reflex/components/recharts/recharts.pyi
@@ -3,10 +3,10 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, Literal, Optional, Union, overload
+from typing import Any, Dict, Literal, Optional, Union, overload
from reflex.components.component import Component, MemoizationLeaf, NoSSRComponent
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.vars.base import Var
@@ -23,41 +23,21 @@ class Recharts(Component):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Recharts":
"""Create the component.
@@ -89,41 +69,21 @@ class RechartsCharts(NoSSRComponent, MemoizationLeaf):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "RechartsCharts":
"""Create a new memoization leaf component.
@@ -171,6 +131,7 @@ LiteralScale = Literal[
"sequential",
"threshold",
]
+LiteralTextAnchor = Literal["start", "middle", "end"]
LiteralLayout = Literal["horizontal", "vertical"]
LiteralPolarRadiusType = Literal["number", "category"]
LiteralGridType = Literal["polygon", "circle"]
@@ -242,6 +203,9 @@ LiteralAreaType = Literal[
"stepBefore",
"stepAfter",
]
-LiteralDirection = Literal["x", "y", "both"]
+LiteralDirection = Literal["x", "y"]
LiteralInterval = Literal["preserveStart", "preserveEnd", "preserveStartEnd"]
+LiteralIntervalAxis = Literal[
+ "preserveStart", "preserveEnd", "preserveStartEnd", "equidistantPreserveStart"
+]
LiteralSyncMethod = Literal["index", "value"]
diff --git a/reflex/components/sonner/toast.py b/reflex/components/sonner/toast.py
index b29b71875..02c320ac6 100644
--- a/reflex/components/sonner/toast.py
+++ b/reflex/components/sonner/toast.py
@@ -192,7 +192,7 @@ class ToastProps(PropsBase):
class Toaster(Component):
"""A Toaster Component for displaying toast notifications."""
- library: str = "sonner@1.4.41"
+ library: str = "sonner@1.5.0"
tag = "Toaster"
diff --git a/reflex/components/sonner/toast.pyi b/reflex/components/sonner/toast.pyi
index 67f826164..976f9f310 100644
--- a/reflex/components/sonner/toast.pyi
+++ b/reflex/components/sonner/toast.pyi
@@ -3,13 +3,13 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, ClassVar, Dict, Literal, Optional, Union, overload
+from typing import Any, ClassVar, Dict, Literal, Optional, Union, overload
from reflex.base import Base
from reflex.components.component import Component, ComponentNamespace
from reflex.components.lucide.icon import Icon
from reflex.components.props import PropsBase
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventSpec, EventType
from reflex.style import Style
from reflex.utils.serializers import serializer
from reflex.vars.base import Var
@@ -121,41 +121,21 @@ class Toaster(Component):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Toaster":
"""Create a toaster component.
diff --git a/reflex/components/suneditor/editor.pyi b/reflex/components/suneditor/editor.pyi
index 8fb92b51a..f7149a02c 100644
--- a/reflex/components/suneditor/editor.pyi
+++ b/reflex/components/suneditor/editor.pyi
@@ -4,11 +4,11 @@
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
import enum
-from typing import Any, Callable, Dict, List, Literal, Optional, Union, overload
+from typing import Any, Dict, List, Literal, Optional, Union, overload
from reflex.base import Base
from reflex.components.component import NoSSRComponent
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.style import Style
from reflex.utils.imports import ImportDict
from reflex.vars.base import Var
@@ -122,56 +122,30 @@ class Editor(NoSSRComponent):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_change: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_copy: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_cut: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_input: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_load: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_paste: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_resize_editor: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- toggle_code_view: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- toggle_full_screen: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType] = None,
+ on_change: Optional[EventType] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_copy: Optional[EventType] = None,
+ on_cut: Optional[EventType] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_input: Optional[EventType] = None,
+ on_load: Optional[EventType] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_paste: Optional[EventType] = None,
+ on_resize_editor: Optional[EventType] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
+ toggle_code_view: Optional[EventType] = None,
+ toggle_full_screen: Optional[EventType] = None,
**props,
) -> "Editor":
"""Create an instance of Editor. No children allowed.
diff --git a/reflex/components/tags/iter_tag.py b/reflex/components/tags/iter_tag.py
index 86e5a57fc..fec27f3d9 100644
--- a/reflex/components/tags/iter_tag.py
+++ b/reflex/components/tags/iter_tag.py
@@ -48,10 +48,10 @@ class IterTag(Tag):
"""
iterable = self.iterable
try:
- if iterable._var_type.mro()[0] == dict:
+ if iterable._var_type.mro()[0] is dict:
# Arg is a tuple of (key, value).
return Tuple[get_args(iterable._var_type)] # type: ignore
- elif iterable._var_type.mro()[0] == tuple:
+ elif iterable._var_type.mro()[0] is tuple:
# Arg is a union of any possible values in the tuple.
return Union[get_args(iterable._var_type)] # type: ignore
else:
diff --git a/reflex/config.py b/reflex/config.py
index a5d66cb52..2e16e2eb0 100644
--- a/reflex/config.py
+++ b/reflex/config.py
@@ -2,6 +2,7 @@
from __future__ import annotations
+import dataclasses
import importlib
import os
import sys
@@ -9,6 +10,11 @@ import urllib.parse
from pathlib import Path
from typing import Any, Dict, List, Optional, Set, Union
+from typing_extensions import get_type_hints
+
+from reflex.utils.exceptions import ConfigError, EnvironmentVarValueError
+from reflex.utils.types import value_inside_optional
+
try:
import pydantic.v1 as pydantic
except ModuleNotFoundError:
@@ -129,6 +135,198 @@ class DBConfig(Base):
return f"{self.engine}://{path}/{self.database}"
+def get_default_value_for_field(field: dataclasses.Field) -> Any:
+ """Get the default value for a field.
+
+ Args:
+ field: The field.
+
+ Returns:
+ The default value.
+
+ Raises:
+ ValueError: If no default value is found.
+ """
+ if field.default != dataclasses.MISSING:
+ return field.default
+ elif field.default_factory != dataclasses.MISSING:
+ return field.default_factory()
+ else:
+ raise ValueError(
+ f"Missing value for environment variable {field.name} and no default value found"
+ )
+
+
+def interpret_boolean_env(value: str) -> bool:
+ """Interpret a boolean environment variable value.
+
+ Args:
+ value: The environment variable value.
+
+ Returns:
+ The interpreted value.
+
+ Raises:
+ EnvironmentVarValueError: If the value is invalid.
+ """
+ true_values = ["true", "1", "yes", "y"]
+ false_values = ["false", "0", "no", "n"]
+
+ if value.lower() in true_values:
+ return True
+ elif value.lower() in false_values:
+ return False
+ raise EnvironmentVarValueError(f"Invalid boolean value: {value}")
+
+
+def interpret_int_env(value: str) -> int:
+ """Interpret an integer environment variable value.
+
+ Args:
+ value: The environment variable value.
+
+ Returns:
+ The interpreted value.
+
+ Raises:
+ EnvironmentVarValueError: If the value is invalid.
+ """
+ try:
+ return int(value)
+ except ValueError as ve:
+ raise EnvironmentVarValueError(f"Invalid integer value: {value}") from ve
+
+
+def interpret_path_env(value: str) -> Path:
+ """Interpret a path environment variable value.
+
+ Args:
+ value: The environment variable value.
+
+ Returns:
+ The interpreted value.
+
+ Raises:
+ EnvironmentVarValueError: If the path does not exist.
+ """
+ path = Path(value)
+ if not path.exists():
+ raise EnvironmentVarValueError(f"Path does not exist: {path}")
+ return path
+
+
+def interpret_env_var_value(value: str, field: dataclasses.Field) -> Any:
+ """Interpret an environment variable value based on the field type.
+
+ Args:
+ value: The environment variable value.
+ field: The field.
+
+ Returns:
+ The interpreted value.
+
+ Raises:
+ ValueError: If the value is invalid.
+ """
+ field_type = value_inside_optional(field.type)
+
+ if field_type is bool:
+ return interpret_boolean_env(value)
+ elif field_type is str:
+ return value
+ elif field_type is int:
+ return interpret_int_env(value)
+ elif field_type is Path:
+ return interpret_path_env(value)
+
+ else:
+ raise ValueError(
+ f"Invalid type for environment variable {field.name}: {field_type}. This is probably an issue in Reflex."
+ )
+
+
+@dataclasses.dataclass(init=False)
+class EnvironmentVariables:
+ """Environment variables class to instantiate environment variables."""
+
+ # Whether to use npm over bun to install frontend packages.
+ REFLEX_USE_NPM: bool = False
+
+ # The npm registry to use.
+ NPM_CONFIG_REGISTRY: Optional[str] = None
+
+ # Whether to use Granian for the backend. Otherwise, use Uvicorn.
+ REFLEX_USE_GRANIAN: bool = False
+
+ # The username to use for authentication on python package repository. Username and password must both be provided.
+ TWINE_USERNAME: Optional[str] = None
+
+ # The password to use for authentication on python package repository. Username and password must both be provided.
+ TWINE_PASSWORD: Optional[str] = None
+
+ # Whether to use the system installed bun. If set to false, bun will be bundled with the app.
+ REFLEX_USE_SYSTEM_BUN: bool = False
+
+ # Whether to use the system installed node and npm. If set to false, node and npm will be bundled with the app.
+ REFLEX_USE_SYSTEM_NODE: bool = False
+
+ # The working directory for the next.js commands.
+ REFLEX_WEB_WORKDIR: Path = Path(constants.Dirs.WEB)
+
+ # Path to the alembic config file
+ ALEMBIC_CONFIG: Path = Path(constants.ALEMBIC_CONFIG)
+
+ # Disable SSL verification for HTTPX requests.
+ SSL_NO_VERIFY: bool = False
+
+ # The directory to store uploaded files.
+ REFLEX_UPLOADED_FILES_DIR: Path = Path(constants.Dirs.UPLOADED_FILES)
+
+ # Whether to use seperate processes to compile the frontend and how many. If not set, defaults to thread executor.
+ REFLEX_COMPILE_PROCESSES: Optional[int] = None
+
+ # Whether to use seperate threads to compile the frontend and how many. Defaults to `min(32, os.cpu_count() + 4)`.
+ REFLEX_COMPILE_THREADS: Optional[int] = None
+
+ # The directory to store reflex dependencies.
+ REFLEX_DIR: Path = Path(constants.Reflex.DIR)
+
+ # Whether to print the SQL queries if the log level is INFO or lower.
+ SQLALCHEMY_ECHO: bool = False
+
+ # Whether to ignore the redis config error. Some redis servers only allow out-of-band configuration.
+ REFLEX_IGNORE_REDIS_CONFIG_ERROR: bool = False
+
+ # Whether to skip purging the web directory in dev mode.
+ REFLEX_PERSIST_WEB_DIR: bool = False
+
+ # The reflex.build frontend host.
+ REFLEX_BUILD_FRONTEND: str = constants.Templates.REFLEX_BUILD_FRONTEND
+
+ # The reflex.build backend host.
+ REFLEX_BUILD_BACKEND: str = constants.Templates.REFLEX_BUILD_BACKEND
+
+ def __init__(self):
+ """Initialize the environment variables."""
+ type_hints = get_type_hints(type(self))
+
+ for field in dataclasses.fields(self):
+ raw_value = os.getenv(field.name, None)
+
+ field.type = type_hints.get(field.name) or field.type
+
+ value = (
+ interpret_env_var_value(raw_value, field)
+ if raw_value is not None
+ else get_default_value_for_field(field)
+ )
+
+ setattr(self, field.name, value)
+
+
+environment = EnvironmentVariables()
+
+
class Config(Base):
"""The config defines runtime settings for the app.
@@ -220,6 +418,9 @@ class Config(Base):
# Number of gunicorn workers from user
gunicorn_workers: Optional[int] = None
+ # Indicate which type of state manager to use
+ state_manager_mode: constants.StateManagerMode = constants.StateManagerMode.DISK
+
# Maximum expiration lock time for redis state manager
redis_lock_expiration: int = constants.Expiration.LOCK
@@ -235,6 +436,9 @@ class Config(Base):
Args:
*args: The args to pass to the Pydantic init method.
**kwargs: The kwargs to pass to the Pydantic init method.
+
+ Raises:
+ ConfigError: If some values in the config are invalid.
"""
super().__init__(*args, **kwargs)
@@ -248,6 +452,14 @@ class Config(Base):
self._non_default_attributes.update(kwargs)
self._replace_defaults(**kwargs)
+ if (
+ self.state_manager_mode == constants.StateManagerMode.REDIS
+ and not self.redis_url
+ ):
+ raise ConfigError(
+ "REDIS_URL is required when using the redis state manager."
+ )
+
@property
def module(self) -> str:
"""Get the module name of the app.
diff --git a/reflex/constants/__init__.py b/reflex/constants/__init__.py
index e974ab915..a540805b5 100644
--- a/reflex/constants/__init__.py
+++ b/reflex/constants/__init__.py
@@ -2,6 +2,8 @@
from .base import (
COOKIES,
+ ENV_BACKEND_ONLY_ENV_VAR,
+ ENV_FRONTEND_ONLY_ENV_VAR,
ENV_MODE_ENV_VAR,
IS_WINDOWS,
LOCAL_STORAGE,
@@ -63,6 +65,7 @@ from .route import (
RouteRegex,
RouteVar,
)
+from .state import StateManagerMode
from .style import Tailwind
__ALL__ = [
@@ -115,6 +118,7 @@ __ALL__ = [
SETTER_PREFIX,
SKIP_COMPILE_ENV_VAR,
SocketEvent,
+ StateManagerMode,
Tailwind,
Templates,
CompileVars,
diff --git a/reflex/constants/base.py b/reflex/constants/base.py
index b86f083cc..bba53d625 100644
--- a/reflex/constants/base.py
+++ b/reflex/constants/base.py
@@ -2,7 +2,6 @@
from __future__ import annotations
-import os
import platform
from enum import Enum
from importlib import metadata
@@ -11,6 +10,8 @@ from types import SimpleNamespace
from platformdirs import PlatformDirs
+from .utils import classproperty
+
IS_WINDOWS = platform.system() == "Windows"
@@ -20,6 +21,8 @@ class Dirs(SimpleNamespace):
# The frontend directories in a project.
# The web folder where the NextJS app is compiled to.
WEB = ".web"
+ # The directory where uploaded files are stored.
+ UPLOADED_FILES = "uploaded_files"
# The name of the assets directory.
APP_ASSETS = "assets"
# The name of the assets directory for external ressource (a subfolder of APP_ASSETS).
@@ -64,21 +67,13 @@ class Reflex(SimpleNamespace):
# Files and directories used to init a new project.
# The directory to store reflex dependencies.
- # Get directory value from enviroment variables if it exists.
- _dir = os.environ.get("REFLEX_DIR", "")
+ # on windows, we use C:/Users//AppData/Local/reflex.
+ # on macOS, we use ~/Library/Application Support/reflex.
+ # on linux, we use ~/.local/share/reflex.
+ # If user sets REFLEX_DIR envroment variable use that instead.
+ DIR = PlatformDirs(MODULE_NAME, False).user_data_path
- DIR = Path(
- _dir
- or (
- # on windows, we use C:/Users//AppData/Local/reflex.
- # on macOS, we use ~/Library/Application Support/reflex.
- # on linux, we use ~/.local/share/reflex.
- # If user sets REFLEX_DIR envroment variable use that instead.
- PlatformDirs(MODULE_NAME, False).user_data_dir
- )
- )
# The root directory of the reflex library.
-
ROOT_DIR = Path(__file__).parents[2]
RELEASES_URL = f"https://api.github.com/repos/reflex-dev/templates/releases"
@@ -101,27 +96,51 @@ class Templates(SimpleNamespace):
DEFAULT = "blank"
# The reflex.build frontend host
- REFLEX_BUILD_FRONTEND = os.environ.get(
- "REFLEX_BUILD_FRONTEND", "https://flexgen.reflex.run"
- )
+ REFLEX_BUILD_FRONTEND = "https://flexgen.reflex.run"
# The reflex.build backend host
- REFLEX_BUILD_BACKEND = os.environ.get(
- "REFLEX_BUILD_BACKEND", "https://flexgen-prod-flexgen.fly.dev"
- )
+ REFLEX_BUILD_BACKEND = "https://flexgen-prod-flexgen.fly.dev"
- # The URL to redirect to reflex.build
- REFLEX_BUILD_URL = (
- REFLEX_BUILD_FRONTEND + "/gen?reflex_init_token={reflex_init_token}"
- )
+ @classproperty
+ @classmethod
+ def REFLEX_BUILD_URL(cls):
+ """The URL to redirect to reflex.build.
- # The URL to poll waiting for the user to select a generation.
- REFLEX_BUILD_POLL_URL = REFLEX_BUILD_BACKEND + "/api/init/{reflex_init_token}"
+ Returns:
+ The URL to redirect to reflex.build.
+ """
+ from reflex.config import environment
- # The URL to fetch the generation's reflex code
- REFLEX_BUILD_CODE_URL = (
- REFLEX_BUILD_BACKEND + "/api/gen/{generation_hash}/refactored"
- )
+ return (
+ environment.REFLEX_BUILD_FRONTEND
+ + "/gen?reflex_init_token={reflex_init_token}"
+ )
+
+ @classproperty
+ @classmethod
+ def REFLEX_BUILD_POLL_URL(cls):
+ """The URL to poll waiting for the user to select a generation.
+
+ Returns:
+ The URL to poll waiting for the user to select a generation.
+ """
+ from reflex.config import environment
+
+ return environment.REFLEX_BUILD_BACKEND + "/api/init/{reflex_init_token}"
+
+ @classproperty
+ @classmethod
+ def REFLEX_BUILD_CODE_URL(cls):
+ """The URL to fetch the generation's reflex code.
+
+ Returns:
+ The URL to fetch the generation's reflex code.
+ """
+ from reflex.config import environment
+
+ return (
+ environment.REFLEX_BUILD_BACKEND + "/api/gen/{generation_hash}/refactored"
+ )
class Dirs(SimpleNamespace):
"""Folders used by the template system of Reflex."""
@@ -226,6 +245,9 @@ SKIP_COMPILE_ENV_VAR = "__REFLEX_SKIP_COMPILE"
# This env var stores the execution mode of the app
ENV_MODE_ENV_VAR = "REFLEX_ENV_MODE"
+ENV_BACKEND_ONLY_ENV_VAR = "REFLEX_BACKEND_ONLY"
+ENV_FRONTEND_ONLY_ENV_VAR = "REFLEX_FRONTEND_ONLY"
+
# Testing variables.
# Testing os env set by pytest when running a test case.
PYTEST_CURRENT_TEST = "PYTEST_CURRENT_TEST"
diff --git a/reflex/constants/compiler.py b/reflex/constants/compiler.py
index 1de3fc263..557a92092 100644
--- a/reflex/constants/compiler.py
+++ b/reflex/constants/compiler.py
@@ -160,3 +160,28 @@ class MemoizationMode(Base):
# Whether children of this component should be memoized first.
recursive: bool = True
+
+
+class SpecialAttributes(enum.Enum):
+ """Special attributes for components.
+
+ These are placed in custom_attrs and rendered as-is rather than converting
+ to a style prop.
+ """
+
+ DATA_UNDERSCORE = "data_"
+ DATA_DASH = "data-"
+ ARIA_UNDERSCORE = "aria_"
+ ARIA_DASH = "aria-"
+
+ @classmethod
+ def is_special(cls, attr: str) -> bool:
+ """Check if the attribute is special.
+
+ Args:
+ attr: the attribute to check
+
+ Returns:
+ True if the attribute is special.
+ """
+ return any(attr.startswith(value.value) for value in cls)
diff --git a/reflex/constants/config.py b/reflex/constants/config.py
index 3ff7aade5..970e67844 100644
--- a/reflex/constants/config.py
+++ b/reflex/constants/config.py
@@ -1,6 +1,5 @@
"""Config constants."""
-import os
from pathlib import Path
from types import SimpleNamespace
@@ -9,7 +8,7 @@ from reflex.constants.base import Dirs, Reflex
from .compiler import Ext
# Alembic migrations
-ALEMBIC_CONFIG = os.environ.get("ALEMBIC_CONFIG", "alembic.ini")
+ALEMBIC_CONFIG = "alembic.ini"
class Config(SimpleNamespace):
diff --git a/reflex/constants/installer.py b/reflex/constants/installer.py
index a815b1284..766dcf5be 100644
--- a/reflex/constants/installer.py
+++ b/reflex/constants/installer.py
@@ -3,9 +3,11 @@
from __future__ import annotations
import platform
+from pathlib import Path
from types import SimpleNamespace
-from .base import IS_WINDOWS, Reflex
+from .base import IS_WINDOWS
+from .utils import classproperty
def get_fnm_name() -> str | None:
@@ -35,25 +37,43 @@ class Bun(SimpleNamespace):
"""Bun constants."""
# The Bun version.
- VERSION = "1.1.10"
+ VERSION = "1.1.29"
+
# Min Bun Version
MIN_VERSION = "0.7.0"
- # The directory to store the bun.
- ROOT_PATH = Reflex.DIR / "bun"
- # Default bun path.
- DEFAULT_PATH = ROOT_PATH / "bin" / ("bun" if not IS_WINDOWS else "bun.exe")
# URL to bun install script.
- INSTALL_URL = "https://bun.sh/install"
+ INSTALL_URL = "https://raw.githubusercontent.com/reflex-dev/reflex/main/scripts/bun_install.sh"
+
# URL to windows install script.
WINDOWS_INSTALL_URL = (
"https://raw.githubusercontent.com/reflex-dev/reflex/main/scripts/install.ps1"
)
+
# Path of the bunfig file
CONFIG_PATH = "bunfig.toml"
- # The environment variable to use the system installed bun.
- USE_SYSTEM_VAR = "REFLEX_USE_SYSTEM_BUN"
+ @classproperty
+ @classmethod
+ def ROOT_PATH(cls):
+ """The directory to store the bun.
+
+ Returns:
+ The directory to store the bun.
+ """
+ from reflex.config import environment
+
+ return environment.REFLEX_DIR / "bun"
+
+ @classproperty
+ @classmethod
+ def DEFAULT_PATH(cls):
+ """Default bun path.
+
+ Returns:
+ The default bun path.
+ """
+ return cls.ROOT_PATH / "bin" / ("bun" if not IS_WINDOWS else "bun.exe")
# FNM config.
@@ -62,44 +82,81 @@ class Fnm(SimpleNamespace):
# The FNM version.
VERSION = "1.35.1"
- # The directory to store fnm.
- DIR = Reflex.DIR / "fnm"
+
FILENAME = get_fnm_name()
- # The fnm executable binary.
- EXE = DIR / ("fnm.exe" if IS_WINDOWS else "fnm")
# The URL to the fnm release binary
INSTALL_URL = (
f"https://github.com/Schniz/fnm/releases/download/v{VERSION}/{FILENAME}.zip"
)
+ @classproperty
+ @classmethod
+ def DIR(cls) -> Path:
+ """The directory to store fnm.
+
+ Returns:
+ The directory to store fnm.
+ """
+ from reflex.config import environment
+
+ return environment.REFLEX_DIR / "fnm"
+
+ @classproperty
+ @classmethod
+ def EXE(cls):
+ """The fnm executable binary.
+
+ Returns:
+ The fnm executable binary.
+ """
+ return cls.DIR / ("fnm.exe" if IS_WINDOWS else "fnm")
+
# Node / NPM config
class Node(SimpleNamespace):
"""Node/ NPM constants."""
# The Node version.
- VERSION = "18.17.0"
+ VERSION = "22.10.0"
# The minimum required node version.
MIN_VERSION = "18.17.0"
- # The node bin path.
- BIN_PATH = (
- Fnm.DIR
- / "node-versions"
- / f"v{VERSION}"
- / "installation"
- / ("bin" if not IS_WINDOWS else "")
- )
+ @classproperty
+ @classmethod
+ def BIN_PATH(cls):
+ """The node bin path.
- # The default path where node is installed.
- PATH = BIN_PATH / ("node.exe" if IS_WINDOWS else "node")
+ Returns:
+ The node bin path.
+ """
+ return (
+ Fnm.DIR
+ / "node-versions"
+ / f"v{cls.VERSION}"
+ / "installation"
+ / ("bin" if not IS_WINDOWS else "")
+ )
- # The default path where npm is installed.
- NPM_PATH = BIN_PATH / "npm"
+ @classproperty
+ @classmethod
+ def PATH(cls):
+ """The default path where node is installed.
- # The environment variable to use the system installed node.
- USE_SYSTEM_VAR = "REFLEX_USE_SYSTEM_NODE"
+ Returns:
+ The default path where node is installed.
+ """
+ return cls.BIN_PATH / ("node.exe" if IS_WINDOWS else "node")
+
+ @classproperty
+ @classmethod
+ def NPM_PATH(cls):
+ """The default path where npm is installed.
+
+ Returns:
+ The default path where npm is installed.
+ """
+ return cls.BIN_PATH / "npm"
class PackageJson(SimpleNamespace):
@@ -116,21 +173,21 @@ class PackageJson(SimpleNamespace):
PATH = "package.json"
DEPENDENCIES = {
- "@babel/standalone": "7.25.3",
- "@emotion/react": "11.11.1",
- "axios": "1.6.0",
+ "@babel/standalone": "7.25.8",
+ "@emotion/react": "11.13.3",
+ "axios": "1.7.7",
"json5": "2.2.3",
- "next": "14.2.13",
- "next-sitemap": "4.1.8",
- "next-themes": "0.2.1",
- "react": "18.2.0",
- "react-dom": "18.2.0",
- "react-focus-lock": "2.11.3",
- "socket.io-client": "4.6.1",
- "universal-cookie": "4.0.4",
+ "next": "14.2.15",
+ "next-sitemap": "4.2.3",
+ "next-themes": "0.3.0",
+ "react": "18.3.1",
+ "react-dom": "18.3.1",
+ "react-focus-lock": "2.13.2",
+ "socket.io-client": "4.8.0",
+ "universal-cookie": "7.2.1",
}
DEV_DEPENDENCIES = {
- "autoprefixer": "10.4.14",
- "postcss": "8.4.31",
+ "autoprefixer": "10.4.20",
+ "postcss": "8.4.47",
"postcss-import": "16.1.0",
}
diff --git a/reflex/constants/state.py b/reflex/constants/state.py
new file mode 100644
index 000000000..aa0e2f97f
--- /dev/null
+++ b/reflex/constants/state.py
@@ -0,0 +1,11 @@
+"""State-related constants."""
+
+from enum import Enum
+
+
+class StateManagerMode(str, Enum):
+ """State manager constants."""
+
+ DISK = "disk"
+ MEMORY = "memory"
+ REDIS = "redis"
diff --git a/reflex/constants/style.py b/reflex/constants/style.py
index 2130ab4e0..403acd4ba 100644
--- a/reflex/constants/style.py
+++ b/reflex/constants/style.py
@@ -7,7 +7,7 @@ class Tailwind(SimpleNamespace):
"""Tailwind constants."""
# The Tailwindcss version
- VERSION = "tailwindcss@3.3.2"
+ VERSION = "tailwindcss@3.4.14"
# The Tailwind config.
CONFIG = "tailwind.config.js"
# Default Tailwind content paths
diff --git a/reflex/constants/utils.py b/reflex/constants/utils.py
new file mode 100644
index 000000000..48797afbf
--- /dev/null
+++ b/reflex/constants/utils.py
@@ -0,0 +1,32 @@
+"""Utility functions for constants."""
+
+from typing import Any, Callable, Generic, Type
+
+from typing_extensions import TypeVar
+
+T = TypeVar("T")
+V = TypeVar("V")
+
+
+class classproperty(Generic[T, V]):
+ """A class property decorator."""
+
+ def __init__(self, getter: Callable[[Type[T]], V]) -> None:
+ """Initialize the class property.
+
+ Args:
+ getter: The getter function.
+ """
+ self.getter = getattr(getter, "__func__", getter)
+
+ def __get__(self, instance: Any, owner: Type[T]) -> V:
+ """Get the value of the class property.
+
+ Args:
+ instance: The instance of the class.
+ owner: The class itself.
+
+ Returns:
+ The value of the class property.
+ """
+ return self.getter(owner)
diff --git a/reflex/custom_components/custom_components.py b/reflex/custom_components/custom_components.py
index 146bb12c2..ddda3de56 100644
--- a/reflex/custom_components/custom_components.py
+++ b/reflex/custom_components/custom_components.py
@@ -17,7 +17,7 @@ import typer
from tomlkit.exceptions import TOMLKitError
from reflex import constants
-from reflex.config import get_config
+from reflex.config import environment, get_config
from reflex.constants import CustomComponents
from reflex.utils import console
@@ -260,7 +260,7 @@ def _validate_library_name(library_name: str | None) -> NameVariants:
# Module name is the snake case.
module_name = "_".join(name_parts)
- custom_component_module_dir = f"reflex_{module_name}"
+ custom_component_module_dir = Path(f"reflex_{module_name}")
console.debug(f"Custom component source directory: {custom_component_module_dir}")
# Use the same name for the directory and the app.
@@ -609,14 +609,14 @@ def publish(
help="The API token to use for authentication on python package repository. If token is provided, no username/password should be provided at the same time",
),
username: Optional[str] = typer.Option(
- os.getenv("TWINE_USERNAME"),
+ environment.TWINE_USERNAME,
"-u",
"--username",
show_default="TWINE_USERNAME environment variable value if set",
help="The username to use for authentication on python package repository. Username and password must both be provided.",
),
password: Optional[str] = typer.Option(
- os.getenv("TWINE_PASSWORD"),
+ environment.TWINE_PASSWORD,
"-p",
"--password",
show_default="TWINE_PASSWORD environment variable value if set",
diff --git a/reflex/event.py b/reflex/event.py
index 7384cf5bf..8291e3465 100644
--- a/reflex/event.py
+++ b/reflex/event.py
@@ -8,35 +8,42 @@ import sys
import types
import urllib.parse
from base64 import b64encode
+from functools import partial
from typing import (
Any,
Callable,
ClassVar,
Dict,
+ Generic,
List,
Optional,
Tuple,
Type,
+ TypeVar,
Union,
get_type_hints,
+ overload,
)
-from typing_extensions import get_args, get_origin
+from typing_extensions import ParamSpec, get_args, get_origin
from reflex import constants
-from reflex.utils import format
+from reflex.utils import console, format
from reflex.utils.exceptions import EventFnArgMismatch, EventHandlerArgMismatch
from reflex.utils.types import ArgsSpec, GenericType
from reflex.vars import VarData
from reflex.vars.base import (
- CachedVarOperation,
LiteralNoneVar,
LiteralVar,
ToOperation,
Var,
- cached_property_no_lock,
)
-from reflex.vars.function import ArgsFunctionOperation, FunctionStringVar, FunctionVar
+from reflex.vars.function import (
+ ArgsFunctionOperation,
+ FunctionStringVar,
+ FunctionVar,
+ VarOperationCall,
+)
from reflex.vars.object import ObjectVar
try:
@@ -389,33 +396,107 @@ class EventChain(EventActionsMixin):
args_spec: Optional[Callable] = dataclasses.field(default=None)
+ invocation: Optional[Var] = dataclasses.field(default=None)
+
+
+@dataclasses.dataclass(
+ init=True,
+ frozen=True,
+)
+class JavascriptHTMLInputElement:
+ """Interface for a Javascript HTMLInputElement https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement."""
+
+ value: str = ""
+
+
+@dataclasses.dataclass(
+ init=True,
+ frozen=True,
+)
+class JavascriptInputEvent:
+ """Interface for a Javascript InputEvent https://developer.mozilla.org/en-US/docs/Web/API/InputEvent."""
+
+ target: JavascriptHTMLInputElement = JavascriptHTMLInputElement()
+
+
+@dataclasses.dataclass(
+ init=True,
+ frozen=True,
+)
+class JavasciptKeyboardEvent:
+ """Interface for a Javascript KeyboardEvent https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent."""
+
+ key: str = ""
+
+
+def input_event(e: Var[JavascriptInputEvent]) -> Tuple[Var[str]]:
+ """Get the value from an input event.
+
+ Args:
+ e: The input event.
+
+ Returns:
+ The value from the input event.
+ """
+ return (e.target.value,)
+
+
+def key_event(e: Var[JavasciptKeyboardEvent]) -> Tuple[Var[str]]:
+ """Get the key from a keyboard event.
+
+ Args:
+ e: The keyboard event.
+
+ Returns:
+ The key from the keyboard event.
+ """
+ return (e.key,)
+
+
+def empty_event() -> Tuple[()]:
+ """Empty event handler.
+
+ Returns:
+ An empty tuple.
+ """
+ return tuple() # type: ignore
+
# These chains can be used for their side effects when no other events are desired.
-stop_propagation = EventChain(events=[], args_spec=lambda: []).stop_propagation
-prevent_default = EventChain(events=[], args_spec=lambda: []).prevent_default
+stop_propagation = EventChain(events=[], args_spec=empty_event).stop_propagation
+prevent_default = EventChain(events=[], args_spec=empty_event).prevent_default
-@dataclasses.dataclass(
- init=True,
- frozen=True,
-)
-class Target:
- """A Javascript event target."""
-
- checked: bool = False
- value: Any = None
+T = TypeVar("T")
-@dataclasses.dataclass(
- init=True,
- frozen=True,
-)
-class FrontendEvent:
- """A Javascript event."""
+def identity_event(event_type: Type[T]) -> Callable[[Var[T]], Tuple[Var[T]]]:
+ """A helper function that returns the input event as output.
- target: Target = Target()
- key: str = ""
- value: Any = None
+ Args:
+ event_type: The type of the event.
+
+ Returns:
+ A function that returns the input event as output.
+ """
+
+ def inner(ev: Var[T]) -> Tuple[Var[T]]:
+ return (ev,)
+
+ inner.__signature__ = inspect.signature(inner).replace( # type: ignore
+ parameters=[
+ inspect.Parameter(
+ "ev",
+ kind=inspect.Parameter.POSITIONAL_OR_KEYWORD,
+ annotation=Var[event_type],
+ )
+ ],
+ return_annotation=Tuple[Var[event_type]],
+ )
+ inner.__annotations__["ev"] = Var[event_type]
+ inner.__annotations__["return"] = Tuple[Var[event_type]]
+
+ return inner
@dataclasses.dataclass(
@@ -946,6 +1027,29 @@ def unwrap_var_annotation(annotation: GenericType):
return annotation
+def resolve_annotation(annotations: dict[str, Any], arg_name: str):
+ """Resolve the annotation for the given argument name.
+
+ Args:
+ annotations: The annotations.
+ arg_name: The argument name.
+
+ Returns:
+ The resolved annotation.
+ """
+ annotation = annotations.get(arg_name)
+ if annotation is None:
+ console.deprecate(
+ feature_name="Unannotated event handler arguments",
+ reason="Provide type annotations for event handler arguments.",
+ deprecation_version="0.6.3",
+ removal_version="0.7.0",
+ )
+ # Allow arbitrary attribute access two levels deep until removed.
+ return Dict[str, dict]
+ return annotation
+
+
def parse_args_spec(arg_spec: ArgsSpec):
"""Parse the args provided in the ArgsSpec of an event trigger.
@@ -958,13 +1062,15 @@ def parse_args_spec(arg_spec: ArgsSpec):
spec = inspect.getfullargspec(arg_spec)
annotations = get_type_hints(arg_spec)
- return arg_spec(
- *[
- Var(f"_{l_arg}").to(
- unwrap_var_annotation(annotations.get(l_arg, FrontendEvent))
- )
- for l_arg in spec.args
- ]
+ return list(
+ arg_spec(
+ *[
+ Var(f"_{l_arg}").to(
+ unwrap_var_annotation(resolve_annotation(annotations, l_arg))
+ )
+ for l_arg in spec.args
+ ]
+ )
)
@@ -1157,7 +1263,7 @@ class EventVar(ObjectVar):
frozen=True,
**{"slots": True} if sys.version_info >= (3, 10) else {},
)
-class LiteralEventVar(CachedVarOperation, LiteralVar, EventVar):
+class LiteralEventVar(VarOperationCall, LiteralVar, EventVar):
"""A literal event var."""
_var_value: EventSpec = dataclasses.field(default=None) # type: ignore
@@ -1170,35 +1276,6 @@ class LiteralEventVar(CachedVarOperation, LiteralVar, EventVar):
"""
return hash((self.__class__.__name__, self._js_expr))
- @cached_property_no_lock
- def _cached_var_name(self) -> str:
- """The name of the var.
-
- Returns:
- The name of the var.
- """
- return str(
- FunctionStringVar("Event").call(
- # event handler name
- ".".join(
- filter(
- None,
- format.get_event_handler_parts(self._var_value.handler),
- )
- ),
- # event handler args
- {str(name): value for name, value in self._var_value.args},
- # event actions
- self._var_value.event_actions,
- # client handler name
- *(
- [self._var_value.client_handler_name]
- if self._var_value.client_handler_name
- else []
- ),
- )
- )
-
@classmethod
def create(
cls,
@@ -1219,6 +1296,22 @@ class LiteralEventVar(CachedVarOperation, LiteralVar, EventVar):
_var_type=EventSpec,
_var_data=_var_data,
_var_value=value,
+ _func=FunctionStringVar("Event"),
+ _args=(
+ # event handler name
+ ".".join(
+ filter(
+ None,
+ format.get_event_handler_parts(value.handler),
+ )
+ ),
+ # event handler args
+ {str(name): value for name, value in value.args},
+ # event actions
+ value.event_actions,
+ # client handler name
+ *([value.client_handler_name] if value.client_handler_name else []),
+ ),
)
@@ -1231,7 +1324,10 @@ class EventChainVar(FunctionVar):
frozen=True,
**{"slots": True} if sys.version_info >= (3, 10) else {},
)
-class LiteralEventChainVar(CachedVarOperation, LiteralVar, EventChainVar):
+# Note: LiteralVar is second in the inheritance list allowing it act like a
+# CachedVarOperation (ArgsFunctionOperation) and get the _js_expr from the
+# _cached_var_name property.
+class LiteralEventChainVar(ArgsFunctionOperation, LiteralVar, EventChainVar):
"""A literal event chain var."""
_var_value: EventChain = dataclasses.field(default=None) # type: ignore
@@ -1244,36 +1340,6 @@ class LiteralEventChainVar(CachedVarOperation, LiteralVar, EventChainVar):
"""
return hash((self.__class__.__name__, self._js_expr))
- @cached_property_no_lock
- def _cached_var_name(self) -> str:
- """The name of the var.
-
- Returns:
- The name of the var.
- """
- sig = inspect.signature(self._var_value.args_spec) # type: ignore
- if sig.parameters:
- arg_def = tuple((f"_{p}" for p in sig.parameters))
- arg_def_expr = LiteralVar.create([Var(_js_expr=arg) for arg in arg_def])
- else:
- # add a default argument for addEvents if none were specified in value.args_spec
- # used to trigger the preventDefault() on the event.
- arg_def = ("...args",)
- arg_def_expr = Var(_js_expr="args")
-
- return str(
- ArgsFunctionOperation.create(
- arg_def,
- FunctionStringVar.create("addEvents").call(
- LiteralVar.create(
- [LiteralVar.create(event) for event in self._var_value.events]
- ),
- arg_def_expr,
- self._var_value.event_actions,
- ),
- )
- )
-
@classmethod
def create(
cls,
@@ -1289,10 +1355,31 @@ class LiteralEventChainVar(CachedVarOperation, LiteralVar, EventChainVar):
Returns:
The created LiteralEventChainVar instance.
"""
+ sig = inspect.signature(value.args_spec) # type: ignore
+ if sig.parameters:
+ arg_def = tuple((f"_{p}" for p in sig.parameters))
+ arg_def_expr = LiteralVar.create([Var(_js_expr=arg) for arg in arg_def])
+ else:
+ # add a default argument for addEvents if none were specified in value.args_spec
+ # used to trigger the preventDefault() on the event.
+ arg_def = ("...args",)
+ arg_def_expr = Var(_js_expr="args")
+
+ if value.invocation is None:
+ invocation = FunctionStringVar.create("addEvents")
+ else:
+ invocation = value.invocation
+
return cls(
_js_expr="",
_var_type=EventChain,
_var_data=_var_data,
+ _args_names=arg_def,
+ _return_expr=invocation.call(
+ LiteralVar.create([LiteralVar.create(event) for event in value.events]),
+ arg_def_expr,
+ value.event_actions,
+ ),
_var_value=value,
)
@@ -1321,3 +1408,169 @@ class ToEventChainVarOperation(ToOperation, EventChainVar):
_original: Var = dataclasses.field(default_factory=lambda: LiteralNoneVar.create())
_default_var_type: ClassVar[Type] = EventChain
+
+
+G = ParamSpec("G")
+
+IndividualEventType = Union[EventSpec, EventHandler, Callable[G, Any], Var[Any]]
+
+EventType = Union[IndividualEventType[G], List[IndividualEventType[G]]]
+
+P = ParamSpec("P")
+T = TypeVar("T")
+V = TypeVar("V")
+V2 = TypeVar("V2")
+V3 = TypeVar("V3")
+V4 = TypeVar("V4")
+V5 = TypeVar("V5")
+
+if sys.version_info >= (3, 10):
+ from typing import Concatenate
+
+ class EventCallback(Generic[P, T]):
+ """A descriptor that wraps a function to be used as an event."""
+
+ def __init__(self, func: Callable[Concatenate[Any, P], T]):
+ """Initialize the descriptor with the function to be wrapped.
+
+ Args:
+ func: The function to be wrapped.
+ """
+ self.func = func
+
+ @overload
+ def __get__(
+ self: EventCallback[[V], T], instance: None, owner
+ ) -> Callable[[Union[Var[V], V]], EventSpec]: ...
+
+ @overload
+ def __get__(
+ self: EventCallback[[V, V2], T], instance: None, owner
+ ) -> Callable[[Union[Var[V], V], Union[Var[V2], V2]], EventSpec]: ...
+
+ @overload
+ def __get__(
+ self: EventCallback[[V, V2, V3], T], instance: None, owner
+ ) -> Callable[
+ [Union[Var[V], V], Union[Var[V2], V2], Union[Var[V3], V3]],
+ EventSpec,
+ ]: ...
+
+ @overload
+ def __get__(
+ self: EventCallback[[V, V2, V3, V4], T], instance: None, owner
+ ) -> Callable[
+ [
+ Union[Var[V], V],
+ Union[Var[V2], V2],
+ Union[Var[V3], V3],
+ Union[Var[V4], V4],
+ ],
+ EventSpec,
+ ]: ...
+
+ @overload
+ def __get__(
+ self: EventCallback[[V, V2, V3, V4, V5], T], instance: None, owner
+ ) -> Callable[
+ [
+ Union[Var[V], V],
+ Union[Var[V2], V2],
+ Union[Var[V3], V3],
+ Union[Var[V4], V4],
+ Union[Var[V5], V5],
+ ],
+ EventSpec,
+ ]: ...
+
+ @overload
+ def __get__(self, instance, owner) -> Callable[P, T]: ...
+
+ def __get__(self, instance, owner) -> Callable:
+ """Get the function with the instance bound to it.
+
+ Args:
+ instance: The instance to bind to the function.
+ owner: The owner of the function.
+
+ Returns:
+ The function with the instance bound to it
+ """
+ if instance is None:
+ return self.func # type: ignore
+
+ return partial(self.func, instance) # type: ignore
+
+ def event_handler(func: Callable[Concatenate[Any, P], T]) -> EventCallback[P, T]:
+ """Wrap a function to be used as an event.
+
+ Args:
+ func: The function to wrap.
+
+ Returns:
+ The wrapped function.
+ """
+ return func # type: ignore
+else:
+
+ def event_handler(func: Callable[P, T]) -> Callable[P, T]:
+ """Wrap a function to be used as an event.
+
+ Args:
+ func: The function to wrap.
+
+ Returns:
+ The wrapped function.
+ """
+ return func
+
+
+class EventNamespace(types.SimpleNamespace):
+ """A namespace for event related classes."""
+
+ Event = Event
+ EventHandler = EventHandler
+ EventSpec = EventSpec
+ CallableEventSpec = CallableEventSpec
+ EventChain = EventChain
+ EventVar = EventVar
+ LiteralEventVar = LiteralEventVar
+ EventChainVar = EventChainVar
+ LiteralEventChainVar = LiteralEventChainVar
+ ToEventVarOperation = ToEventVarOperation
+ ToEventChainVarOperation = ToEventChainVarOperation
+ EventType = EventType
+
+ __call__ = staticmethod(event_handler)
+ get_event = staticmethod(get_event)
+ get_hydrate_event = staticmethod(get_hydrate_event)
+ fix_events = staticmethod(fix_events)
+ call_event_handler = staticmethod(call_event_handler)
+ call_event_fn = staticmethod(call_event_fn)
+ get_handler_args = staticmethod(get_handler_args)
+ check_fn_match_arg_spec = staticmethod(check_fn_match_arg_spec)
+ resolve_annotation = staticmethod(resolve_annotation)
+ parse_args_spec = staticmethod(parse_args_spec)
+ identity_event = staticmethod(identity_event)
+ input_event = staticmethod(input_event)
+ key_event = staticmethod(key_event)
+ empty_event = staticmethod(empty_event)
+ server_side = staticmethod(server_side)
+ redirect = staticmethod(redirect)
+ console_log = staticmethod(console_log)
+ back = staticmethod(back)
+ window_alert = staticmethod(window_alert)
+ set_focus = staticmethod(set_focus)
+ scroll_to = staticmethod(scroll_to)
+ set_value = staticmethod(set_value)
+ remove_cookie = staticmethod(remove_cookie)
+ clear_local_storage = staticmethod(clear_local_storage)
+ remove_local_storage = staticmethod(remove_local_storage)
+ clear_session_storage = staticmethod(clear_session_storage)
+ remove_session_storage = staticmethod(remove_session_storage)
+ set_clipboard = staticmethod(set_clipboard)
+ download = staticmethod(download)
+ call_script = staticmethod(call_script)
+
+
+event = EventNamespace()
diff --git a/reflex/experimental/layout.pyi b/reflex/experimental/layout.pyi
index d9b576eeb..e4c82b351 100644
--- a/reflex/experimental/layout.pyi
+++ b/reflex/experimental/layout.pyi
@@ -3,14 +3,14 @@
# ------------------- DO NOT EDIT ----------------------
# This file was generated by `reflex/utils/pyi_generator.py`!
# ------------------------------------------------------
-from typing import Any, Callable, Dict, List, Literal, Optional, Union, overload
+from typing import Any, Dict, List, Literal, Optional, Union, overload
from reflex import color
from reflex.components.base.fragment import Fragment
from reflex.components.component import Component, ComponentNamespace, MemoizationLeaf
from reflex.components.radix.primitives.drawer import DrawerRoot
from reflex.components.radix.themes.layout.box import Box
-from reflex.event import EventHandler, EventSpec
+from reflex.event import EventType
from reflex.state import ComponentState
from reflex.style import Style
from reflex.vars.base import Var
@@ -51,41 +51,21 @@ class Sidebar(Box, MemoizationLeaf):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Sidebar":
"""Create the sidebar component.
@@ -136,44 +116,22 @@ class DrawerSidebar(DrawerRoot):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_open_change: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_open_change: Optional[EventType] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "DrawerSidebar":
"""Create the sidebar component.
@@ -207,41 +165,21 @@ class SidebarTrigger(Fragment):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "SidebarTrigger":
"""Create the sidebar trigger component.
@@ -292,41 +230,21 @@ class Layout(Box):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Layout":
"""Create the layout component.
@@ -380,41 +298,21 @@ class LayoutNamespace(ComponentNamespace):
class_name: Optional[Any] = None,
autofocus: Optional[bool] = None,
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
- on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_context_menu: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_double_click: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_mouse_down: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_enter: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_leave: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_move: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_out: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_over: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_mouse_up: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
- on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
- on_unmount: Optional[
- Union[EventHandler, EventSpec, list, Callable, Var]
- ] = None,
+ on_blur: Optional[EventType[[]]] = None,
+ on_click: Optional[EventType[[]]] = None,
+ on_context_menu: Optional[EventType[[]]] = None,
+ on_double_click: Optional[EventType[[]]] = None,
+ on_focus: Optional[EventType[[]]] = None,
+ on_mount: Optional[EventType[[]]] = None,
+ on_mouse_down: Optional[EventType[[]]] = None,
+ on_mouse_enter: Optional[EventType[[]]] = None,
+ on_mouse_leave: Optional[EventType[[]]] = None,
+ on_mouse_move: Optional[EventType[[]]] = None,
+ on_mouse_out: Optional[EventType[[]]] = None,
+ on_mouse_over: Optional[EventType[[]]] = None,
+ on_mouse_up: Optional[EventType[[]]] = None,
+ on_scroll: Optional[EventType[[]]] = None,
+ on_unmount: Optional[EventType[[]]] = None,
**props,
) -> "Layout":
"""Create the layout component.
diff --git a/reflex/istate/dynamic.py b/reflex/istate/dynamic.py
new file mode 100644
index 000000000..e5da36c26
--- /dev/null
+++ b/reflex/istate/dynamic.py
@@ -0,0 +1,3 @@
+"""A container for dynamically generated states."""
+
+# This page intentionally left blank.
diff --git a/reflex/model.py b/reflex/model.py
index 0e8d62e90..b269044c5 100644
--- a/reflex/model.py
+++ b/reflex/model.py
@@ -2,9 +2,7 @@
from __future__ import annotations
-import os
from collections import defaultdict
-from pathlib import Path
from typing import Any, ClassVar, Optional, Type, Union
import alembic.autogenerate
@@ -18,9 +16,8 @@ import sqlalchemy
import sqlalchemy.exc
import sqlalchemy.orm
-from reflex import constants
from reflex.base import Base
-from reflex.config import get_config
+from reflex.config import environment, get_config
from reflex.utils import console
from reflex.utils.compat import sqlmodel, sqlmodel_field_has_primary_key
@@ -41,12 +38,12 @@ def get_engine(url: str | None = None) -> sqlalchemy.engine.Engine:
url = url or conf.db_url
if url is None:
raise ValueError("No database url configured")
- if not Path(constants.ALEMBIC_CONFIG).exists():
+ if environment.ALEMBIC_CONFIG.exists():
console.warn(
"Database is not initialized, run [bold]reflex db init[/bold] first."
)
# Print the SQL queries if the log level is INFO or lower.
- echo_db_query = os.environ.get("SQLALCHEMY_ECHO") == "True"
+ echo_db_query = environment.SQLALCHEMY_ECHO
# Needed for the admin dash on sqlite.
connect_args = {"check_same_thread": False} if url.startswith("sqlite") else {}
return sqlmodel.create_engine(url, echo=echo_db_query, connect_args=connect_args)
@@ -234,7 +231,7 @@ class Model(Base, sqlmodel.SQLModel): # pyright: ignore [reportGeneralTypeIssue
Returns:
tuple of (config, script_directory)
"""
- config = alembic.config.Config(constants.ALEMBIC_CONFIG)
+ config = alembic.config.Config(environment.ALEMBIC_CONFIG)
return config, alembic.script.ScriptDirectory(
config.get_main_option("script_location", default="version"),
)
@@ -269,8 +266,8 @@ class Model(Base, sqlmodel.SQLModel): # pyright: ignore [reportGeneralTypeIssue
def alembic_init(cls):
"""Initialize alembic for the project."""
alembic.command.init(
- config=alembic.config.Config(constants.ALEMBIC_CONFIG),
- directory=str(Path(constants.ALEMBIC_CONFIG).parent / "alembic"),
+ config=alembic.config.Config(environment.ALEMBIC_CONFIG),
+ directory=str(environment.ALEMBIC_CONFIG.parent / "alembic"),
)
@classmethod
@@ -290,7 +287,7 @@ class Model(Base, sqlmodel.SQLModel): # pyright: ignore [reportGeneralTypeIssue
Returns:
True when changes have been detected.
"""
- if not Path(constants.ALEMBIC_CONFIG).exists():
+ if not environment.ALEMBIC_CONFIG.exists():
return False
config, script_directory = cls._alembic_config()
@@ -391,7 +388,7 @@ class Model(Base, sqlmodel.SQLModel): # pyright: ignore [reportGeneralTypeIssue
True - indicating the process was successful.
None - indicating the process was skipped.
"""
- if not Path(constants.ALEMBIC_CONFIG).exists():
+ if not environment.ALEMBIC_CONFIG.exists():
return
with cls.get_db_engine().connect() as connection:
diff --git a/reflex/reflex.py b/reflex/reflex.py
index 4608ed171..7bef8b7e5 100644
--- a/reflex/reflex.py
+++ b/reflex/reflex.py
@@ -4,7 +4,6 @@ from __future__ import annotations
import atexit
import os
-import webbrowser
from pathlib import Path
from typing import List, Optional
@@ -14,7 +13,7 @@ from reflex_cli.deployments import deployments_cli
from reflex_cli.utils import dependency
from reflex import constants
-from reflex.config import get_config
+from reflex.config import environment, get_config
from reflex.custom_components.custom_components import custom_components_cli
from reflex.state import reset_disk_state_manager
from reflex.utils import console, redir, telemetry
@@ -275,9 +274,17 @@ def run(
constants.Env.DEV, help="The environment to run the app in."
),
frontend: bool = typer.Option(
- False, "--frontend-only", help="Execute only frontend."
+ False,
+ "--frontend-only",
+ help="Execute only frontend.",
+ envvar=constants.ENV_FRONTEND_ONLY_ENV_VAR,
+ ),
+ backend: bool = typer.Option(
+ False,
+ "--backend-only",
+ help="Execute only backend.",
+ envvar=constants.ENV_BACKEND_ONLY_ENV_VAR,
),
- backend: bool = typer.Option(False, "--backend-only", help="Execute only backend."),
frontend_port: str = typer.Option(
config.frontend_port, help="Specify a different frontend port."
),
@@ -292,6 +299,12 @@ def run(
),
):
"""Run the app in the current directory."""
+ if frontend and backend:
+ console.error("Cannot use both --frontend-only and --backend-only options.")
+ raise typer.Exit(1)
+ os.environ[constants.ENV_BACKEND_ONLY_ENV_VAR] = str(backend).lower()
+ os.environ[constants.ENV_FRONTEND_ONLY_ENV_VAR] = str(frontend).lower()
+
_run(env, frontend, backend, frontend_port, backend_port, backend_host, loglevel)
@@ -407,7 +420,7 @@ def db_init():
return
# Check the alembic config.
- if Path(constants.ALEMBIC_CONFIG).exists():
+ if environment.ALEMBIC_CONFIG.exists():
console.error(
"Database is already initialized. Use "
"[bold]reflex db makemigrations[/bold] to create schema change "
@@ -586,18 +599,6 @@ def deploy(
)
-@cli.command()
-def demo(
- frontend_port: str = typer.Option(
- "3001", help="Specify a different frontend port."
- ),
- backend_port: str = typer.Option("8001", help="Specify a different backend port."),
-):
- """Run the demo app."""
- # Open the demo app in a terminal.
- webbrowser.open("https://demo.reflex.run")
-
-
cli.add_typer(db_cli, name="db", help="Subcommands for managing the database schema.")
cli.add_typer(script_cli, name="script", help="Subcommands running helper scripts.")
cli.add_typer(
diff --git a/reflex/state.py b/reflex/state.py
index 5798564fa..0634ad5b7 100644
--- a/reflex/state.py
+++ b/reflex/state.py
@@ -8,8 +8,8 @@ import copy
import dataclasses
import functools
import inspect
-import os
import pickle
+import sys
import uuid
from abc import ABC, abstractmethod
from collections import defaultdict
@@ -32,6 +32,7 @@ from typing import (
Type,
Union,
cast,
+ get_args,
get_type_hints,
)
@@ -59,8 +60,10 @@ import wrapt
from redis.asyncio import Redis
from redis.exceptions import ResponseError
+import reflex.istate.dynamic
from reflex import constants
from reflex.base import Base
+from reflex.config import environment
from reflex.event import (
BACKGROUND_TASK_MARKER,
Event,
@@ -75,13 +78,14 @@ from reflex.utils.exceptions import (
DynamicRouteArgShadowsStateVar,
EventHandlerShadowsBuiltInStateMethod,
ImmutableStateError,
+ InvalidStateManagerMode,
LockExpiredError,
SetUndefinedStateVarError,
StateSchemaMismatchError,
)
from reflex.utils.exec import is_testing_env
from reflex.utils.serializers import serializer
-from reflex.utils.types import override
+from reflex.utils.types import get_origin, override
from reflex.vars import VarData
if TYPE_CHECKING:
@@ -240,12 +244,16 @@ def get_var_for_field(cls: Type[BaseState], f: ModelField):
Returns:
The Var instance.
"""
+ from reflex.vars import Field
+
field_name = format.format_state_name(cls.get_full_name()) + "." + f.name
return dispatch(
field_name=field_name,
var_data=VarData.from_state(cls, f.name),
- result_var_type=f.outer_type_,
+ result_var_type=f.outer_type_
+ if get_origin(f.outer_type_) is not Field
+ else get_args(f.outer_type_)[0],
)
@@ -419,6 +427,10 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow):
if mixin:
return
+ # Handle locally-defined states for pickling.
+ if "" in cls.__qualname__:
+ cls._handle_local_def()
+
# Validate the module name.
cls._validate_module_name()
@@ -461,11 +473,11 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow):
for name, value in cls.__dict__.items()
if types.is_backend_base_variable(name, cls)
}
- # Add annotated backend vars that do not have a default value.
+ # Add annotated backend vars that may not have a default value.
new_backend_vars.update(
{
- name: Var("", _var_type=annotation_value).get_default_value()
- for name, annotation_value in get_type_hints(cls).items()
+ name: cls._get_var_default(name, annotation_value)
+ for name, annotation_value in cls._get_type_hints().items()
if name not in new_backend_vars
and types.is_backend_base_variable(name, cls)
}
@@ -641,6 +653,39 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow):
)
]
+ @classmethod
+ def _handle_local_def(cls):
+ """Handle locally-defined states for pickling."""
+ known_names = dir(reflex.istate.dynamic)
+ proposed_name = cls.__name__
+ for ix in range(len(known_names)):
+ if proposed_name not in known_names:
+ break
+ proposed_name = f"{cls.__name__}_{ix}"
+ setattr(reflex.istate.dynamic, proposed_name, cls)
+ cls.__original_name__ = cls.__name__
+ cls.__original_module__ = cls.__module__
+ cls.__name__ = cls.__qualname__ = proposed_name
+ cls.__module__ = reflex.istate.dynamic.__name__
+
+ @classmethod
+ def _get_type_hints(cls) -> dict[str, Any]:
+ """Get the type hints for this class.
+
+ If the class is dynamic, evaluate the type hints with the original
+ module in the local namespace.
+
+ Returns:
+ The type hints dict.
+ """
+ original_module = getattr(cls, "__original_module__", None)
+ if original_module is not None:
+ localns = sys.modules[original_module].__dict__
+ else:
+ localns = None
+
+ return get_type_hints(cls, localns=localns)
+
@classmethod
def _init_var_dependency_dicts(cls):
"""Initialize the var dependency tracking dicts.
@@ -691,6 +736,9 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow):
parent_state.get_parent_state(),
)
+ # Reset cached schema value
+ cls._to_schema.cache_clear()
+
@classmethod
def _check_overridden_methods(cls):
"""Check for shadow methods and raise error if any.
@@ -990,6 +1038,26 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow):
# Ensure frontend uses null coalescing when accessing.
object.__setattr__(prop, "_var_type", Optional[prop._var_type])
+ @classmethod
+ def _get_var_default(cls, name: str, annotation_value: Any) -> Any:
+ """Get the default value of a (backend) var.
+
+ Args:
+ name: The name of the var.
+ annotation_value: The annotation value of the var.
+
+ Returns:
+ The default value of the var or None.
+ """
+ try:
+ return getattr(cls, name)
+ except AttributeError:
+ try:
+ return Var("", _var_type=annotation_value).get_default_value()
+ except TypeError:
+ pass
+ return None
+
@staticmethod
def _get_base_functions() -> dict[str, FunctionType]:
"""Get all functions of the state class excluding dunder methods.
@@ -1181,7 +1249,9 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow):
name not in self.vars
and name not in self.get_skip_vars()
and not name.startswith("__")
- and not name.startswith(f"_{type(self).__name__}__")
+ and not name.startswith(
+ f"_{getattr(type(self), '__original_name__', type(self).__name__)}__"
+ )
):
raise SetUndefinedStateVarError(
f"The state variable '{name}' has not been defined in '{type(self).__name__}'. "
@@ -1215,6 +1285,10 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow):
default = copy.deepcopy(field.default)
setattr(self, prop_name, default)
+ # Reset the backend vars.
+ for prop_name, value in self.backend_vars.items():
+ setattr(self, prop_name, copy.deepcopy(value))
+
# Recursively reset the substates.
for substate in self.substates.values():
substate.reset()
@@ -1847,13 +1921,8 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow):
self.dirty_vars.update(self._always_dirty_computed_vars)
self._mark_dirty()
- def dictify(value: Any):
- if dataclasses.is_dataclass(value) and not isinstance(value, type):
- return dataclasses.asdict(value)
- return value
-
base_vars = {
- prop_name: dictify(self.get_value(getattr(self, prop_name)))
+ prop_name: self.get_value(getattr(self, prop_name))
for prop_name in self.base_vars
}
if initial and include_computed:
@@ -1925,20 +1994,65 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow):
The state dict for serialization.
"""
state = super().__getstate__()
- # Never serialize parent_state or substates
state["__dict__"] = state["__dict__"].copy()
+ if state["__dict__"].get("parent_state") is not None:
+ # Do not serialize router data in substates (only the root state).
+ state["__dict__"].pop("router", None)
+ state["__dict__"].pop("router_data", None)
+ # Never serialize parent_state or substates.
state["__dict__"]["parent_state"] = None
state["__dict__"]["substates"] = {}
state["__dict__"].pop("_was_touched", None)
+ # Remove all inherited vars.
+ for inherited_var_name in self.inherited_vars:
+ state["__dict__"].pop(inherited_var_name, None)
return state
+ @classmethod
+ @functools.lru_cache()
+ def _to_schema(cls) -> str:
+ """Convert a state to a schema.
+
+ Returns:
+ The hash of the schema.
+ """
+
+ def _field_tuple(
+ field_name: str,
+ ) -> Tuple[str, str, Any, Union[bool, None], Any]:
+ model_field = cls.__fields__[field_name]
+ return (
+ field_name,
+ model_field.name,
+ _serialize_type(model_field.type_),
+ (
+ model_field.required
+ if isinstance(model_field.required, bool)
+ else None
+ ),
+ (model_field.default if is_serializable(model_field.default) else None),
+ )
+
+ return md5(
+ pickle.dumps(
+ list(sorted(_field_tuple(field_name) for field_name in cls.base_vars))
+ )
+ ).hexdigest()
+
def _serialize(self) -> bytes:
"""Serialize the state for redis.
Returns:
The serialized state.
"""
- return pickle.dumps((state_to_schema(self), self))
+ try:
+ return pickle.dumps((self._to_schema(), self))
+ except pickle.PicklingError:
+ console.warn(
+ f"Failed to serialize state {self.get_full_name()} due to unpicklable object. "
+ "This state will not be persisted."
+ )
+ return b""
@classmethod
def _deserialize(
@@ -1965,7 +2079,7 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow):
(substate_schema, state) = pickle.load(fp)
else:
raise ValueError("Only one of `data` or `fp` must be provided")
- if substate_schema != state_to_schema(state):
+ if substate_schema != state._to_schema():
raise StateSchemaMismatchError()
return state
@@ -2126,10 +2240,13 @@ class ComponentState(State, mixin=True):
cls._per_component_state_instance_count += 1
state_cls_name = f"{cls.__name__}_n{cls._per_component_state_instance_count}"
component_state = type(
- state_cls_name, (cls, State), {"__module__": __name__}, mixin=False
+ state_cls_name,
+ (cls, State),
+ {"__module__": reflex.istate.dynamic.__name__},
+ mixin=False,
)
# Save a reference to the dynamic state for pickle/unpickle.
- globals()[state_cls_name] = component_state
+ setattr(reflex.istate.dynamic, state_cls_name, component_state)
component = component_state.get_component(*children, **props)
component.State = component_state
return component
@@ -2442,20 +2559,32 @@ class StateManager(Base, ABC):
Args:
state: The state class to use.
+ Raises:
+ InvalidStateManagerMode: If the state manager mode is invalid.
+
Returns:
- The state manager (either memory or redis).
+ The state manager (either disk, memory or redis).
"""
- redis = prerequisites.get_redis()
- if redis is not None:
- # make sure expiration values are obtained only from the config object on creation
- config = get_config()
- return StateManagerRedis(
- state=state,
- redis=redis,
- token_expiration=config.redis_token_expiration,
- lock_expiration=config.redis_lock_expiration,
- )
- return StateManagerDisk(state=state)
+ config = get_config()
+ if prerequisites.parse_redis_url() is not None:
+ config.state_manager_mode = constants.StateManagerMode.REDIS
+ if config.state_manager_mode == constants.StateManagerMode.MEMORY:
+ return StateManagerMemory(state=state)
+ if config.state_manager_mode == constants.StateManagerMode.DISK:
+ return StateManagerDisk(state=state)
+ if config.state_manager_mode == constants.StateManagerMode.REDIS:
+ redis = prerequisites.get_redis()
+ if redis is not None:
+ # make sure expiration values are obtained only from the config object on creation
+ return StateManagerRedis(
+ state=state,
+ redis=redis,
+ token_expiration=config.redis_token_expiration,
+ lock_expiration=config.redis_lock_expiration,
+ )
+ raise InvalidStateManagerMode(
+ f"Expected one of: DISK, MEMORY, REDIS, got {config.state_manager_mode}"
+ )
@abstractmethod
async def get_state(self, token: str) -> BaseState:
@@ -2600,35 +2729,6 @@ def is_serializable(value: Any) -> bool:
return False
-def state_to_schema(
- state: BaseState,
-) -> List[Tuple[str, str, Any, Union[bool, None], Any]]:
- """Convert a state to a schema.
-
- Args:
- state: The state to convert to a schema.
-
- Returns:
- The schema.
- """
- return list(
- sorted(
- (
- field_name,
- model_field.name,
- _serialize_type(model_field.type_),
- (
- model_field.required
- if isinstance(model_field.required, bool)
- else None
- ),
- (model_field.default if is_serializable(model_field.default) else None),
- )
- for field_name, model_field in state.__fields__.items()
- )
- )
-
-
def reset_disk_state_manager():
"""Reset the disk state manager."""
states_directory = prerequisites.get_web_dir() / constants.Dirs.STATES
@@ -2711,34 +2811,24 @@ class StateManagerDisk(StateManager):
self.states_directory / f"{md5(token.encode()).hexdigest()}.pkl"
).absolute()
- async def load_state(self, token: str, root_state: BaseState) -> BaseState:
+ async def load_state(self, token: str) -> BaseState | None:
"""Load a state object based on the provided token.
Args:
token: The token used to identify the state object.
- root_state: The root state object.
Returns:
- The loaded state object.
+ The loaded state object or None.
"""
- if token in self.states:
- return self.states[token]
-
- client_token, substate_address = _split_substate_key(token)
-
token_path = self.token_path(token)
if token_path.exists():
try:
with token_path.open(mode="rb") as file:
- substate = BaseState._deserialize(fp=file)
- await self.populate_substates(client_token, substate, root_state)
- return substate
+ return BaseState._deserialize(fp=file)
except Exception:
pass
- return root_state.get_substate(substate_address.split(".")[1:])
-
async def populate_substates(
self, client_token: str, state: BaseState, root_state: BaseState
):
@@ -2752,10 +2842,13 @@ class StateManagerDisk(StateManager):
for substate in state.get_substates():
substate_token = _substate_key(client_token, substate)
- substate = await self.load_state(substate_token, root_state)
+ instance = await self.load_state(substate_token)
+ if instance is None:
+ instance = await root_state.get_state(substate)
+ state.substates[substate.get_name()] = instance
+ instance.parent_state = state
- state.substates[substate.get_name()] = substate
- substate.parent_state = state
+ await self.populate_substates(client_token, instance, root_state)
@override
async def get_state(
@@ -2770,15 +2863,24 @@ class StateManagerDisk(StateManager):
Returns:
The state for the token.
"""
- client_token, substate_address = _split_substate_key(token)
+ client_token = _split_substate_key(token)[0]
+ root_state = self.states.get(client_token)
+ if root_state is not None:
+ # Retrieved state from memory.
+ return root_state
- root_state_token = _substate_key(client_token, substate_address.split(".")[0])
- root_state = self.states.get(root_state_token)
+ # Deserialize root state from disk.
+ root_state = await self.load_state(_substate_key(client_token, self.state))
+ # Create a new root state tree with all substates instantiated.
+ fresh_root_state = self.state(_reflex_internal_init=True)
if root_state is None:
- # Create a new root state which will be persisted in the next set_state call.
- root_state = self.state(_reflex_internal_init=True)
-
- return await self.load_state(root_state_token, root_state)
+ root_state = fresh_root_state
+ else:
+ # Ensure all substates exist, even if they were not serialized previously.
+ root_state.substates = fresh_root_state.substates
+ self.states[client_token] = root_state
+ await self.populate_substates(client_token, root_state, root_state)
+ return root_state
async def set_state_for_substate(self, client_token: str, substate: BaseState):
"""Set the state for a substate.
@@ -2789,12 +2891,13 @@ class StateManagerDisk(StateManager):
"""
substate_token = _substate_key(client_token, substate)
- self.states[substate_token] = substate
-
- state_dilled = substate._serialize()
- if not self.states_directory.exists():
- self.states_directory.mkdir(parents=True, exist_ok=True)
- self.token_path(substate_token).write_bytes(state_dilled)
+ if substate._get_was_touched():
+ substate._was_touched = False # Reset the touched flag after serializing.
+ pickle_state = substate._serialize()
+ if pickle_state:
+ if not self.states_directory.exists():
+ self.states_directory.mkdir(parents=True, exist_ok=True)
+ self.token_path(substate_token).write_bytes(pickle_state)
for substate_substate in substate.substates.values():
await self.set_state_for_substate(client_token, substate_substate)
@@ -2874,11 +2977,14 @@ class StateManagerRedis(StateManager):
# Only warn about each state class size once.
_warned_about_state_size: ClassVar[Set[str]] = set()
- async def _get_parent_state(self, token: str) -> BaseState | None:
+ async def _get_parent_state(
+ self, token: str, state: BaseState | None = None
+ ) -> BaseState | None:
"""Get the parent state for the state requested in the token.
Args:
token: The token to get the state for (_substate_key).
+ state: The state instance to get parent state for.
Returns:
The parent state for the state requested by the token or None if there is no such parent.
@@ -2887,11 +2993,15 @@ class StateManagerRedis(StateManager):
client_token, state_path = _split_substate_key(token)
parent_state_name = state_path.rpartition(".")[0]
if parent_state_name:
+ cached_substates = None
+ if state is not None:
+ cached_substates = [state]
# Retrieve the parent state to populate event handlers onto this substate.
parent_state = await self.get_state(
token=_substate_key(client_token, parent_state_name),
top_level=False,
get_substates=False,
+ cached_substates=cached_substates,
)
return parent_state
@@ -2923,6 +3033,8 @@ class StateManagerRedis(StateManager):
tasks = {}
# Retrieve the necessary substates from redis.
for substate_cls in fetch_substates:
+ if substate_cls.get_name() in state.substates:
+ continue
substate_name = substate_cls.get_name()
tasks[substate_name] = asyncio.create_task(
self.get_state(
@@ -2943,6 +3055,7 @@ class StateManagerRedis(StateManager):
top_level: bool = True,
get_substates: bool = True,
parent_state: BaseState | None = None,
+ cached_substates: list[BaseState] | None = None,
) -> BaseState:
"""Get the state for a token.
@@ -2951,6 +3064,7 @@ class StateManagerRedis(StateManager):
top_level: If true, return an instance of the top-level state (self.state).
get_substates: If true, also retrieve substates.
parent_state: If provided, use this parent_state instead of getting it from redis.
+ cached_substates: If provided, attach these substates to the state.
Returns:
The state for the token.
@@ -2968,45 +3082,38 @@ class StateManagerRedis(StateManager):
"StateManagerRedis requires token to be specified in the form of {token}_{state_full_name}"
)
+ # The deserialized or newly created (sub)state instance.
+ state = None
+
# Fetch the serialized substate from redis.
redis_state = await self.redis.get(token)
if redis_state is not None:
# Deserialize the substate.
- state = BaseState._deserialize(data=redis_state)
-
- # Populate parent state if missing and requested.
- if parent_state is None:
- parent_state = await self._get_parent_state(token)
- # Set up Bidirectional linkage between this state and its parent.
- if parent_state is not None:
- parent_state.substates[state.get_name()] = state
- state.parent_state = parent_state
- # Populate substates if requested.
- await self._populate_substates(token, state, all_substates=get_substates)
-
- # To retain compatibility with previous implementation, by default, we return
- # the top-level state by chasing `parent_state` pointers up the tree.
- if top_level:
- return state._get_root_state()
- return state
-
- # TODO: dedupe the following logic with the above block
- # Key didn't exist so we have to create a new instance for this token.
+ with contextlib.suppress(StateSchemaMismatchError):
+ state = BaseState._deserialize(data=redis_state)
+ if state is None:
+ # Key didn't exist or schema mismatch so create a new instance for this token.
+ state = state_cls(
+ init_substates=False,
+ _reflex_internal_init=True,
+ )
+ # Populate parent state if missing and requested.
if parent_state is None:
- parent_state = await self._get_parent_state(token)
- # Instantiate the new state class (but don't persist it yet).
- state = state_cls(
- parent_state=parent_state,
- init_substates=False,
- _reflex_internal_init=True,
- )
+ parent_state = await self._get_parent_state(token, state)
# Set up Bidirectional linkage between this state and its parent.
if parent_state is not None:
parent_state.substates[state.get_name()] = state
state.parent_state = parent_state
- # Populate substates for the newly created state.
+ # Avoid fetching substates multiple times.
+ if cached_substates:
+ for substate in cached_substates:
+ state.substates[substate.get_name()] = substate
+ if substate.parent_state is None:
+ substate.parent_state = state
+ # Populate substates if requested.
await self._populate_substates(token, state, all_substates=get_substates)
+
# To retain compatibility with previous implementation, by default, we return
# the top-level state by chasing `parent_state` pointers up the tree.
if top_level:
@@ -3087,11 +3194,12 @@ class StateManagerRedis(StateManager):
if state._get_was_touched():
pickle_state = state._serialize()
self._warn_if_too_large(state, len(pickle_state))
- await self.redis.set(
- _substate_key(client_token, state),
- pickle_state,
- ex=self.token_expiration,
- )
+ if pickle_state:
+ await self.redis.set(
+ _substate_key(client_token, state),
+ pickle_state,
+ ex=self.token_expiration,
+ )
# Wait for substates to be persisted.
for t in tasks:
@@ -3166,11 +3274,7 @@ class StateManagerRedis(StateManager):
)
except ResponseError:
# Some redis servers only allow out-of-band configuration, so ignore errors here.
- ignore_config_error = os.environ.get(
- "REFLEX_IGNORE_REDIS_CONFIG_ERROR",
- None,
- )
- if not ignore_config_error:
+ if not environment.REFLEX_IGNORE_REDIS_CONFIG_ERROR:
raise
async with self.redis.pubsub() as pubsub:
await pubsub.psubscribe(lock_key_channel)
diff --git a/reflex/style.py b/reflex/style.py
index 4ebd42ac3..8e24e9b6b 100644
--- a/reflex/style.py
+++ b/reflex/style.py
@@ -10,6 +10,7 @@ from reflex.event import EventChain, EventHandler
from reflex.utils import format
from reflex.utils.exceptions import ReflexError
from reflex.utils.imports import ImportVar
+from reflex.utils.types import get_origin
from reflex.vars import VarData
from reflex.vars.base import CallableVar, LiteralVar, Var
from reflex.vars.function import FunctionVar
@@ -196,6 +197,10 @@ def convert(
isinstance(value, Breakpoints)
and all(not isinstance(v, dict) for v in value.values())
)
+ or (
+ isinstance(value, ObjectVar)
+ and not issubclass(get_origin(value._var_type) or value._var_type, dict)
+ )
else (key,)
)
diff --git a/reflex/testing.py b/reflex/testing.py
index bdbd3dc94..6a45c51eb 100644
--- a/reflex/testing.py
+++ b/reflex/testing.py
@@ -292,8 +292,6 @@ class AppHarness:
if isinstance(self.app_instance._state_manager, StateManagerRedis):
# Create our own redis connection for testing.
self.state_manager = StateManagerRedis.create(self.app_instance.state)
- elif isinstance(self.app_instance._state_manager, StateManagerDisk):
- self.state_manager = StateManagerDisk.create(self.app_instance.state)
else:
self.state_manager = self.app_instance._state_manager
@@ -396,9 +394,14 @@ class AppHarness:
def consume_frontend_output():
while True:
- line = (
- self.frontend_process.stdout.readline() # pyright: ignore [reportOptionalMemberAccess]
- )
+ try:
+ line = (
+ self.frontend_process.stdout.readline() # pyright: ignore [reportOptionalMemberAccess]
+ )
+ # catch I/O operation on closed file.
+ except ValueError as e:
+ print(e)
+ break
if not line:
break
print(line)
diff --git a/reflex/utils/build.py b/reflex/utils/build.py
index 770809015..14709d99c 100644
--- a/reflex/utils/build.py
+++ b/reflex/utils/build.py
@@ -23,18 +23,6 @@ def set_env_json():
)
-def set_os_env(**kwargs):
- """Set os environment variables.
-
- Args:
- kwargs: env key word args.
- """
- for key, value in kwargs.items():
- if not value:
- continue
- os.environ[key.upper()] = value
-
-
def generate_sitemap_config(deploy_url: str, export=False):
"""Generate the sitemap config file.
diff --git a/reflex/utils/compat.py b/reflex/utils/compat.py
index 27c4753db..e63492a6b 100644
--- a/reflex/utils/compat.py
+++ b/reflex/utils/compat.py
@@ -19,10 +19,13 @@ async def windows_hot_reload_lifespan_hack():
import asyncio
import sys
- while True:
- sys.stderr.write("\0")
- sys.stderr.flush()
- await asyncio.sleep(0.5)
+ try:
+ while True:
+ sys.stderr.write("\0")
+ sys.stderr.flush()
+ await asyncio.sleep(0.5)
+ except asyncio.CancelledError:
+ pass
@contextlib.contextmanager
@@ -84,6 +87,4 @@ def sqlmodel_field_has_primary_key(field) -> bool:
return True
if getattr(field.field_info, "sa_column", None) is None:
return False
- if getattr(field.field_info.sa_column, "primary_key", None) is True:
- return True
- return False
+ return bool(getattr(field.field_info.sa_column, "primary_key", None))
diff --git a/reflex/utils/exceptions.py b/reflex/utils/exceptions.py
index 8bce605b5..cd3d108b4 100644
--- a/reflex/utils/exceptions.py
+++ b/reflex/utils/exceptions.py
@@ -5,6 +5,14 @@ class ReflexError(Exception):
"""Base exception for all Reflex exceptions."""
+class ConfigError(ReflexError):
+ """Custom exception for config related errors."""
+
+
+class InvalidStateManagerMode(ReflexError, ValueError):
+ """Raised when an invalid state manager mode is provided."""
+
+
class ReflexRuntimeError(ReflexError, RuntimeError):
"""Custom RuntimeError for Reflex."""
@@ -127,3 +135,7 @@ class SetUndefinedStateVarError(ReflexError, AttributeError):
class StateSchemaMismatchError(ReflexError, TypeError):
"""Raised when the serialized schema of a state class does not match the current schema."""
+
+
+class EnvironmentVarValueError(ReflexError, ValueError):
+ """Raised when an environment variable is set to an invalid value."""
diff --git a/reflex/utils/exec.py b/reflex/utils/exec.py
index acb69ee19..f5521c91f 100644
--- a/reflex/utils/exec.py
+++ b/reflex/utils/exec.py
@@ -15,7 +15,7 @@ from urllib.parse import urljoin
import psutil
from reflex import constants
-from reflex.config import get_config
+from reflex.config import environment, get_config
from reflex.constants.base import LogLevel
from reflex.utils import console, path_ops
from reflex.utils.prerequisites import get_web_dir
@@ -184,7 +184,7 @@ def should_use_granian():
Returns:
True if Granian should be used.
"""
- return os.getenv("REFLEX_USE_GRANIAN", "0") == "1"
+ return environment.REFLEX_USE_GRANIAN
def get_app_module():
@@ -496,6 +496,24 @@ def is_prod_mode() -> bool:
return current_mode == constants.Env.PROD.value
+def is_frontend_only() -> bool:
+ """Check if the app is running in frontend-only mode.
+
+ Returns:
+ True if the app is running in frontend-only mode.
+ """
+ return os.environ.get(constants.ENV_FRONTEND_ONLY_ENV_VAR, "").lower() == "true"
+
+
+def is_backend_only() -> bool:
+ """Check if the app is running in backend-only mode.
+
+ Returns:
+ True if the app is running in backend-only mode.
+ """
+ return os.environ.get(constants.ENV_BACKEND_ONLY_ENV_VAR, "").lower() == "true"
+
+
def should_skip_compile() -> bool:
"""Whether the app should skip compile.
diff --git a/reflex/utils/net.py b/reflex/utils/net.py
index 83e25559c..2c6f22764 100644
--- a/reflex/utils/net.py
+++ b/reflex/utils/net.py
@@ -1,9 +1,8 @@
"""Helpers for downloading files from the network."""
-import os
-
import httpx
+from ..config import environment
from . import console
@@ -13,8 +12,7 @@ def _httpx_verify_kwarg() -> bool:
Returns:
True if SSL verification is enabled, False otherwise
"""
- ssl_no_verify = os.environ.get("SSL_NO_VERIFY", "").lower() in ["true", "1", "yes"]
- return not ssl_no_verify
+ return not environment.SSL_NO_VERIFY
def get(url: str, **kwargs) -> httpx.Response:
diff --git a/reflex/utils/path_ops.py b/reflex/utils/path_ops.py
index 1de635b88..ee93b24cf 100644
--- a/reflex/utils/path_ops.py
+++ b/reflex/utils/path_ops.py
@@ -9,6 +9,7 @@ import shutil
from pathlib import Path
from reflex import constants
+from reflex.config import environment
# Shorthand for join.
join = os.linesep.join
@@ -129,30 +130,13 @@ def which(program: str | Path) -> str | Path | None:
return shutil.which(str(program))
-def use_system_install(var_name: str) -> bool:
- """Check if the system install should be used.
-
- Args:
- var_name: The name of the environment variable.
-
- Raises:
- ValueError: If the variable name is invalid.
-
- Returns:
- Whether the associated env var should use the system install.
- """
- if not var_name.startswith("REFLEX_USE_SYSTEM_"):
- raise ValueError("Invalid system install variable name.")
- return os.getenv(var_name, "").lower() in ["true", "1", "yes"]
-
-
def use_system_node() -> bool:
"""Check if the system node should be used.
Returns:
Whether the system node should be used.
"""
- return use_system_install(constants.Node.USE_SYSTEM_VAR)
+ return environment.REFLEX_USE_SYSTEM_NODE
def use_system_bun() -> bool:
@@ -161,7 +145,7 @@ def use_system_bun() -> bool:
Returns:
Whether the system bun should be used.
"""
- return use_system_install(constants.Bun.USE_SYSTEM_VAR)
+ return environment.REFLEX_USE_SYSTEM_BUN
def get_node_bin_path() -> Path | None:
@@ -185,7 +169,8 @@ def get_node_path() -> str | None:
"""
node_path = Path(constants.Node.PATH)
if use_system_node() or not node_path.exists():
- return str(which("node"))
+ system_node_path = which("node")
+ return str(system_node_path) if system_node_path else None
return str(node_path)
@@ -196,8 +181,9 @@ def get_npm_path() -> str | None:
The path to the npm binary file.
"""
npm_path = Path(constants.Node.NPM_PATH)
- if not npm_path.exists():
- return str(which("npm"))
+ if use_system_node() or not npm_path.exists():
+ system_npm_path = which("npm")
+ return str(system_npm_path) if system_npm_path else None
return str(npm_path)
@@ -218,7 +204,7 @@ def update_json_file(file_path: str | Path, update_dict: dict[str, int | str]):
# Read the existing json object from the file.
json_object = {}
- if fp.stat().st_size == 0:
+ if fp.stat().st_size:
with open(fp) as f:
json_object = json.load(f)
diff --git a/reflex/utils/prerequisites.py b/reflex/utils/prerequisites.py
index 3c2875204..33165af0e 100644
--- a/reflex/utils/prerequisites.py
+++ b/reflex/utils/prerequisites.py
@@ -33,11 +33,11 @@ from redis.asyncio import Redis
from reflex import constants, model
from reflex.compiler import templates
-from reflex.config import Config, get_config
+from reflex.config import Config, environment, get_config
from reflex.utils import console, net, path_ops, processes
from reflex.utils.exceptions import GeneratedCodeHasNoFunctionDefs
from reflex.utils.format import format_library_name
-from reflex.utils.registry import _get_best_registry
+from reflex.utils.registry import _get_npm_registry
CURRENTLY_INSTALLING_NODE = False
@@ -69,8 +69,7 @@ def get_web_dir() -> Path:
Returns:
The working directory.
"""
- workdir = Path(os.getenv("REFLEX_WEB_WORKDIR", constants.Dirs.WEB))
- return workdir
+ return environment.REFLEX_WEB_WORKDIR
def _python_version_check():
@@ -146,14 +145,9 @@ def check_node_version() -> bool:
Whether the version of Node.js is valid.
"""
current_version = get_node_version()
- if current_version:
- # Compare the version numbers
- return (
- current_version >= version.parse(constants.Node.MIN_VERSION)
- if constants.IS_WINDOWS or path_ops.use_system_node()
- else current_version == version.parse(constants.Node.VERSION)
- )
- return False
+ return current_version is not None and current_version >= version.parse(
+ constants.Node.MIN_VERSION
+ )
def get_node_version() -> version.Version | None:
@@ -255,7 +249,7 @@ def windows_npm_escape_hatch() -> bool:
Returns:
If the user has set REFLEX_USE_NPM.
"""
- return os.environ.get("REFLEX_USE_NPM", "").lower() in ["true", "1", "yes"]
+ return environment.REFLEX_USE_NPM
def get_app(reload: bool = False) -> ModuleType:
@@ -620,7 +614,7 @@ def initialize_package_json():
code = _compile_package_json()
output_path.write_text(code)
- best_registry = _get_best_registry()
+ best_registry = _get_npm_registry()
bun_config_path = get_web_dir() / constants.Bun.CONFIG_PATH
bun_config_path.write_text(
f"""
@@ -997,7 +991,7 @@ def needs_reinit(frontend: bool = True) -> bool:
return False
# Make sure the .reflex directory exists.
- if not constants.Reflex.DIR.exists():
+ if not environment.REFLEX_DIR.exists():
return True
# Make sure the .web directory exists in frontend mode.
@@ -1102,7 +1096,7 @@ def ensure_reflex_installation_id() -> Optional[int]:
"""
try:
initialize_reflex_user_directory()
- installation_id_file = constants.Reflex.DIR / "installation_id"
+ installation_id_file = environment.REFLEX_DIR / "installation_id"
installation_id = None
if installation_id_file.exists():
@@ -1127,7 +1121,7 @@ def ensure_reflex_installation_id() -> Optional[int]:
def initialize_reflex_user_directory():
"""Initialize the reflex user directory."""
# Create the reflex directory.
- path_ops.mkdir(constants.Reflex.DIR)
+ path_ops.mkdir(environment.REFLEX_DIR)
def initialize_frontend_dependencies():
@@ -1150,7 +1144,7 @@ def check_db_initialized() -> bool:
Returns:
True if alembic is initialized (or if database is not used).
"""
- if get_config().db_url is not None and not Path(constants.ALEMBIC_CONFIG).exists():
+ if get_config().db_url is not None and not environment.ALEMBIC_CONFIG.exists():
console.error(
"Database is not initialized. Run [bold]reflex db init[/bold] first."
)
@@ -1160,7 +1154,7 @@ def check_db_initialized() -> bool:
def check_schema_up_to_date():
"""Check if the sqlmodel metadata matches the current database schema."""
- if get_config().db_url is None or not Path(constants.ALEMBIC_CONFIG).exists():
+ if get_config().db_url is None or not environment.ALEMBIC_CONFIG.exists():
return
with model.Model.get_db_engine().connect() as connection:
try:
diff --git a/reflex/utils/pyi_generator.py b/reflex/utils/pyi_generator.py
index 3c00b0427..fd76576b9 100644
--- a/reflex/utils/pyi_generator.py
+++ b/reflex/utils/pyi_generator.py
@@ -70,7 +70,7 @@ DEFAULT_TYPING_IMPORTS = {
DEFAULT_IMPORTS = {
"typing": sorted(DEFAULT_TYPING_IMPORTS),
"reflex.components.core.breakpoints": ["Breakpoints"],
- "reflex.event": ["EventChain", "EventHandler", "EventSpec"],
+ "reflex.event": ["EventChain", "EventHandler", "EventSpec", "EventType"],
"reflex.style": ["Style"],
"reflex.vars.base": ["Var"],
}
@@ -427,18 +427,58 @@ def _generate_component_create_functiondef(
all_props = [arg[0].arg for arg in prop_kwargs]
kwargs.extend(prop_kwargs)
+ def figure_out_return_type(annotation: Any):
+ if inspect.isclass(annotation) and issubclass(annotation, inspect._empty):
+ return ast.Name(id="Optional[EventType]")
+ if isinstance(annotation, str) and annotation.startswith("Tuple["):
+ inside_of_tuple = annotation.removeprefix("Tuple[").removesuffix("]")
+
+ if inside_of_tuple == "()":
+ return ast.Name(id="Optional[EventType[[]]]")
+
+ arguments: list[str] = [""]
+
+ bracket_count = 0
+
+ for char in inside_of_tuple:
+ if char == "[":
+ bracket_count += 1
+ elif char == "]":
+ bracket_count -= 1
+
+ if char == "," and bracket_count == 0:
+ arguments.append("")
+ else:
+ arguments[-1] += char
+
+ arguments = [argument.strip() for argument in arguments]
+
+ arguments_without_var = [
+ argument.removeprefix("Var[").removesuffix("]")
+ if argument.startswith("Var[")
+ else argument
+ for argument in arguments
+ ]
+
+ return ast.Name(
+ id=f"Optional[EventType[{', '.join(arguments_without_var)}]]"
+ )
+ return ast.Name(id="Optional[EventType]")
+
+ event_triggers = clz().get_event_triggers()
+
# event handler kwargs
kwargs.extend(
(
ast.arg(
arg=trigger,
- annotation=ast.Name(
- id="Optional[Union[EventHandler, EventSpec, list, Callable, Var]]"
+ annotation=figure_out_return_type(
+ inspect.signature(event_triggers[trigger]).return_annotation
),
),
ast.Constant(value=None),
)
- for trigger in sorted(clz().get_event_triggers())
+ for trigger in sorted(event_triggers)
)
logger.debug(f"Generated {clz.__name__}.create method with {len(kwargs)} kwargs")
create_args = ast.arguments(
diff --git a/reflex/utils/registry.py b/reflex/utils/registry.py
index 551292f2d..77c3d31cd 100644
--- a/reflex/utils/registry.py
+++ b/reflex/utils/registry.py
@@ -2,7 +2,8 @@
import httpx
-from reflex.utils import console
+from reflex.config import environment
+from reflex.utils import console, net
def latency(registry: str) -> int:
@@ -15,7 +16,7 @@ def latency(registry: str) -> int:
int: The latency of the registry in microseconds.
"""
try:
- return httpx.get(registry).elapsed.microseconds
+ return net.get(registry).elapsed.microseconds
except httpx.HTTPError:
console.info(f"Failed to connect to {registry}.")
return 10_000_000
@@ -34,7 +35,7 @@ def average_latency(registry, attempts: int = 3) -> int:
return sum(latency(registry) for _ in range(attempts)) // attempts
-def _get_best_registry() -> str:
+def get_best_registry() -> str:
"""Get the best registry based on latency.
Returns:
@@ -46,3 +47,12 @@ def _get_best_registry() -> str:
]
return min(registries, key=average_latency)
+
+
+def _get_npm_registry() -> str:
+ """Get npm registry. If environment variable is set, use it first.
+
+ Returns:
+ str:
+ """
+ return environment.NPM_CONFIG_REGISTRY or get_best_registry()
diff --git a/reflex/utils/telemetry.py b/reflex/utils/telemetry.py
index af3994ff8..9ae165ea2 100644
--- a/reflex/utils/telemetry.py
+++ b/reflex/utils/telemetry.py
@@ -94,9 +94,7 @@ def _raise_on_missing_project_hash() -> bool:
False when compilation should be skipped (i.e. no .web directory is required).
Otherwise return True.
"""
- if should_skip_compile():
- return False
- return True
+ return not should_skip_compile()
def _prepare_event(event: str, **kwargs) -> dict:
diff --git a/reflex/utils/types.py b/reflex/utils/types.py
index 41e1ed49a..3d7992011 100644
--- a/reflex/utils/types.py
+++ b/reflex/utils/types.py
@@ -18,6 +18,7 @@ from typing import (
List,
Literal,
Optional,
+ Sequence,
Tuple,
Type,
Union,
@@ -102,14 +103,14 @@ if TYPE_CHECKING:
# ArgsSpec = Callable[[Var], list[Var]]
ArgsSpec = (
- Callable[[], List[Var]]
- | Callable[[Var], List[Var]]
- | Callable[[Var, Var], List[Var]]
- | Callable[[Var, Var, Var], List[Var]]
- | Callable[[Var, Var, Var, Var], List[Var]]
- | Callable[[Var, Var, Var, Var, Var], List[Var]]
- | Callable[[Var, Var, Var, Var, Var, Var], List[Var]]
- | Callable[[Var, Var, Var, Var, Var, Var, Var], List[Var]]
+ Callable[[], Sequence[Var]]
+ | Callable[[Var], Sequence[Var]]
+ | Callable[[Var, Var], Sequence[Var]]
+ | Callable[[Var, Var, Var], Sequence[Var]]
+ | Callable[[Var, Var, Var, Var], Sequence[Var]]
+ | Callable[[Var, Var, Var, Var, Var], Sequence[Var]]
+ | Callable[[Var, Var, Var, Var, Var, Var], Sequence[Var]]
+ | Callable[[Var, Var, Var, Var, Var, Var, Var], Sequence[Var]]
)
else:
ArgsSpec = Callable[..., List[Any]]
@@ -182,6 +183,26 @@ def is_generic_alias(cls: GenericType) -> bool:
return isinstance(cls, GenericAliasTypes)
+def unionize(*args: GenericType) -> Type:
+ """Unionize the types.
+
+ Args:
+ args: The types to unionize.
+
+ Returns:
+ The unionized types.
+ """
+ if not args:
+ return Any
+ if len(args) == 1:
+ return args[0]
+ # We are bisecting the args list here to avoid hitting the recursion limit
+ # In Python versions >= 3.11, we can simply do `return Union[*args]`
+ midpoint = len(args) // 2
+ first_half, second_half = args[:midpoint], args[midpoint:]
+ return Union[unionize(*first_half), unionize(*second_half)]
+
+
def is_none(cls: GenericType) -> bool:
"""Check if a class is None.
@@ -220,6 +241,27 @@ def is_literal(cls: GenericType) -> bool:
return get_origin(cls) is Literal
+def has_args(cls) -> bool:
+ """Check if the class has generic parameters.
+
+ Args:
+ cls: The class to check.
+
+ Returns:
+ Whether the class has generic
+ """
+ if get_args(cls):
+ return True
+
+ # Check if the class inherits from a generic class (using __orig_bases__)
+ if hasattr(cls, "__orig_bases__"):
+ for base in cls.__orig_bases__:
+ if get_args(base):
+ return True
+
+ return False
+
+
def is_optional(cls: GenericType) -> bool:
"""Check if a class is an Optional.
@@ -232,6 +274,20 @@ def is_optional(cls: GenericType) -> bool:
return is_union(cls) and type(None) in get_args(cls)
+def value_inside_optional(cls: GenericType) -> GenericType:
+ """Get the value inside an Optional type or the original type.
+
+ Args:
+ cls: The class to check.
+
+ Returns:
+ The value inside the Optional type or the original type.
+ """
+ if is_union(cls) and len(args := get_args(cls)) >= 2 and type(None) in args:
+ return unionize(*[arg for arg in args if arg is not type(None)])
+ return cls
+
+
def get_property_hint(attr: Any | None) -> GenericType | None:
"""Check if an attribute is a property and return its type hint.
@@ -337,11 +393,9 @@ def get_attribute_access_type(cls: GenericType, name: str) -> GenericType | None
return type_
elif is_union(cls):
# Check in each arg of the annotation.
- for arg in get_args(cls):
- type_ = get_attribute_access_type(arg, name)
- if type_ is not None:
- # Return the first attribute type that is accessible.
- return type_
+ return unionize(
+ *(get_attribute_access_type(arg, name) for arg in get_args(cls))
+ )
elif isinstance(cls, type):
# Bare class
if sys.version_info >= (3, 10):
@@ -374,7 +428,7 @@ def get_base_class(cls: GenericType) -> Type:
if is_literal(cls):
# only literals of the same type are supported.
arg_type = type(get_args(cls)[0])
- if not all(type(arg) == arg_type for arg in get_args(cls)):
+ if not all(type(arg) is arg_type for arg in get_args(cls)):
raise TypeError("only literals of the same type are supported")
return type(get_args(cls)[0])
@@ -525,7 +579,11 @@ def is_backend_base_variable(name: str, cls: Type) -> bool:
if name.startswith(f"_{cls.__name__}__"):
return False
- hints = get_type_hints(cls)
+ # Extract the namespace of the original module if defined (dynamic substates).
+ if callable(getattr(cls, "_get_type_hints", None)):
+ hints = cls._get_type_hints()
+ else:
+ hints = get_type_hints(cls)
if name in hints:
hint = get_origin(hints[name])
if hint == ClassVar:
@@ -538,7 +596,7 @@ def is_backend_base_variable(name: str, cls: Type) -> bool:
if name in cls.__dict__:
value = cls.__dict__[name]
- if type(value) == classmethod:
+ if type(value) is classmethod:
return False
if callable(value):
return False
diff --git a/reflex/vars/__init__.py b/reflex/vars/__init__.py
index 56d304cd6..1a4cebe19 100644
--- a/reflex/vars/__init__.py
+++ b/reflex/vars/__init__.py
@@ -1,8 +1,10 @@
"""Immutable-Based Var System."""
+from .base import Field as Field
from .base import LiteralVar as LiteralVar
from .base import Var as Var
from .base import VarData as VarData
+from .base import field as field
from .base import get_unique_variable_name as get_unique_variable_name
from .base import get_uuid_string_var as get_uuid_string_var
from .base import var_operation as var_operation
diff --git a/reflex/vars/base.py b/reflex/vars/base.py
index 7eab62c68..cf02863c3 100644
--- a/reflex/vars/base.py
+++ b/reflex/vars/base.py
@@ -56,7 +56,7 @@ from reflex.utils.imports import (
ParsedImportDict,
parse_imports,
)
-from reflex.utils.types import GenericType, Self, get_origin
+from reflex.utils.types import GenericType, Self, get_origin, has_args, unionize
if TYPE_CHECKING:
from reflex.state import BaseState
@@ -239,7 +239,7 @@ class Var(Generic[VAR_TYPE]):
**kwargs,
)
- if (js_expr := kwargs.get("_js_expr", None)) is not None:
+ if (js_expr := kwargs.get("_js_expr")) is not None:
object.__setattr__(value_with_replaced, "_js_expr", js_expr)
return value_with_replaced
@@ -429,71 +429,75 @@ class Var(Generic[VAR_TYPE]):
return self.to(EventVar, output)
if fixed_output_type is EventChain:
return self.to(EventChainVar, output)
- if issubclass(fixed_output_type, Base):
- return self.to(ObjectVar, output)
+ try:
+ if issubclass(fixed_output_type, Base):
+ return self.to(ObjectVar, output)
+ except TypeError:
+ pass
if dataclasses.is_dataclass(fixed_output_type) and not issubclass(
fixed_output_type, Var
):
return self.to(ObjectVar, output)
- if issubclass(output, BooleanVar):
- return ToBooleanVarOperation.create(self)
+ if inspect.isclass(output):
+ if issubclass(output, BooleanVar):
+ return ToBooleanVarOperation.create(self)
- if issubclass(output, NumberVar):
- if fixed_type is not None:
- if fixed_type is Union:
- inner_types = get_args(base_type)
- if not all(issubclass(t, (int, float)) for t in inner_types):
+ if issubclass(output, NumberVar):
+ if fixed_type is not None:
+ if fixed_type in types.UnionTypes:
+ inner_types = get_args(base_type)
+ if not all(issubclass(t, (int, float)) for t in inner_types):
+ raise TypeError(
+ f"Unsupported type {var_type} for NumberVar. Must be int or float."
+ )
+
+ elif not issubclass(fixed_type, (int, float)):
raise TypeError(
f"Unsupported type {var_type} for NumberVar. Must be int or float."
)
+ return ToNumberVarOperation.create(self, var_type or float)
- elif not issubclass(fixed_type, (int, float)):
+ if issubclass(output, ArrayVar):
+ if fixed_type is not None and not issubclass(
+ fixed_type, (list, tuple, set)
+ ):
raise TypeError(
- f"Unsupported type {var_type} for NumberVar. Must be int or float."
+ f"Unsupported type {var_type} for ArrayVar. Must be list, tuple, or set."
)
- return ToNumberVarOperation.create(self, var_type or float)
+ return ToArrayOperation.create(self, var_type or list)
- if issubclass(output, ArrayVar):
- if fixed_type is not None and not issubclass(
- fixed_type, (list, tuple, set)
- ):
- raise TypeError(
- f"Unsupported type {var_type} for ArrayVar. Must be list, tuple, or set."
+ if issubclass(output, StringVar):
+ return ToStringOperation.create(self, var_type or str)
+
+ if issubclass(output, EventVar):
+ return ToEventVarOperation.create(self, var_type or EventSpec)
+
+ if issubclass(output, EventChainVar):
+ return ToEventChainVarOperation.create(self, var_type or EventChain)
+
+ if issubclass(output, (ObjectVar, Base)):
+ return ToObjectOperation.create(self, var_type or dict)
+
+ if issubclass(output, FunctionVar):
+ # if fixed_type is not None and not issubclass(fixed_type, Callable):
+ # raise TypeError(
+ # f"Unsupported type {var_type} for FunctionVar. Must be Callable."
+ # )
+ return ToFunctionOperation.create(self, var_type or Callable)
+
+ if issubclass(output, NoneVar):
+ return ToNoneOperation.create(self)
+
+ if dataclasses.is_dataclass(output):
+ return ToObjectOperation.create(self, var_type or dict)
+
+ # If we can't determine the first argument, we just replace the _var_type.
+ if not issubclass(output, Var) or var_type is None:
+ return dataclasses.replace(
+ self,
+ _var_type=output,
)
- return ToArrayOperation.create(self, var_type or list)
-
- if issubclass(output, StringVar):
- return ToStringOperation.create(self, var_type or str)
-
- if issubclass(output, EventVar):
- return ToEventVarOperation.create(self, var_type or EventSpec)
-
- if issubclass(output, EventChainVar):
- return ToEventChainVarOperation.create(self, var_type or EventChain)
-
- if issubclass(output, (ObjectVar, Base)):
- return ToObjectOperation.create(self, var_type or dict)
-
- if issubclass(output, FunctionVar):
- # if fixed_type is not None and not issubclass(fixed_type, Callable):
- # raise TypeError(
- # f"Unsupported type {var_type} for FunctionVar. Must be Callable."
- # )
- return ToFunctionOperation.create(self, var_type or Callable)
-
- if issubclass(output, NoneVar):
- return ToNoneOperation.create(self)
-
- if dataclasses.is_dataclass(output):
- return ToObjectOperation.create(self, var_type or dict)
-
- # If we can't determine the first argument, we just replace the _var_type.
- if not issubclass(output, Var) or var_type is None:
- return dataclasses.replace(
- self,
- _var_type=output,
- )
# We couldn't determine the output type to be any other Var type, so we replace the _var_type.
if var_type is not None:
@@ -530,7 +534,7 @@ class Var(Generic[VAR_TYPE]):
fixed_type = get_origin(var_type) or var_type
- if fixed_type is Union:
+ if fixed_type in types.UnionTypes:
inner_types = get_args(var_type)
if all(
@@ -568,8 +572,11 @@ class Var(Generic[VAR_TYPE]):
return self.to(EventVar, self._var_type)
if issubclass(fixed_type, EventChain):
return self.to(EventChainVar, self._var_type)
- if issubclass(fixed_type, Base):
- return self.to(ObjectVar, self._var_type)
+ try:
+ if issubclass(fixed_type, Base):
+ return self.to(ObjectVar, self._var_type)
+ except TypeError:
+ pass
if dataclasses.is_dataclass(fixed_type):
return self.to(ObjectVar, self._var_type)
return self
@@ -1237,26 +1244,6 @@ def var_operation(
return wrapper
-def unionize(*args: Type) -> Type:
- """Unionize the types.
-
- Args:
- args: The types to unionize.
-
- Returns:
- The unionized types.
- """
- if not args:
- return Any
- if len(args) == 1:
- return args[0]
- # We are bisecting the args list here to avoid hitting the recursion limit
- # In Python versions >= 3.11, we can simply do `return Union[*args]`
- midpoint = len(args) // 2
- first_half, second_half = args[:midpoint], args[midpoint:]
- return Union[unionize(*first_half), unionize(*second_half)]
-
-
def figure_out_type(value: Any) -> types.GenericType:
"""Figure out the type of the value.
@@ -1266,6 +1253,11 @@ def figure_out_type(value: Any) -> types.GenericType:
Returns:
The type of the value.
"""
+ if isinstance(value, Var):
+ return value._var_type
+ type_ = type(value)
+ if has_args(type_):
+ return type_
if isinstance(value, list):
return List[unionize(*(figure_out_type(v) for v in value))]
if isinstance(value, set):
@@ -1277,8 +1269,6 @@ def figure_out_type(value: Any) -> types.GenericType:
unionize(*(figure_out_type(k) for k in value)),
unionize(*(figure_out_type(v) for v in value.values())),
]
- if isinstance(value, Var):
- return value._var_type
return type(value)
@@ -1567,8 +1557,8 @@ class ComputedVar(Var[RETURN_TYPE]):
"return", Any
)
- kwargs["_js_expr"] = kwargs.pop("_js_expr", fget.__name__)
- kwargs["_var_type"] = kwargs.pop("_var_type", hint)
+ kwargs.setdefault("_js_expr", fget.__name__)
+ kwargs.setdefault("_var_type", hint)
Var.__init__(
self,
@@ -1577,6 +1567,9 @@ class ComputedVar(Var[RETURN_TYPE]):
_var_data=kwargs.pop("_var_data", None),
)
+ if kwargs:
+ raise TypeError(f"Unexpected keyword arguments: {tuple(kwargs)}")
+
if backend is None:
backend = fget.__name__.startswith("_")
@@ -2832,3 +2825,68 @@ def dispatch(
_var_data=var_data,
_var_type=result_var_type,
).guess_type()
+
+
+V = TypeVar("V")
+
+
+class Field(Generic[T]):
+ """Shadow class for Var to allow for type hinting in the IDE."""
+
+ def __set__(self, instance, value: T):
+ """Set the Var.
+
+ Args:
+ instance: The instance of the class setting the Var.
+ value: The value to set the Var to.
+ """
+
+ @overload
+ def __get__(self: Field[bool], instance: None, owner) -> BooleanVar: ...
+
+ @overload
+ def __get__(self: Field[int], instance: None, owner) -> NumberVar: ...
+
+ @overload
+ def __get__(self: Field[str], instance: None, owner) -> StringVar: ...
+
+ @overload
+ def __get__(self: Field[None], instance: None, owner) -> NoneVar: ...
+
+ @overload
+ def __get__(
+ self: Field[List[V]] | Field[Set[V]] | Field[Tuple[V, ...]],
+ instance: None,
+ owner,
+ ) -> ArrayVar[List[V]]: ...
+
+ @overload
+ def __get__(
+ self: Field[Dict[str, V]], instance: None, owner
+ ) -> ObjectVar[Dict[str, V]]: ...
+
+ @overload
+ def __get__(self, instance: None, owner) -> Var[T]: ...
+
+ @overload
+ def __get__(self, instance, owner) -> T: ...
+
+ def __get__(self, instance, owner): # type: ignore
+ """Get the Var.
+
+ Args:
+ instance: The instance of the class accessing the Var.
+ owner: The class that the Var is attached to.
+ """
+
+
+def field(value: T) -> Field[T]:
+ """Create a Field with a value.
+
+ Args:
+ value: The value of the Field.
+
+ Returns:
+ The Field.
+ """
+ return value # type: ignore
diff --git a/reflex/vars/object.py b/reflex/vars/object.py
index 1158bba9a..38add7779 100644
--- a/reflex/vars/object.py
+++ b/reflex/vars/object.py
@@ -119,6 +119,8 @@ class ObjectVar(Var[OBJECT_TYPE]):
"""
return object_entries_operation(self)
+ items = entries
+
def merge(self, other: ObjectVar):
"""Merge two objects.
@@ -260,7 +262,9 @@ class ObjectVar(Var[OBJECT_TYPE]):
var_type = get_args(var_type)[0]
fixed_type = var_type if isclass(var_type) else get_origin(var_type)
- if isclass(fixed_type) and not issubclass(fixed_type, dict):
+ if (isclass(fixed_type) and not issubclass(fixed_type, dict)) or (
+ fixed_type in types.UnionTypes
+ ):
attribute_type = get_attribute_access_type(var_type, name)
if attribute_type is None:
raise VarAttributeError(
diff --git a/reflex/vars/sequence.py b/reflex/vars/sequence.py
index 15c7411a6..e3b422f35 100644
--- a/reflex/vars/sequence.py
+++ b/reflex/vars/sequence.py
@@ -545,7 +545,7 @@ class LiteralStringVar(LiteralVar, StringVar):
def create(
cls,
value: str,
- _var_type: GenericType | None = str,
+ _var_type: GenericType | None = None,
_var_data: VarData | None = None,
) -> StringVar:
"""Create a var from a string value.
@@ -558,6 +558,9 @@ class LiteralStringVar(LiteralVar, StringVar):
Returns:
The var.
"""
+ # Determine var type in case the value is inherited from str.
+ _var_type = _var_type or type(value) or str
+
if REFLEX_VAR_OPENING_TAG in value:
strings_and_vals: list[Var | str] = []
offset = 0
@@ -884,6 +887,12 @@ class ArrayVar(Var[ARRAY_VAR_TYPE]):
i: int | NumberVar,
) -> ArrayVar[Set[INNER_ARRAY_VAR]]: ...
+ @overload
+ def __getitem__(
+ self: ARRAY_VAR_OF_LIST_ELEMENT[Tuple[KEY_TYPE, VALUE_TYPE]],
+ i: int | NumberVar,
+ ) -> ArrayVar[Tuple[KEY_TYPE, VALUE_TYPE]]: ...
+
@overload
def __getitem__(
self: ARRAY_VAR_OF_LIST_ELEMENT[Tuple[INNER_ARRAY_VAR, ...]],
@@ -1146,7 +1155,7 @@ class ArrayVar(Var[ARRAY_VAR_TYPE]):
function_var = ArgsFunctionOperation.create(tuple(), return_value)
else:
# generic number var
- number_var = Var("").to(NumberVar)
+ number_var = Var("").to(NumberVar, int)
first_arg_type = self[number_var]._var_type
@@ -1158,7 +1167,10 @@ class ArrayVar(Var[ARRAY_VAR_TYPE]):
_var_type=first_arg_type,
).guess_type()
- function_var = ArgsFunctionOperation.create((arg_name,), fn(first_arg))
+ function_var = ArgsFunctionOperation.create(
+ (arg_name,),
+ Var.create(fn(first_arg)),
+ )
return map_array_operation(self, function_var)
diff --git a/scripts/bun_install.sh b/scripts/bun_install.sh
new file mode 100644
index 000000000..08a0817f6
--- /dev/null
+++ b/scripts/bun_install.sh
@@ -0,0 +1,311 @@
+#!/usr/bin/env bash
+set -euo pipefail
+
+platform=$(uname -ms)
+
+if [[ ${OS:-} = Windows_NT ]]; then
+ if [[ $platform != MINGW64* ]]; then
+ powershell -c "irm bun.sh/install.ps1|iex"
+ exit $?
+ fi
+fi
+
+# Reset
+Color_Off=''
+
+# Regular Colors
+Red=''
+Green=''
+Dim='' # White
+
+# Bold
+Bold_White=''
+Bold_Green=''
+
+if [[ -t 1 ]]; then
+ # Reset
+ Color_Off='\033[0m' # Text Reset
+
+ # Regular Colors
+ Red='\033[0;31m' # Red
+ Green='\033[0;32m' # Green
+ Dim='\033[0;2m' # White
+
+ # Bold
+ Bold_Green='\033[1;32m' # Bold Green
+ Bold_White='\033[1m' # Bold White
+fi
+
+error() {
+ echo -e "${Red}error${Color_Off}:" "$@" >&2
+ exit 1
+}
+
+info() {
+ echo -e "${Dim}$@ ${Color_Off}"
+}
+
+info_bold() {
+ echo -e "${Bold_White}$@ ${Color_Off}"
+}
+
+success() {
+ echo -e "${Green}$@ ${Color_Off}"
+}
+
+command -v unzip >/dev/null ||
+ error 'unzip is required to install bun'
+
+if [[ $# -gt 2 ]]; then
+ error 'Too many arguments, only 2 are allowed. The first can be a specific tag of bun to install. (e.g. "bun-v0.1.4") The second can be a build variant of bun to install. (e.g. "debug-info")'
+fi
+
+case $platform in
+'Darwin x86_64')
+ target=darwin-x64
+ ;;
+'Darwin arm64')
+ target=darwin-aarch64
+ ;;
+'Linux aarch64' | 'Linux arm64')
+ target=linux-aarch64
+ ;;
+'MINGW64'*)
+ target=windows-x64
+ ;;
+'Linux x86_64' | *)
+ target=linux-x64
+ ;;
+esac
+
+if [[ $target = darwin-x64 ]]; then
+ # Is this process running in Rosetta?
+ # redirect stderr to devnull to avoid error message when not running in Rosetta
+ if [[ $(sysctl -n sysctl.proc_translated 2>/dev/null) = 1 ]]; then
+ target=darwin-aarch64
+ info "Your shell is running in Rosetta 2. Downloading bun for $target instead"
+ fi
+fi
+
+GITHUB=${GITHUB-"https://github.com"}
+
+github_repo="$GITHUB/oven-sh/bun"
+
+if [[ $target = darwin-x64 ]]; then
+ # If AVX2 isn't supported, use the -baseline build
+ if [[ $(sysctl -a | grep machdep.cpu | grep AVX2) == '' ]]; then
+ target=darwin-x64-baseline
+ fi
+fi
+
+if [[ $target = linux-x64 ]]; then
+ # If AVX2 isn't supported, use the -baseline build
+ if [[ $(cat /proc/cpuinfo | grep avx2) = '' ]]; then
+ target=linux-x64-baseline
+ fi
+fi
+
+exe_name=bun
+
+if [[ $# = 2 && $2 = debug-info ]]; then
+ target=$target-profile
+ exe_name=bun-profile
+ info "You requested a debug build of bun. More information will be shown if a crash occurs."
+fi
+
+if [[ $# = 0 ]]; then
+ bun_uri=$github_repo/releases/latest/download/bun-$target.zip
+else
+ bun_uri=$github_repo/releases/download/$1/bun-$target.zip
+fi
+
+install_env=BUN_INSTALL
+bin_env=\$$install_env/bin
+
+install_dir=${!install_env:-$HOME/.bun}
+bin_dir=$install_dir/bin
+exe=$bin_dir/bun
+
+if [[ ! -d $bin_dir ]]; then
+ mkdir -p "$bin_dir" ||
+ error "Failed to create install directory \"$bin_dir\""
+fi
+
+curl --fail --location --progress-bar --output "$exe.zip" "$bun_uri" ||
+ error "Failed to download bun from \"$bun_uri\""
+
+unzip -oqd "$bin_dir" "$exe.zip" ||
+ error 'Failed to extract bun'
+
+mv "$bin_dir/bun-$target/$exe_name" "$exe" ||
+ error 'Failed to move extracted bun to destination'
+
+chmod +x "$exe" ||
+ error 'Failed to set permissions on bun executable'
+
+rm -r "$bin_dir/bun-$target" "$exe.zip"
+
+tildify() {
+ if [[ $1 = $HOME/* ]]; then
+ local replacement=\~/
+
+ echo "${1/$HOME\//$replacement}"
+ else
+ echo "$1"
+ fi
+}
+
+success "bun was installed successfully to $Bold_Green$(tildify "$exe")"
+
+if command -v bun >/dev/null; then
+ # Install completions, but we don't care if it fails
+ IS_BUN_AUTO_UPDATE=true $exe completions &>/dev/null || :
+
+ echo "Run 'bun --help' to get started"
+ exit
+fi
+
+refresh_command=''
+
+tilde_bin_dir=$(tildify "$bin_dir")
+quoted_install_dir=\"${install_dir//\"/\\\"}\"
+
+if [[ $quoted_install_dir = \"$HOME/* ]]; then
+ quoted_install_dir=${quoted_install_dir/$HOME\//\$HOME/}
+fi
+
+echo
+
+case $(basename "$SHELL") in
+fish)
+ # Install completions, but we don't care if it fails
+ IS_BUN_AUTO_UPDATE=true SHELL=fish $exe completions &>/dev/null || :
+
+ commands=(
+ "set --export $install_env $quoted_install_dir"
+ "set --export PATH $bin_env \$PATH"
+ )
+
+ fish_config=$HOME/.config/fish/config.fish
+ tilde_fish_config=$(tildify "$fish_config")
+
+ if [[ -w $fish_config ]]; then
+ {
+ echo -e '\n# bun'
+
+ for command in "${commands[@]}"; do
+ echo "$command"
+ done
+ } >>"$fish_config"
+
+ info "Added \"$tilde_bin_dir\" to \$PATH in \"$tilde_fish_config\""
+
+ refresh_command="source $tilde_fish_config"
+ else
+ echo "Manually add the directory to $tilde_fish_config (or similar):"
+
+ for command in "${commands[@]}"; do
+ info_bold " $command"
+ done
+ fi
+ ;;
+zsh)
+ # Install completions, but we don't care if it fails
+ IS_BUN_AUTO_UPDATE=true SHELL=zsh $exe completions &>/dev/null || :
+
+ commands=(
+ "export $install_env=$quoted_install_dir"
+ "export PATH=\"$bin_env:\$PATH\""
+ )
+
+ zsh_config=$HOME/.zshrc
+ tilde_zsh_config=$(tildify "$zsh_config")
+
+ if [[ -w $zsh_config ]]; then
+ {
+ echo -e '\n# bun'
+
+ for command in "${commands[@]}"; do
+ echo "$command"
+ done
+ } >>"$zsh_config"
+
+ info "Added \"$tilde_bin_dir\" to \$PATH in \"$tilde_zsh_config\""
+
+ refresh_command="exec $SHELL"
+ else
+ echo "Manually add the directory to $tilde_zsh_config (or similar):"
+
+ for command in "${commands[@]}"; do
+ info_bold " $command"
+ done
+ fi
+ ;;
+bash)
+ # Install completions, but we don't care if it fails
+ IS_BUN_AUTO_UPDATE=true SHELL=bash $exe completions &>/dev/null || :
+
+ commands=(
+ "export $install_env=$quoted_install_dir"
+ "export PATH=\"$bin_env:\$PATH\""
+ )
+
+ bash_configs=(
+ "$HOME/.bashrc"
+ "$HOME/.bash_profile"
+ )
+
+ if [[ ${XDG_CONFIG_HOME:-} ]]; then
+ bash_configs+=(
+ "$XDG_CONFIG_HOME/.bash_profile"
+ "$XDG_CONFIG_HOME/.bashrc"
+ "$XDG_CONFIG_HOME/bash_profile"
+ "$XDG_CONFIG_HOME/bashrc"
+ )
+ fi
+
+ set_manually=true
+ for bash_config in "${bash_configs[@]}"; do
+ tilde_bash_config=$(tildify "$bash_config")
+
+ if [[ -w $bash_config ]]; then
+ {
+ echo -e '\n# bun'
+
+ for command in "${commands[@]}"; do
+ echo "$command"
+ done
+ } >>"$bash_config"
+
+ info "Added \"$tilde_bin_dir\" to \$PATH in \"$tilde_bash_config\""
+
+ refresh_command="source $bash_config"
+ set_manually=false
+ break
+ fi
+ done
+
+ if [[ $set_manually = true ]]; then
+ echo "Manually add the directory to $tilde_bash_config (or similar):"
+
+ for command in "${commands[@]}"; do
+ info_bold " $command"
+ done
+ fi
+ ;;
+*)
+ echo 'Manually add the directory to ~/.bashrc (or similar):'
+ info_bold " export $install_env=$quoted_install_dir"
+ info_bold " export PATH=\"$bin_env:\$PATH\""
+ ;;
+esac
+
+echo
+info "To get started, run:"
+echo
+
+if [[ $refresh_command ]]; then
+ info_bold " $refresh_command"
+fi
+
+info_bold " bun --help"
diff --git a/tests/integration/test_background_task.py b/tests/integration/test_background_task.py
index b97791b0a..a445112f3 100644
--- a/tests/integration/test_background_task.py
+++ b/tests/integration/test_background_task.py
@@ -23,6 +23,7 @@ def BackgroundTask():
iterations: int = 10
@rx.background
+ @rx.event
async def handle_event(self):
async with self:
self._task_id += 1
@@ -32,6 +33,7 @@ def BackgroundTask():
await asyncio.sleep(0.005)
@rx.background
+ @rx.event
async def handle_event_yield_only(self):
async with self:
self._task_id += 1
@@ -42,6 +44,7 @@ def BackgroundTask():
yield State.increment() # type: ignore
await asyncio.sleep(0.005)
+ @rx.event
def increment(self):
self.counter += 1
@@ -50,13 +53,16 @@ def BackgroundTask():
async with self:
self.counter += int(amount)
+ @rx.event
def reset_counter(self):
self.counter = 0
+ @rx.event
async def blocking_pause(self):
await asyncio.sleep(0.02)
@rx.background
+ @rx.event
async def non_blocking_pause(self):
await asyncio.sleep(0.02)
@@ -69,12 +75,14 @@ def BackgroundTask():
await asyncio.sleep(0.005)
@rx.background
+ @rx.event
async def handle_racy_event(self):
await asyncio.gather(
self.racy_task(), self.racy_task(), self.racy_task(), self.racy_task()
)
@rx.background
+ @rx.event
async def nested_async_with_self(self):
async with self:
self.counter += 1
@@ -87,6 +95,7 @@ def BackgroundTask():
await third_state._triple_count()
@rx.background
+ @rx.event
async def yield_in_async_with_self(self):
async with self:
self.counter += 1
@@ -95,6 +104,7 @@ def BackgroundTask():
class OtherState(rx.State):
@rx.background
+ @rx.event
async def get_other_state(self):
async with self:
state = await self.get_state(State)
diff --git a/tests/integration/test_call_script.py b/tests/integration/test_call_script.py
index 744d83d16..a949dc451 100644
--- a/tests/integration/test_call_script.py
+++ b/tests/integration/test_call_script.py
@@ -54,15 +54,18 @@ def CallScript():
def call_script_callback_other_arg(self, result, other_arg):
self.results.append([other_arg, result])
+ @rx.event
def call_scripts_inline_yield(self):
yield rx.call_script("inline1()")
yield rx.call_script("inline2()")
yield rx.call_script("inline3()")
yield rx.call_script("inline4()")
+ @rx.event
def call_script_inline_return(self):
return rx.call_script("inline2()")
+ @rx.event
def call_scripts_inline_yield_callback(self):
yield rx.call_script(
"inline1()", callback=CallScriptState.call_script_callback
@@ -77,11 +80,13 @@ def CallScript():
"inline4()", callback=CallScriptState.call_script_callback
)
+ @rx.event
def call_script_inline_return_callback(self):
return rx.call_script(
"inline3()", callback=CallScriptState.call_script_callback
)
+ @rx.event
def call_script_inline_return_lambda(self):
return rx.call_script(
"inline2()",
@@ -90,21 +95,25 @@ def CallScript():
),
)
+ @rx.event
def get_inline_counter(self):
return rx.call_script(
"inline_counter",
callback=CallScriptState.set_inline_counter, # type: ignore
)
+ @rx.event
def call_scripts_external_yield(self):
yield rx.call_script("external1()")
yield rx.call_script("external2()")
yield rx.call_script("external3()")
yield rx.call_script("external4()")
+ @rx.event
def call_script_external_return(self):
return rx.call_script("external2()")
+ @rx.event
def call_scripts_external_yield_callback(self):
yield rx.call_script(
"external1()", callback=CallScriptState.call_script_callback
@@ -119,11 +128,13 @@ def CallScript():
"external4()", callback=CallScriptState.call_script_callback
)
+ @rx.event
def call_script_external_return_callback(self):
return rx.call_script(
"external3()", callback=CallScriptState.call_script_callback
)
+ @rx.event
def call_script_external_return_lambda(self):
return rx.call_script(
"external2()",
@@ -132,30 +143,35 @@ def CallScript():
),
)
+ @rx.event
def get_external_counter(self):
return rx.call_script(
"external_counter",
callback=CallScriptState.set_external_counter, # type: ignore
)
+ @rx.event
def call_with_var_f_string(self):
return rx.call_script(
f"{rx.Var('inline_counter')} + {rx.Var('external_counter')}",
callback=CallScriptState.set_last_result, # type: ignore
)
+ @rx.event
def call_with_var_str_cast(self):
return rx.call_script(
f"{str(rx.Var('inline_counter'))} + {str(rx.Var('external_counter'))}",
callback=CallScriptState.set_last_result, # type: ignore
)
+ @rx.event
def call_with_var_f_string_wrapped(self):
return rx.call_script(
rx.Var(f"{rx.Var('inline_counter')} + {rx.Var('external_counter')}"),
callback=CallScriptState.set_last_result, # type: ignore
)
+ @rx.event
def call_with_var_str_cast_wrapped(self):
return rx.call_script(
rx.Var(
@@ -164,6 +180,7 @@ def CallScript():
callback=CallScriptState.set_last_result, # type: ignore
)
+ @rx.event
def reset_(self):
yield rx.call_script("inline_counter = 0; external_counter = 0")
self.reset()
diff --git a/tests/integration/test_client_storage.py b/tests/integration/test_client_storage.py
index e4a38a15b..ae66087e2 100644
--- a/tests/integration/test_client_storage.py
+++ b/tests/integration/test_client_storage.py
@@ -55,6 +55,7 @@ def ClientSide():
def set_l6(self, my_param: str):
self.l6 = my_param
+ @rx.event
def set_var(self):
setattr(self, self.state_var, self.input_value)
self.state_var = self.input_value = ""
@@ -64,6 +65,7 @@ def ClientSide():
l1s: str = rx.LocalStorage()
s1s: str = rx.SessionStorage()
+ @rx.event
def set_var(self):
setattr(self, self.state_var, self.input_value)
self.state_var = self.input_value = ""
diff --git a/tests/integration/test_component_state.py b/tests/integration/test_component_state.py
index 77b8b3fa1..f4a295d07 100644
--- a/tests/integration/test_component_state.py
+++ b/tests/integration/test_component_state.py
@@ -5,6 +5,7 @@ from typing import Generator
import pytest
from selenium.webdriver.common.by import By
+from reflex.state import State, _substate_key
from reflex.testing import AppHarness
from . import utils
@@ -12,13 +13,24 @@ from . import utils
def ComponentStateApp():
"""App using per component state."""
+ from typing import Generic, TypeVar
+
import reflex as rx
- class MultiCounter(rx.ComponentState):
- count: int = 0
+ E = TypeVar("E")
+ class MultiCounter(rx.ComponentState, Generic[E]):
+ """ComponentState style."""
+
+ count: int = 0
+ _be: E
+ _be_int: int
+ _be_str: str = "42"
+
+ @rx.event
def increment(self):
self.count += 1
+ self._be = self.count # type: ignore
@classmethod
def get_component(cls, *children, **props):
@@ -33,21 +45,61 @@ def ComponentStateApp():
**props,
)
+ def multi_counter_func(id: str = "default") -> rx.Component:
+ """Local-substate style.
+
+ Args:
+ id: identifier for this instance
+
+ Returns:
+ A new instance of the component with its own state.
+ """
+
+ class _Counter(rx.State):
+ count: int = 0
+
+ @rx.event
+ def increment(self):
+ self.count += 1
+
+ return rx.vstack(
+ rx.heading(_Counter.count, id=f"count-{id}"),
+ rx.button(
+ "Increment",
+ on_click=_Counter.increment,
+ id=f"button-{id}",
+ ),
+ State=_Counter,
+ )
+
app = rx.App(state=rx.State) # noqa
@rx.page()
def index():
mc_a = MultiCounter.create(id="a")
mc_b = MultiCounter.create(id="b")
+ mc_c = multi_counter_func(id="c")
+ mc_d = multi_counter_func(id="d")
assert mc_a.State != mc_b.State
+ assert mc_c.State != mc_d.State
return rx.vstack(
mc_a,
mc_b,
+ mc_c,
+ mc_d,
rx.button(
"Inc A",
on_click=mc_a.State.increment, # type: ignore
id="inc-a",
),
+ rx.text(
+ mc_a.State.get_name() if mc_a.State is not None else "",
+ id="a_state_name",
+ ),
+ rx.text(
+ mc_b.State.get_name() if mc_b.State is not None else "",
+ id="b_state_name",
+ ),
)
@@ -80,6 +132,7 @@ async def test_component_state_app(component_state_app: AppHarness):
ss = utils.SessionStorage(driver)
assert AppHarness._poll_for(lambda: ss.get("token") is not None), "token not found"
+ root_state_token = _substate_key(ss.get("token"), State)
count_a = driver.find_element(By.ID, "count-a")
count_b = driver.find_element(By.ID, "count-b")
@@ -87,6 +140,18 @@ async def test_component_state_app(component_state_app: AppHarness):
button_b = driver.find_element(By.ID, "button-b")
button_inc_a = driver.find_element(By.ID, "inc-a")
+ # Check that backend vars in mixins are okay
+ a_state_name = driver.find_element(By.ID, "a_state_name").text
+ b_state_name = driver.find_element(By.ID, "b_state_name").text
+ root_state = await component_state_app.get_state(root_state_token)
+ a_state = root_state.substates[a_state_name]
+ b_state = root_state.substates[b_state_name]
+ assert a_state._backend_vars == a_state.backend_vars
+ assert a_state._backend_vars == b_state._backend_vars
+ assert a_state._backend_vars["_be"] is None
+ assert a_state._backend_vars["_be_int"] == 0
+ assert a_state._backend_vars["_be_str"] == "42"
+
assert count_a.text == "0"
button_a.click()
@@ -98,6 +163,14 @@ async def test_component_state_app(component_state_app: AppHarness):
button_inc_a.click()
assert component_state_app.poll_for_content(count_a, exp_not_equal="2") == "3"
+ root_state = await component_state_app.get_state(root_state_token)
+ a_state = root_state.substates[a_state_name]
+ b_state = root_state.substates[b_state_name]
+ assert a_state._backend_vars != a_state.backend_vars
+ assert a_state._be == a_state._backend_vars["_be"] == 3
+ assert b_state._be is None
+ assert b_state._backend_vars["_be"] is None
+
assert count_b.text == "0"
button_b.click()
@@ -105,3 +178,27 @@ async def test_component_state_app(component_state_app: AppHarness):
button_b.click()
assert component_state_app.poll_for_content(count_b, exp_not_equal="1") == "2"
+
+ root_state = await component_state_app.get_state(root_state_token)
+ a_state = root_state.substates[a_state_name]
+ b_state = root_state.substates[b_state_name]
+ assert b_state._backend_vars != b_state.backend_vars
+ assert b_state._be == b_state._backend_vars["_be"] == 2
+
+ # Check locally-defined substate style
+ count_c = driver.find_element(By.ID, "count-c")
+ count_d = driver.find_element(By.ID, "count-d")
+ button_c = driver.find_element(By.ID, "button-c")
+ button_d = driver.find_element(By.ID, "button-d")
+
+ assert component_state_app.poll_for_content(count_c, exp_not_equal="") == "0"
+ assert component_state_app.poll_for_content(count_d, exp_not_equal="") == "0"
+ button_c.click()
+ assert component_state_app.poll_for_content(count_c, exp_not_equal="0") == "1"
+ assert component_state_app.poll_for_content(count_d, exp_not_equal="") == "0"
+ button_c.click()
+ assert component_state_app.poll_for_content(count_c, exp_not_equal="1") == "2"
+ assert component_state_app.poll_for_content(count_d, exp_not_equal="") == "0"
+ button_d.click()
+ assert component_state_app.poll_for_content(count_c, exp_not_equal="1") == "2"
+ assert component_state_app.poll_for_content(count_d, exp_not_equal="0") == "1"
diff --git a/tests/integration/test_computed_vars.py b/tests/integration/test_computed_vars.py
index 28f774de5..1f585cd8b 100644
--- a/tests/integration/test_computed_vars.py
+++ b/tests/integration/test_computed_vars.py
@@ -58,9 +58,11 @@ def ComputedVars():
def depends_on_count3(self) -> int:
return self.count
+ @rx.event
def increment(self):
self.count += 1
+ @rx.event
def mark_dirty(self):
self._mark_dirty()
diff --git a/tests/integration/test_connection_banner.py b/tests/integration/test_connection_banner.py
index b83a493ce..6921444b0 100644
--- a/tests/integration/test_connection_banner.py
+++ b/tests/integration/test_connection_banner.py
@@ -20,6 +20,7 @@ def ConnectionBanner():
class State(rx.State):
foo: int = 0
+ @rx.event
async def delay(self):
await asyncio.sleep(5)
diff --git a/tests/integration/test_deploy_url.py b/tests/integration/test_deploy_url.py
index b0421cfb7..f93e9db27 100644
--- a/tests/integration/test_deploy_url.py
+++ b/tests/integration/test_deploy_url.py
@@ -17,6 +17,7 @@ def DeployUrlSample() -> None:
import reflex as rx
class State(rx.State):
+ @rx.event
def goto_self(self):
return rx.redirect(rx.config.get_config().deploy_url) # type: ignore
diff --git a/tests/integration/test_dynamic_routes.py b/tests/integration/test_dynamic_routes.py
index 5ba0b7bda..31b7fa419 100644
--- a/tests/integration/test_dynamic_routes.py
+++ b/tests/integration/test_dynamic_routes.py
@@ -23,11 +23,15 @@ def DynamicRoute():
order: List[str] = []
def on_load(self):
- self.order.append(f"{self.router.page.path}-{self.page_id or 'no page id'}")
+ page_data = f"{self.router.page.path}-{self.page_id or 'no page id'}"
+ print(f"on_load: {page_data}")
+ self.order.append(page_data)
def on_load_redir(self):
query_params = self.router.page.params
- self.order.append(f"on_load_redir-{query_params}")
+ page_data = f"on_load_redir-{query_params}"
+ print(f"on_load_redir: {page_data}")
+ self.order.append(page_data)
return rx.redirect(f"/page/{query_params['page_id']}")
@rx.var
@@ -41,13 +45,13 @@ def DynamicRoute():
return rx.fragment(
rx.input(
value=DynamicState.router.session.client_token,
- is_read_only=True,
+ read_only=True,
id="token",
),
- rx.input(value=rx.State.page_id, is_read_only=True, id="page_id"), # type: ignore
+ rx.input(value=rx.State.page_id, read_only=True, id="page_id"), # type: ignore
rx.input(
value=DynamicState.router.page.raw_path,
- is_read_only=True,
+ read_only=True,
id="raw_path",
),
rx.link("index", href="/", id="link_index"),
@@ -221,8 +225,11 @@ def poll_for_order(
dynamic_state_name
].order == exp_order
- await AppHarness._poll_for_async(_check)
- assert (await _backend_state()).substates[dynamic_state_name].order == exp_order
+ await AppHarness._poll_for_async(_check, timeout=60)
+ assert (
+ list((await _backend_state()).substates[dynamic_state_name].order)
+ == exp_order
+ )
return _poll_for_order
diff --git a/tests/integration/test_event_actions.py b/tests/integration/test_event_actions.py
index 499478a1c..5d278835e 100644
--- a/tests/integration/test_event_actions.py
+++ b/tests/integration/test_event_actions.py
@@ -24,6 +24,7 @@ def TestEventAction():
def on_click(self, ev):
self.order.append(f"on_click:{ev}")
+ @rx.event
def on_click2(self):
self.order.append("on_click2")
diff --git a/tests/integration/test_event_chain.py b/tests/integration/test_event_chain.py
index 740fc71a3..ea2d2191c 100644
--- a/tests/integration/test_event_chain.py
+++ b/tests/integration/test_event_chain.py
@@ -27,45 +27,55 @@ def EventChain():
event_order: List[str] = []
interim_value: str = ""
+ @rx.event
def event_no_args(self):
self.event_order.append("event_no_args")
+ @rx.event
def event_arg(self, arg):
self.event_order.append(f"event_arg:{arg}")
+ @rx.event
def event_arg_repr_type(self, arg):
self.event_order.append(f"event_arg_repr:{arg!r}_{type(arg).__name__}")
+ @rx.event
def event_nested_1(self):
self.event_order.append("event_nested_1")
yield State.event_nested_2
yield State.event_arg("nested_1") # type: ignore
+ @rx.event
def event_nested_2(self):
self.event_order.append("event_nested_2")
yield State.event_nested_3
yield rx.console_log("event_nested_2")
yield State.event_arg("nested_2") # type: ignore
+ @rx.event
def event_nested_3(self):
self.event_order.append("event_nested_3")
yield State.event_no_args
yield State.event_arg("nested_3") # type: ignore
+ @rx.event
def on_load_return_chain(self):
self.event_order.append("on_load_return_chain")
return [State.event_arg(1), State.event_arg(2), State.event_arg(3)] # type: ignore
+ @rx.event
def on_load_yield_chain(self):
self.event_order.append("on_load_yield_chain")
yield State.event_arg(4) # type: ignore
yield State.event_arg(5) # type: ignore
yield State.event_arg(6) # type: ignore
+ @rx.event
def click_return_event(self):
self.event_order.append("click_return_event")
return State.event_no_args
+ @rx.event
def click_return_events(self):
self.event_order.append("click_return_events")
return [
@@ -75,6 +85,7 @@ def EventChain():
State.event_arg(9), # type: ignore
]
+ @rx.event
def click_yield_chain(self):
self.event_order.append("click_yield_chain:0")
yield State.event_arg(10) # type: ignore
@@ -85,6 +96,7 @@ def EventChain():
yield State.event_arg(12) # type: ignore
self.event_order.append("click_yield_chain:3")
+ @rx.event
def click_yield_many_events(self):
self.event_order.append("click_yield_many_events")
for ix in range(MANY_EVENTS):
@@ -92,33 +104,40 @@ def EventChain():
yield rx.console_log(f"many_events_{ix}")
self.event_order.append("click_yield_many_events_done")
+ @rx.event
def click_yield_nested(self):
self.event_order.append("click_yield_nested")
yield State.event_nested_1
yield State.event_arg("yield_nested") # type: ignore
+ @rx.event
def redirect_return_chain(self):
self.event_order.append("redirect_return_chain")
yield rx.redirect("/on-load-return-chain")
+ @rx.event
def redirect_yield_chain(self):
self.event_order.append("redirect_yield_chain")
yield rx.redirect("/on-load-yield-chain")
+ @rx.event
def click_return_int_type(self):
self.event_order.append("click_return_int_type")
return State.event_arg_repr_type(1) # type: ignore
+ @rx.event
def click_return_dict_type(self):
self.event_order.append("click_return_dict_type")
return State.event_arg_repr_type({"a": 1}) # type: ignore
+ @rx.event
async def click_yield_interim_value_async(self):
self.interim_value = "interim"
yield
await asyncio.sleep(0.5)
self.interim_value = "final"
+ @rx.event
def click_yield_interim_value(self):
self.interim_value = "interim"
yield
diff --git a/tests/integration/test_login_flow.py b/tests/integration/test_login_flow.py
index 7d583e433..ecaade9cf 100644
--- a/tests/integration/test_login_flow.py
+++ b/tests/integration/test_login_flow.py
@@ -21,9 +21,11 @@ def LoginSample():
class State(rx.State):
auth_token: str = rx.LocalStorage("")
+ @rx.event
def logout(self):
self.set_auth_token("")
+ @rx.event
def login(self):
self.set_auth_token("12345")
yield rx.redirect("/")
diff --git a/tests/integration/test_server_side_event.py b/tests/integration/test_server_side_event.py
index ee5e8dbc0..cacf6e1c5 100644
--- a/tests/integration/test_server_side_event.py
+++ b/tests/integration/test_server_side_event.py
@@ -14,16 +14,19 @@ def ServerSideEvent():
import reflex as rx
class SSState(rx.State):
+ @rx.event
def set_value_yield(self):
yield rx.set_value("a", "")
yield rx.set_value("b", "")
yield rx.set_value("c", "")
+ @rx.event
def set_value_yield_return(self):
yield rx.set_value("a", "")
yield rx.set_value("b", "")
return rx.set_value("c", "")
+ @rx.event
def set_value_return(self):
return [
rx.set_value("a", ""),
@@ -31,6 +34,7 @@ def ServerSideEvent():
rx.set_value("c", ""),
]
+ @rx.event
def set_value_return_c(self):
return rx.set_value("c", "")
diff --git a/tests/units/components/base/test_script.py b/tests/units/components/base/test_script.py
index be62276f2..b909b6c61 100644
--- a/tests/units/components/base/test_script.py
+++ b/tests/units/components/base/test_script.py
@@ -2,6 +2,7 @@
import pytest
+import reflex as rx
from reflex.components.base.script import Script
from reflex.state import BaseState
@@ -35,14 +36,17 @@ def test_script_neither():
class EvState(BaseState):
"""State for testing event handlers."""
+ @rx.event
def on_ready(self):
"""Empty event handler."""
pass
+ @rx.event
def on_load(self):
"""Empty event handler."""
pass
+ @rx.event
def on_error(self):
"""Empty event handler."""
pass
diff --git a/tests/units/components/core/test_cond.py b/tests/units/components/core/test_cond.py
index f5b6c0895..f9bdc7d60 100644
--- a/tests/units/components/core/test_cond.py
+++ b/tests/units/components/core/test_cond.py
@@ -6,7 +6,7 @@ import pytest
from reflex.components.base.fragment import Fragment
from reflex.components.core.cond import Cond, cond
from reflex.components.radix.themes.typography.text import Text
-from reflex.state import BaseState, State
+from reflex.state import BaseState
from reflex.utils.format import format_state_name
from reflex.vars.base import LiteralVar, Var, computed_var
@@ -45,7 +45,7 @@ def test_validate_cond(cond_state: BaseState):
Text.create("cond is True"),
Text.create("cond is False"),
)
- cond_dict = cond_component.render() if type(cond_component) == Fragment else {}
+ cond_dict = cond_component.render() if type(cond_component) is Fragment else {}
assert cond_dict["name"] == "Fragment"
[condition] = cond_dict["children"]
@@ -124,7 +124,7 @@ def test_cond_no_else():
def test_cond_computed_var():
"""Test if cond works with computed vars."""
- class CondStateComputed(State):
+ class CondStateComputed(BaseState):
@computed_var
def computed_int(self) -> int:
return 0
diff --git a/tests/units/components/core/test_debounce.py b/tests/units/components/core/test_debounce.py
index 656f26c1f..7856ee090 100644
--- a/tests/units/components/core/test_debounce.py
+++ b/tests/units/components/core/test_debounce.py
@@ -37,6 +37,7 @@ class S(BaseState):
value: str = ""
+ @rx.event
def on_change(self, v: str):
"""Dummy on_change handler.
diff --git a/tests/units/components/core/test_foreach.py b/tests/units/components/core/test_foreach.py
index 43b9d8d55..228165d3e 100644
--- a/tests/units/components/core/test_foreach.py
+++ b/tests/units/components/core/test_foreach.py
@@ -47,7 +47,7 @@ class ForEachState(BaseState):
color_index_tuple: Tuple[int, str] = (0, "red")
-class TestComponentState(ComponentState):
+class ComponentStateTest(ComponentState):
"""A test component state."""
foo: bool
@@ -67,7 +67,7 @@ class TestComponentState(ComponentState):
def display_color(color):
- assert color._var_type == str
+ assert color._var_type is str
return box(text(color))
@@ -106,18 +106,18 @@ def display_nested_color_with_shades_v2(color):
def display_color_tuple(color):
- assert color._var_type == str
+ assert color._var_type is str
return box(text(color))
def display_colors_set(color):
- assert color._var_type == str
+ assert color._var_type is str
return box(text(color))
def display_nested_list_element(element: ArrayVar[List[str]], index: NumberVar[int]):
assert element._var_type == List[str]
- assert index._var_type == int
+ assert index._var_type is int
return box(text(element[index]))
@@ -240,7 +240,7 @@ def test_foreach_render(state_var, render_fn, render_dict):
arg_index = rend["arg_index"]
assert isinstance(arg_index, Var)
assert arg_index._js_expr not in seen_index_vars
- assert arg_index._var_type == int
+ assert arg_index._var_type is int
seen_index_vars.add(arg_index._js_expr)
@@ -288,5 +288,5 @@ def test_foreach_component_state():
with pytest.raises(TypeError):
Foreach.create(
ForEachState.colors_list,
- TestComponentState.create,
+ ComponentStateTest.create,
)
diff --git a/tests/units/components/core/test_match.py b/tests/units/components/core/test_match.py
index 583bfa1e2..f09e800e5 100644
--- a/tests/units/components/core/test_match.py
+++ b/tests/units/components/core/test_match.py
@@ -41,15 +41,15 @@ def test_match_components():
assert len(match_cases) == 6
assert match_cases[0][0]._js_expr == "1"
- assert match_cases[0][0]._var_type == int
+ assert match_cases[0][0]._var_type is int
first_return_value_render = match_cases[0][1].render()
assert first_return_value_render["name"] == "RadixThemesText"
assert first_return_value_render["children"][0]["contents"] == '{"first value"}'
assert match_cases[1][0]._js_expr == "2"
- assert match_cases[1][0]._var_type == int
+ assert match_cases[1][0]._var_type is int
assert match_cases[1][1]._js_expr == "3"
- assert match_cases[1][1]._var_type == int
+ assert match_cases[1][1]._var_type is int
second_return_value_render = match_cases[1][2].render()
assert second_return_value_render["name"] == "RadixThemesText"
assert second_return_value_render["children"][0]["contents"] == '{"second value"}'
@@ -61,7 +61,7 @@ def test_match_components():
assert third_return_value_render["children"][0]["contents"] == '{"third value"}'
assert match_cases[3][0]._js_expr == '"random"'
- assert match_cases[3][0]._var_type == str
+ assert match_cases[3][0]._var_type is str
fourth_return_value_render = match_cases[3][1].render()
assert fourth_return_value_render["name"] == "RadixThemesText"
assert fourth_return_value_render["children"][0]["contents"] == '{"fourth value"}'
@@ -73,7 +73,7 @@ def test_match_components():
assert fifth_return_value_render["children"][0]["contents"] == '{"fifth value"}'
assert match_cases[5][0]._js_expr == f"({MatchState.get_name()}.num + 1)"
- assert match_cases[5][0]._var_type == int
+ assert match_cases[5][0]._var_type is int
fifth_return_value_render = match_cases[5][1].render()
assert fifth_return_value_render["name"] == "RadixThemesText"
assert fifth_return_value_render["children"][0]["contents"] == '{"sixth value"}'
diff --git a/tests/units/components/core/test_upload.py b/tests/units/components/core/test_upload.py
index 83f04b3e6..710baa161 100644
--- a/tests/units/components/core/test_upload.py
+++ b/tests/units/components/core/test_upload.py
@@ -1,3 +1,6 @@
+from typing import Any
+
+from reflex import event
from reflex.components.core.upload import (
StyledUpload,
Upload,
@@ -11,10 +14,11 @@ from reflex.state import State
from reflex.vars.base import LiteralVar, Var
-class TestUploadState(State):
+class UploadStateTest(State):
"""Test upload state."""
- def drop_handler(self, files):
+ @event
+ def drop_handler(self, files: Any):
"""Handle the drop event.
Args:
@@ -22,7 +26,8 @@ class TestUploadState(State):
"""
pass
- def not_drop_handler(self, not_files):
+ @event
+ def not_drop_handler(self, not_files: Any):
"""Handle the drop event without defining the files argument.
Args:
@@ -42,7 +47,7 @@ def test_get_upload_url():
def test__on_drop_spec():
- assert isinstance(_on_drop_spec(LiteralVar.create([])), list)
+ assert isinstance(_on_drop_spec(LiteralVar.create([])), tuple)
def test_upload_create():
@@ -55,7 +60,7 @@ def test_upload_create():
up_comp_2 = Upload.create(
id="foo_id",
- on_drop=TestUploadState.drop_handler([]), # type: ignore
+ on_drop=UploadStateTest.drop_handler([]), # type: ignore
)
assert isinstance(up_comp_2, Upload)
assert up_comp_2.is_used
@@ -65,7 +70,7 @@ def test_upload_create():
up_comp_3 = Upload.create(
id="foo_id",
- on_drop=TestUploadState.drop_handler,
+ on_drop=UploadStateTest.drop_handler,
)
assert isinstance(up_comp_3, Upload)
assert up_comp_3.is_used
@@ -75,7 +80,7 @@ def test_upload_create():
up_comp_4 = Upload.create(
id="foo_id",
- on_drop=TestUploadState.not_drop_handler([]), # type: ignore
+ on_drop=UploadStateTest.not_drop_handler([]), # type: ignore
)
assert isinstance(up_comp_4, Upload)
assert up_comp_4.is_used
@@ -91,7 +96,7 @@ def test_styled_upload_create():
styled_up_comp_2 = StyledUpload.create(
id="foo_id",
- on_drop=TestUploadState.drop_handler([]), # type: ignore
+ on_drop=UploadStateTest.drop_handler([]), # type: ignore
)
assert isinstance(styled_up_comp_2, StyledUpload)
assert styled_up_comp_2.is_used
@@ -101,7 +106,7 @@ def test_styled_upload_create():
styled_up_comp_3 = StyledUpload.create(
id="foo_id",
- on_drop=TestUploadState.drop_handler,
+ on_drop=UploadStateTest.drop_handler,
)
assert isinstance(styled_up_comp_3, StyledUpload)
assert styled_up_comp_3.is_used
@@ -111,7 +116,7 @@ def test_styled_upload_create():
styled_up_comp_4 = StyledUpload.create(
id="foo_id",
- on_drop=TestUploadState.not_drop_handler([]), # type: ignore
+ on_drop=UploadStateTest.not_drop_handler([]), # type: ignore
)
assert isinstance(styled_up_comp_4, StyledUpload)
assert styled_up_comp_4.is_used
diff --git a/tests/components/el/test_svg.py b/tests/units/components/el/test_svg.py
similarity index 100%
rename from tests/components/el/test_svg.py
rename to tests/units/components/el/test_svg.py
diff --git a/tests/units/components/test_component.py b/tests/units/components/test_component.py
index 5e94db052..b7b721a92 100644
--- a/tests/units/components/test_component.py
+++ b/tests/units/components/test_component.py
@@ -16,7 +16,13 @@ from reflex.components.component import (
)
from reflex.components.radix.themes.layout.box import Box
from reflex.constants import EventTriggers
-from reflex.event import EventChain, EventHandler, parse_args_spec
+from reflex.event import (
+ EventChain,
+ EventHandler,
+ empty_event,
+ input_event,
+ parse_args_spec,
+)
from reflex.state import BaseState
from reflex.style import Style
from reflex.utils import imports
@@ -1224,6 +1230,7 @@ class EventState(rx.State):
v: int = 42
+ @rx.event
def handler(self):
"""A handler that does nothing."""
@@ -1778,7 +1785,7 @@ def test_custom_component_declare_event_handlers_in_fields():
return {
**super().get_event_triggers(),
"on_a": lambda e0: [e0],
- "on_b": lambda e0: [e0.target.value],
+ "on_b": input_event,
"on_c": lambda e0: [],
"on_d": lambda: [],
"on_e": lambda: [],
@@ -1787,9 +1794,9 @@ def test_custom_component_declare_event_handlers_in_fields():
class TestComponent(Component):
on_a: EventHandler[lambda e0: [e0]]
- on_b: EventHandler[lambda e0: [e0.target.value]]
- on_c: EventHandler[lambda e0: []]
- on_d: EventHandler[lambda: []]
+ on_b: EventHandler[input_event]
+ on_c: EventHandler[empty_event]
+ on_d: EventHandler[empty_event]
on_e: EventHandler
on_f: EventHandler[lambda a, b, c: [c, b, a]]
@@ -2141,6 +2148,7 @@ def test_add_style_foreach():
class TriggerState(rx.State):
"""Test state with event handlers."""
+ @rx.event
def do_something(self):
"""Sample event handler."""
pass
@@ -2209,3 +2217,56 @@ class TriggerState(rx.State):
)
def test_has_state_event_triggers(component, output):
assert component._has_stateful_event_triggers() == output
+
+
+class SpecialComponent(Box):
+ """A special component with custom attributes."""
+
+ data_prop: Var[str]
+ aria_prop: Var[str]
+
+
+@pytest.mark.parametrize(
+ ("component_kwargs", "exp_custom_attrs", "exp_style"),
+ [
+ (
+ {"data_test": "test", "aria_test": "test"},
+ {"data-test": "test", "aria-test": "test"},
+ {},
+ ),
+ (
+ {"data-test": "test", "aria-test": "test"},
+ {"data-test": "test", "aria-test": "test"},
+ {},
+ ),
+ (
+ {"custom_attrs": {"data-existing": "test"}, "data_new": "test"},
+ {"data-existing": "test", "data-new": "test"},
+ {},
+ ),
+ (
+ {"data_test": "test", "data_prop": "prop"},
+ {"data-test": "test"},
+ {},
+ ),
+ (
+ {"aria_test": "test", "aria_prop": "prop"},
+ {"aria-test": "test"},
+ {},
+ ),
+ ],
+)
+def test_special_props(component_kwargs, exp_custom_attrs, exp_style):
+ """Test that data_ and aria_ special props are correctly added to the component.
+
+ Args:
+ component_kwargs: The component kwargs.
+ exp_custom_attrs: The expected custom attributes.
+ exp_style: The expected style.
+ """
+ component = SpecialComponent.create(**component_kwargs)
+ assert component.custom_attrs == exp_custom_attrs
+ assert component.style == exp_style
+ for prop in SpecialComponent.get_props():
+ if prop in component_kwargs:
+ assert getattr(component, prop)._var_value == component_kwargs[prop]
diff --git a/tests/units/components/test_component_future_annotations.py b/tests/units/components/test_component_future_annotations.py
index 37aeb813a..44ec52c16 100644
--- a/tests/units/components/test_component_future_annotations.py
+++ b/tests/units/components/test_component_future_annotations.py
@@ -3,7 +3,7 @@ from __future__ import annotations
from typing import Any
from reflex.components.component import Component
-from reflex.event import EventHandler
+from reflex.event import EventHandler, empty_event, input_event
# This is a repeat of its namesake in test_component.py.
@@ -25,9 +25,9 @@ def test_custom_component_declare_event_handlers_in_fields():
class TestComponent(Component):
on_a: EventHandler[lambda e0: [e0]]
- on_b: EventHandler[lambda e0: [e0.target.value]]
- on_c: EventHandler[lambda e0: []]
- on_d: EventHandler[lambda: []]
+ on_b: EventHandler[input_event]
+ on_c: EventHandler[empty_event]
+ on_d: EventHandler[empty_event]
custom_component = ReferenceComponent.create()
test_component = TestComponent.create()
diff --git a/tests/units/components/test_tag.py b/tests/units/components/test_tag.py
index c41246e3f..a69e40b8b 100644
--- a/tests/units/components/test_tag.py
+++ b/tests/units/components/test_tag.py
@@ -119,7 +119,7 @@ def test_format_cond_tag():
tag_dict["false_value"],
)
assert cond._js_expr == "logged_in"
- assert cond._var_type == bool
+ assert cond._var_type is bool
assert true_value["name"] == "h1"
assert true_value["contents"] == "True content"
diff --git a/tests/units/conftest.py b/tests/units/conftest.py
index 589d35cd7..2f619a941 100644
--- a/tests/units/conftest.py
+++ b/tests/units/conftest.py
@@ -1,5 +1,6 @@
"""Test fixtures."""
+import asyncio
import contextlib
import os
import platform
@@ -24,6 +25,11 @@ from .states import (
)
+def pytest_configure(config):
+ if config.getoption("asyncio_mode") == "auto":
+ asyncio.set_event_loop_policy(asyncio.DefaultEventLoopPolicy())
+
+
@pytest.fixture
def app() -> App:
"""A base app.
diff --git a/tests/units/test_app.py b/tests/units/test_app.py
index 72f234058..6bb81522f 100644
--- a/tests/units/test_app.py
+++ b/tests/units/test_app.py
@@ -770,7 +770,8 @@ async def test_upload_file(tmp_path, state, delta, token: str, mocker):
)
state._tmp_path = tmp_path
# The App state must be the "root" of the state tree
- app = App(state=State)
+ app = App()
+ app._enable_state()
app.event_namespace.emit = AsyncMock() # type: ignore
current_state = await app.state_manager.get_state(_substate_key(token, state))
data = b"This is binary data"
@@ -904,6 +905,7 @@ class DynamicState(BaseState):
"""Event handler for page on_load, should trigger for all navigation events."""
self.loaded = self.loaded + 1
+ @rx.event
def on_counter(self):
"""Increment the counter var."""
self.counter = self.counter + 1
diff --git a/tests/units/test_config.py b/tests/units/test_config.py
index a6c6fe697..c4a143bc5 100644
--- a/tests/units/test_config.py
+++ b/tests/units/test_config.py
@@ -5,6 +5,7 @@ import pytest
import reflex as rx
import reflex.config
+from reflex.config import environment
from reflex.constants import Endpoint
@@ -178,7 +179,7 @@ def test_replace_defaults(
def reflex_dir_constant():
- return rx.constants.Reflex.DIR
+ return environment.REFLEX_DIR
def test_reflex_dir_env_var(monkeypatch, tmp_path):
diff --git a/tests/units/test_event.py b/tests/units/test_event.py
index 3996a6101..d7b7cf7a2 100644
--- a/tests/units/test_event.py
+++ b/tests/units/test_event.py
@@ -2,11 +2,18 @@ from typing import List
import pytest
-from reflex import event
-from reflex.event import Event, EventHandler, EventSpec, call_event_handler, fix_events
+from reflex.event import (
+ Event,
+ EventChain,
+ EventHandler,
+ EventSpec,
+ call_event_handler,
+ event,
+ fix_events,
+)
from reflex.state import BaseState
from reflex.utils import format
-from reflex.vars.base import LiteralVar, Var
+from reflex.vars.base import Field, LiteralVar, Var, field
def make_var(value) -> Var:
@@ -388,3 +395,28 @@ def test_event_actions_on_state():
assert sp_handler.event_actions == {"stopPropagation": True}
# should NOT affect other references to the handler
assert not handler.event_actions
+
+
+def test_event_var_data():
+ class S(BaseState):
+ x: Field[int] = field(0)
+
+ @event
+ def s(self, value: int):
+ pass
+
+ # Handler doesn't have any _var_data because it's just a str
+ handler_var = Var.create(S.s)
+ assert handler_var._get_all_var_data() is None
+
+ # Ensure spec carries _var_data
+ spec_var = Var.create(S.s(S.x))
+ assert spec_var._get_all_var_data() == S.x._get_all_var_data()
+
+ # Needed to instantiate the EventChain
+ def _args_spec(value: Var[int]) -> tuple[Var[int]]:
+ return (value,)
+
+ # Ensure chain carries _var_data
+ chain_var = Var.create(EventChain(events=[S.s(S.x)], args_spec=_args_spec))
+ assert chain_var._get_all_var_data() == S.x._get_all_var_data()
diff --git a/tests/units/test_state.py b/tests/units/test_state.py
index 5bfac7628..610d69110 100644
--- a/tests/units/test_state.py
+++ b/tests/units/test_state.py
@@ -9,10 +9,11 @@ import json
import os
import sys
from textwrap import dedent
-from typing import Any, Callable, Dict, Generator, List, Optional, Union
+from typing import Any, AsyncGenerator, Callable, Dict, List, Optional, Union
from unittest.mock import AsyncMock, Mock
import pytest
+import pytest_asyncio
from plotly.graph_objects import Figure
import reflex as rx
@@ -104,6 +105,7 @@ class TestState(BaseState):
complex: Dict[int, Object] = {1: Object(), 2: Object()}
fig: Figure = Figure()
dt: datetime.datetime = datetime.datetime.fromisoformat("1989-11-09T18:53:00+01:00")
+ _backend: int = 0
@ComputedVar
def sum(self) -> float:
@@ -273,9 +275,9 @@ def test_base_class_vars(test_state):
assert isinstance(prop, Var)
assert prop._js_expr.split(".")[-1] == field
- assert cls.num1._var_type == int
- assert cls.num2._var_type == float
- assert cls.key._var_type == str
+ assert cls.num1._var_type is int
+ assert cls.num2._var_type is float
+ assert cls.key._var_type is str
def test_computed_class_var(test_state):
@@ -525,7 +527,7 @@ def test_set_class_var():
TestState._set_var(Var(_js_expr="num3", _var_type=int)._var_set_state(TestState))
var = TestState.num3 # type: ignore
assert var._js_expr == TestState.get_full_name() + ".num3"
- assert var._var_type == int
+ assert var._var_type is int
assert var._var_state == TestState.get_full_name()
@@ -705,6 +707,7 @@ def test_reset(test_state, child_state):
# Set some values.
test_state.num1 = 1
test_state.num2 = 2
+ test_state._backend = 3
child_state.value = "test"
# Reset the state.
@@ -713,6 +716,7 @@ def test_reset(test_state, child_state):
# The values should be reset.
assert test_state.num1 == 0
assert test_state.num2 == 3.14
+ assert test_state._backend == 0
assert child_state.value == ""
expected_dirty_vars = {
@@ -728,6 +732,7 @@ def test_reset(test_state, child_state):
"map_key",
"mapping",
"dt",
+ "_backend",
}
# The dirty vars should be reset.
@@ -1285,19 +1290,19 @@ def test_computed_var_depends_on_parent_non_cached():
assert ps.dirty_vars == set()
assert cs.dirty_vars == set()
- dict1 = ps.dict()
+ dict1 = json.loads(json_dumps(ps.dict()))
assert dict1[ps.get_full_name()] == {
"no_cache_v": 1,
"router": formatted_router,
}
assert dict1[cs.get_full_name()] == {"dep_v": 2}
- dict2 = ps.dict()
+ dict2 = json.loads(json_dumps(ps.dict()))
assert dict2[ps.get_full_name()] == {
"no_cache_v": 3,
"router": formatted_router,
}
assert dict2[cs.get_full_name()] == {"dep_v": 4}
- dict3 = ps.dict()
+ dict3 = json.loads(json_dumps(ps.dict()))
assert dict3[ps.get_full_name()] == {
"no_cache_v": 5,
"router": formatted_router,
@@ -1597,8 +1602,10 @@ async def test_state_with_invalid_yield(capsys, mock_app):
assert "must only return/yield: None, Events or other EventHandlers" in captured.out
-@pytest.fixture(scope="function", params=["in_process", "disk", "redis"])
-def state_manager(request) -> Generator[StateManager, None, None]:
+@pytest_asyncio.fixture(
+ loop_scope="function", scope="function", params=["in_process", "disk", "redis"]
+)
+async def state_manager(request) -> AsyncGenerator[StateManager, None]:
"""Instance of state manager parametrized for redis and in-process.
Args:
@@ -1622,7 +1629,7 @@ def state_manager(request) -> Generator[StateManager, None, None]:
yield state_manager
if isinstance(state_manager, StateManagerRedis):
- asyncio.get_event_loop().run_until_complete(state_manager.close())
+ await state_manager.close()
@pytest.fixture()
@@ -1710,8 +1717,8 @@ async def test_state_manager_contend(
assert not state_manager._states_locks[token].locked()
-@pytest.fixture(scope="function")
-def state_manager_redis() -> Generator[StateManager, None, None]:
+@pytest_asyncio.fixture(loop_scope="function", scope="function")
+async def state_manager_redis() -> AsyncGenerator[StateManager, None]:
"""Instance of state manager for redis only.
Yields:
@@ -1724,7 +1731,7 @@ def state_manager_redis() -> Generator[StateManager, None, None]:
yield state_manager
- asyncio.get_event_loop().run_until_complete(state_manager.close())
+ await state_manager.close()
@pytest.fixture()
@@ -1884,11 +1891,11 @@ async def test_state_proxy(grandchild_state: GrandchildState, mock_app: rx.App):
async with sp:
assert sp._self_actx is not None
assert sp._self_mutable # proxy is mutable inside context
- if isinstance(mock_app.state_manager, StateManagerMemory):
+ if isinstance(mock_app.state_manager, (StateManagerMemory, StateManagerDisk)):
# For in-process store, only one instance of the state exists
assert sp.__wrapped__ is grandchild_state
else:
- # When redis or disk is used, a new+updated instance is assigned to the proxy
+ # When redis is used, a new+updated instance is assigned to the proxy
assert sp.__wrapped__ is not grandchild_state
sp.value2 = "42"
assert not sp._self_mutable # proxy is not mutable after exiting context
@@ -1899,7 +1906,7 @@ async def test_state_proxy(grandchild_state: GrandchildState, mock_app: rx.App):
gotten_state = await mock_app.state_manager.get_state(
_substate_key(grandchild_state.router.session.client_token, grandchild_state)
)
- if isinstance(mock_app.state_manager, StateManagerMemory):
+ if isinstance(mock_app.state_manager, (StateManagerMemory, StateManagerDisk)):
# For in-process store, only one instance of the state exists
assert gotten_state is parent_state
else:
@@ -2495,7 +2502,10 @@ def test_mutable_copy_vars(mutable_state: MutableTestState, copy_func: Callable)
def test_duplicate_substate_class(mocker):
+ # Neuter pytest escape hatch, because we want to test duplicate detection.
mocker.patch("reflex.state.is_testing_env", lambda: False)
+ # Neuter state handling since these _are_ defined inside a function.
+ mocker.patch("reflex.state.BaseState._handle_local_def", lambda: None)
with pytest.raises(ValueError):
class TestState(BaseState):
@@ -2790,6 +2800,9 @@ async def test_preprocess(app_module_mock, token, test_state, expected, mocker):
}
assert (await state._process(events[1]).__anext__()).delta == exp_is_hydrated(state)
+ if isinstance(app.state_manager, StateManagerRedis):
+ await app.state_manager.close()
+
@pytest.mark.asyncio
async def test_preprocess_multiple_load_events(app_module_mock, token, mocker):
@@ -2837,6 +2850,9 @@ async def test_preprocess_multiple_load_events(app_module_mock, token, mocker):
}
assert (await state._process(events[2]).__anext__()).delta == exp_is_hydrated(state)
+ if isinstance(app.state_manager, StateManagerRedis):
+ await app.state_manager.close()
+
@pytest.mark.asyncio
async def test_get_state(mock_app: rx.App, token: str):
@@ -2922,7 +2938,7 @@ async def test_get_state(mock_app: rx.App, token: str):
_substate_key(token, ChildState2)
)
assert isinstance(new_test_state, TestState)
- if isinstance(mock_app.state_manager, StateManagerMemory):
+ if isinstance(mock_app.state_manager, (StateManagerMemory, StateManagerDisk)):
# In memory, it's the same instance
assert new_test_state is test_state
test_state._clean()
@@ -2932,15 +2948,6 @@ async def test_get_state(mock_app: rx.App, token: str):
ChildState2.get_name(),
ChildState3.get_name(),
)
- elif isinstance(mock_app.state_manager, StateManagerDisk):
- # On disk, it's a new instance
- assert new_test_state is not test_state
- # All substates are available
- assert tuple(sorted(new_test_state.substates)) == (
- ChildState.get_name(),
- ChildState2.get_name(),
- ChildState3.get_name(),
- )
else:
# With redis, we get a whole new instance
assert new_test_state is not test_state
@@ -3197,6 +3204,7 @@ import reflex as rx
config = rx.Config(
app_name="project1",
redis_url="redis://localhost:6379",
+ state_manager_mode="redis",
{config_items}
)
"""
diff --git a/tests/units/test_state_tree.py b/tests/units/test_state_tree.py
index 7c1e13a91..ebdd877de 100644
--- a/tests/units/test_state_tree.py
+++ b/tests/units/test_state_tree.py
@@ -1,9 +1,9 @@
"""Specialized test for a larger state tree."""
-import asyncio
-from typing import Generator
+from typing import AsyncGenerator
import pytest
+import pytest_asyncio
import reflex as rx
from reflex.state import BaseState, StateManager, StateManagerRedis, _substate_key
@@ -210,8 +210,10 @@ ALWAYS_COMPUTED_DICT_KEYS = [
]
-@pytest.fixture(scope="function")
-def state_manager_redis(app_module_mock) -> Generator[StateManager, None, None]:
+@pytest_asyncio.fixture(loop_scope="function", scope="function")
+async def state_manager_redis(
+ app_module_mock,
+) -> AsyncGenerator[StateManager, None]:
"""Instance of state manager for redis only.
Args:
@@ -228,7 +230,7 @@ def state_manager_redis(app_module_mock) -> Generator[StateManager, None, None]:
yield state_manager
- asyncio.get_event_loop().run_until_complete(state_manager.close())
+ await state_manager.close()
@pytest.mark.asyncio
diff --git a/tests/units/test_var.py b/tests/units/test_var.py
index 227b01d85..c04e554a9 100644
--- a/tests/units/test_var.py
+++ b/tests/units/test_var.py
@@ -1,5 +1,6 @@
import json
import math
+import sys
import typing
from typing import Dict, List, Optional, Set, Tuple, Union, cast
@@ -398,6 +399,44 @@ def test_list_tuple_contains(var, expected):
assert str(var.contains(other_var)) == f"{expected}.includes(other)"
+class Foo(rx.Base):
+ """Foo class."""
+
+ bar: int
+ baz: str
+
+
+class Bar(rx.Base):
+ """Bar class."""
+
+ bar: str
+ baz: str
+ foo: int
+
+
+@pytest.mark.parametrize(
+ ("var", "var_type"),
+ (
+ [
+ (Var(_js_expr="", _var_type=Foo | Bar).guess_type(), Foo | Bar),
+ (Var(_js_expr="", _var_type=Foo | Bar).guess_type().bar, Union[int, str]),
+ ]
+ if sys.version_info >= (3, 10)
+ else []
+ )
+ + [
+ (Var(_js_expr="", _var_type=Union[Foo, Bar]).guess_type(), Union[Foo, Bar]),
+ (Var(_js_expr="", _var_type=Union[Foo, Bar]).guess_type().baz, str),
+ (
+ Var(_js_expr="", _var_type=Union[Foo, Bar]).guess_type().foo,
+ Union[int, None],
+ ),
+ ],
+)
+def test_var_types(var, var_type):
+ assert var._var_type == var_type
+
+
@pytest.mark.parametrize(
"var, expected",
[
@@ -490,7 +529,7 @@ def test_var_indexing_str():
# Test that indexing gives a type of Var[str].
assert isinstance(str_var[0], Var)
- assert str_var[0]._var_type == str
+ assert str_var[0]._var_type is str
# Test basic indexing.
assert str(str_var[0]) == "str.at(0)"
@@ -623,7 +662,7 @@ def test_str_var_slicing():
# Test that slicing gives a type of Var[str].
assert isinstance(str_var[:1], Var)
- assert str_var[:1]._var_type == str
+ assert str_var[:1]._var_type is str
# Test basic slicing.
assert str(str_var[:1]) == 'str.split("").slice(undefined, 1).join("")'
@@ -1809,3 +1848,6 @@ def test_to_string_operation():
assert cast(Var, TestState.email)._var_type == Email
assert cast(Var, TestState.optional_email)._var_type == Optional[Email]
+
+ single_var = Var.create(Email())
+ assert single_var._var_type == Email
diff --git a/tests/units/utils/test_format.py b/tests/units/utils/test_format.py
index d7b0c791e..17485d52e 100644
--- a/tests/units/utils/test_format.py
+++ b/tests/units/utils/test_format.py
@@ -8,7 +8,7 @@ import plotly.graph_objects as go
import pytest
from reflex.components.tags.tag import Tag
-from reflex.event import EventChain, EventHandler, EventSpec, FrontendEvent
+from reflex.event import EventChain, EventHandler, EventSpec, JavascriptInputEvent
from reflex.style import Style
from reflex.utils import format
from reflex.utils.serializers import serialize_figure
@@ -387,7 +387,7 @@ def test_format_match(
Var(
_js_expr="_e",
)
- .to(ObjectVar, FrontendEvent)
+ .to(ObjectVar, JavascriptInputEvent)
.target.value,
),
),
diff --git a/tests/units/utils/test_serializers.py b/tests/units/utils/test_serializers.py
index 630187309..8050470c6 100644
--- a/tests/units/utils/test_serializers.py
+++ b/tests/units/utils/test_serializers.py
@@ -96,7 +96,7 @@ class StrEnum(str, Enum):
BAR = "bar"
-class TestEnum(Enum):
+class FooBarEnum(Enum):
"""A lone enum class."""
FOO = "foo"
@@ -151,10 +151,10 @@ class BaseSubclass(Base):
"key2": "prefix_bar",
},
),
- (TestEnum.FOO, "foo"),
- ([TestEnum.FOO, TestEnum.BAR], ["foo", "bar"]),
+ (FooBarEnum.FOO, "foo"),
+ ([FooBarEnum.FOO, FooBarEnum.BAR], ["foo", "bar"]),
(
- {"key1": TestEnum.FOO, "key2": TestEnum.BAR},
+ {"key1": FooBarEnum.FOO, "key2": FooBarEnum.BAR},
{
"key1": "foo",
"key2": "bar",
diff --git a/tests/units/utils/test_types.py b/tests/units/utils/test_types.py
index fc9261e04..623aacc1f 100644
--- a/tests/units/utils/test_types.py
+++ b/tests/units/utils/test_types.py
@@ -1,4 +1,4 @@
-from typing import Any, List, Literal, Tuple, Union
+from typing import Any, Dict, List, Literal, Tuple, Union
import pytest
@@ -45,3 +45,48 @@ def test_issubclass(
cls: types.GenericType, cls_check: types.GenericType, expected: bool
) -> None:
assert types._issubclass(cls, cls_check) == expected
+
+
+class CustomDict(dict[str, str]):
+ """A custom dict with generic arguments."""
+
+ pass
+
+
+class ChildCustomDict(CustomDict):
+ """A child of CustomDict."""
+
+ pass
+
+
+class GenericDict(dict):
+ """A generic dict with no generic arguments."""
+
+ pass
+
+
+class ChildGenericDict(GenericDict):
+ """A child of GenericDict."""
+
+ pass
+
+
+@pytest.mark.parametrize(
+ "cls,expected",
+ [
+ (int, False),
+ (str, False),
+ (float, False),
+ (Tuple[int], True),
+ (List[int], True),
+ (Union[int, str], True),
+ (Union[str, int], True),
+ (Dict[str, int], True),
+ (CustomDict, True),
+ (ChildCustomDict, True),
+ (GenericDict, False),
+ (ChildGenericDict, False),
+ ],
+)
+def test_has_args(cls, expected: bool) -> None:
+ assert types.has_args(cls) == expected
diff --git a/tests/units/utils/test_utils.py b/tests/units/utils/test_utils.py
index 41bd4e661..81579acc7 100644
--- a/tests/units/utils/test_utils.py
+++ b/tests/units/utils/test_utils.py
@@ -542,7 +542,9 @@ def test_style_prop_with_event_handler_value(callable):
style = {
"color": (
- EventHandler(fn=callable) if type(callable) != EventHandler else callable
+ EventHandler(fn=callable)
+ if type(callable) is not EventHandler
+ else callable
)
}
diff --git a/tests/units/vars/test_base.py b/tests/units/vars/test_base.py
index f83d79373..68bc0c38e 100644
--- a/tests/units/vars/test_base.py
+++ b/tests/units/vars/test_base.py
@@ -5,6 +5,30 @@ import pytest
from reflex.vars.base import figure_out_type
+class CustomDict(dict[str, str]):
+ """A custom dict with generic arguments."""
+
+ pass
+
+
+class ChildCustomDict(CustomDict):
+ """A child of CustomDict."""
+
+ pass
+
+
+class GenericDict(dict):
+ """A generic dict with no generic arguments."""
+
+ pass
+
+
+class ChildGenericDict(GenericDict):
+ """A child of GenericDict."""
+
+ pass
+
+
@pytest.mark.parametrize(
("value", "expected"),
[
@@ -15,6 +39,10 @@ from reflex.vars.base import figure_out_type
([1, 2.0, "a"], List[Union[int, float, str]]),
({"a": 1, "b": 2}, Dict[str, int]),
({"a": 1, 2: "b"}, Dict[Union[int, str], Union[str, int]]),
+ (CustomDict(), CustomDict),
+ (ChildCustomDict(), ChildCustomDict),
+ (GenericDict({1: 1}), Dict[int, int]),
+ (ChildGenericDict({1: 1}), Dict[int, int]),
],
)
def test_figure_out_type(value, expected):