Compare commits
2 Commits
main
...
masenf/cus
Author | SHA1 | Date | |
---|---|---|---|
![]() |
6f49e3364a | ||
![]() |
05d3f12938 |
2
.github/codeql-config.yml
vendored
2
.github/codeql-config.yml
vendored
@ -1,2 +0,0 @@
|
||||
paths-ignore:
|
||||
- "**/tests/**"
|
50
.github/workflows/benchmarks.yml
vendored
50
.github/workflows/benchmarks.yml
vendored
@ -70,6 +70,56 @@ jobs:
|
||||
env:
|
||||
GITHUB_SHA: ${{ github.sha }}
|
||||
|
||||
simple-apps-benchmarks: # This app tests the compile times of various compoonents and pages
|
||||
if: github.event.pull_request.merged == true
|
||||
env:
|
||||
OUTPUT_FILE: benchmarks.json
|
||||
timeout-minutes: 50
|
||||
strategy:
|
||||
# Prioritize getting more information out of the workflow (even if something fails)
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# Show OS combos first in GUI
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
python-version: ["3.10.16", "3.11.11", "3.12.8"]
|
||||
exclude:
|
||||
- os: windows-latest
|
||||
python-version: "3.10.16"
|
||||
- os: windows-latest
|
||||
python-version: "3.11.11"
|
||||
# keep only one python version for MacOS
|
||||
- os: macos-latest
|
||||
python-version: "3.10.16"
|
||||
- os: macos-latest
|
||||
python-version: "3.11.11"
|
||||
include:
|
||||
- os: windows-latest
|
||||
python-version: "3.10.11"
|
||||
- os: windows-latest
|
||||
python-version: "3.11.9"
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
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 benchmark tests
|
||||
env:
|
||||
APP_HARNESS_HEADLESS: 1
|
||||
PYTHONUNBUFFERED: 1
|
||||
run: |
|
||||
poetry run pytest -v benchmarks/ --benchmark-json=${{ env.OUTPUT_FILE }} -s
|
||||
- name: Upload benchmark results
|
||||
# Only run if the database creds are available in this context.
|
||||
run:
|
||||
poetry run python benchmarks/benchmark_compile_times.py --os "${{ matrix.os }}"
|
||||
--python-version "${{ matrix.python-version }}" --commit-sha "${{ github.sha }}"
|
||||
--benchmark-json "${{ env.OUTPUT_FILE }}" --branch-name "${{ github.head_ref || github.ref_name }}"
|
||||
--event-type "${{ github.event_name }}" --pr-id "${{ github.event.pull_request.id }}"
|
||||
|
||||
reflex-dist-size: # This job is used to calculate the size of the Reflex distribution (wheel file)
|
||||
if: github.event.pull_request.merged == true
|
||||
timeout-minutes: 30
|
||||
|
103
.github/workflows/codeql.yml
vendored
103
.github/workflows/codeql.yml
vendored
@ -1,103 +0,0 @@
|
||||
# For most projects, this workflow file will not need changing; you simply need
|
||||
# to commit it to your repository.
|
||||
#
|
||||
# You may wish to alter this file to override the set of languages analyzed,
|
||||
# or to provide custom queries or build logic.
|
||||
#
|
||||
# ******** NOTE ********
|
||||
# We have attempted to detect the languages in your repository. Please check
|
||||
# the `language` matrix defined below to confirm you have the correct set of
|
||||
# supported CodeQL languages.
|
||||
#
|
||||
name: "CodeQL Advanced"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["main"]
|
||||
pull_request:
|
||||
branches: ["main"]
|
||||
schedule:
|
||||
- cron: "36 7 * * 4"
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze (${{ matrix.language }})
|
||||
# Runner size impacts CodeQL analysis time. To learn more, please see:
|
||||
# - https://gh.io/recommended-hardware-resources-for-running-codeql
|
||||
# - https://gh.io/supported-runners-and-hardware-resources
|
||||
# - https://gh.io/using-larger-runners (GitHub.com only)
|
||||
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
|
||||
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
|
||||
permissions:
|
||||
# required for all workflows
|
||||
security-events: write
|
||||
|
||||
# required to fetch internal or private CodeQL packs
|
||||
packages: read
|
||||
|
||||
# only required for workflows in private repositories
|
||||
actions: read
|
||||
contents: read
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- language: javascript-typescript
|
||||
build-mode: none
|
||||
- language: python
|
||||
build-mode: none
|
||||
- language: actions
|
||||
build-mode: none
|
||||
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
|
||||
# Use `c-cpp` to analyze code written in C, C++ or both
|
||||
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
|
||||
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
|
||||
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
|
||||
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
|
||||
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
|
||||
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# Add any setup steps before running the `github/codeql-action/init` action.
|
||||
# This includes steps like installing compilers or runtimes (`actions/setup-node`
|
||||
# or others). This is typically only required for manual builds.
|
||||
# - name: Setup runtime (example)
|
||||
# uses: actions/setup-example@v1
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v3
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
config-file: .github/codeql-config.yml
|
||||
build-mode: ${{ matrix.build-mode }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
|
||||
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
||||
# queries: security-extended,security-and-quality
|
||||
|
||||
# If the analyze step fails for one of the languages you are analyzing with
|
||||
# "We were unable to automatically build your code", modify the matrix above
|
||||
# to set the build mode to "manual" for that language. Then modify this step
|
||||
# to build your code.
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
||||
- if: matrix.build-mode == 'manual'
|
||||
shell: bash
|
||||
run: |
|
||||
echo 'If you are using a "manual" build mode for one or more of the' \
|
||||
'languages you are analyzing, replace this with the commands to build' \
|
||||
'your code, for example:'
|
||||
echo ' make bootstrap'
|
||||
echo ' make release'
|
||||
exit 1
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v3
|
||||
with:
|
||||
category: "/language:${{matrix.language}}"
|
32
.github/workflows/integration_tests.yml
vendored
32
.github/workflows/integration_tests.yml
vendored
@ -94,6 +94,26 @@ jobs:
|
||||
# Check that npm is home
|
||||
npm -v
|
||||
poetry run bash scripts/integration.sh ./reflex-examples/counter dev
|
||||
- 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 }}"
|
||||
--path ./reflex-examples/counter/.web
|
||||
--app-name "counter"
|
||||
- name: Install hyperfine
|
||||
run: cargo install hyperfine
|
||||
- name: Benchmark imports
|
||||
working-directory: ./reflex-examples/counter
|
||||
run: hyperfine --warmup 3 "export POETRY_VIRTUALENVS_PATH=../../.venv; poetry run python counter/counter.py" --show-output --export-json "${{ env.OUTPUT_FILE }}" --shell bash
|
||||
- name: Upload Benchmarks
|
||||
run:
|
||||
poetry run python benchmarks/benchmark_imports.py --os "${{ matrix.os }}"
|
||||
--python-version "${{ matrix.python-version }}" --commit-sha "${{ github.sha }}"
|
||||
--benchmark-json "./reflex-examples/counter/${{ env.OUTPUT_FILE }}"
|
||||
--branch-name "${{ github.head_ref || github.ref_name }}" --pr-id "${{ github.event.pull_request.id }}"
|
||||
--app-name "counter"
|
||||
- name: Install requirements for nba proxy example
|
||||
working-directory: ./reflex-examples/nba-proxy
|
||||
run: |
|
||||
@ -154,6 +174,12 @@ jobs:
|
||||
# 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
|
||||
|
||||
rx-shout-from-template:
|
||||
strategy:
|
||||
@ -217,3 +243,9 @@ jobs:
|
||||
# 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
|
||||
|
@ -3,7 +3,7 @@ fail_fast: true
|
||||
repos:
|
||||
|
||||
- repo: https://github.com/charliermarsh/ruff-pre-commit
|
||||
rev: v0.9.6
|
||||
rev: v0.9.3
|
||||
hooks:
|
||||
- id: ruff-format
|
||||
args: [reflex, tests]
|
||||
|
376
benchmarks/test_benchmark_compile_components.py
Normal file
376
benchmarks/test_benchmark_compile_components.py
Normal file
@ -0,0 +1,376 @@
|
||||
"""Benchmark tests for apps with varying component numbers."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import functools
|
||||
import time
|
||||
from typing import Generator
|
||||
|
||||
import pytest
|
||||
|
||||
from benchmarks import WINDOWS_SKIP_REASON
|
||||
from reflex import constants
|
||||
from reflex.compiler import utils
|
||||
from reflex.testing import AppHarness, chdir
|
||||
from reflex.utils import build
|
||||
from reflex.utils.prerequisites import get_web_dir
|
||||
|
||||
web_pages = get_web_dir() / constants.Dirs.PAGES
|
||||
|
||||
|
||||
def render_component(num: int):
|
||||
"""Generate a number of components based on num.
|
||||
|
||||
Args:
|
||||
num: number of components to produce.
|
||||
|
||||
Returns:
|
||||
The rendered number of components.
|
||||
"""
|
||||
import reflex as rx
|
||||
|
||||
return [
|
||||
rx.fragment(
|
||||
rx.box(
|
||||
rx.accordion.root(
|
||||
rx.accordion.item(
|
||||
header="Full Ingredients",
|
||||
content="Yes. It's built with accessibility in mind.",
|
||||
font_size="3em",
|
||||
),
|
||||
rx.accordion.item(
|
||||
header="Applications",
|
||||
content="Yes. It's unstyled by default, giving you freedom over the look and feel.",
|
||||
),
|
||||
collapsible=True,
|
||||
variant="ghost",
|
||||
width="25rem",
|
||||
),
|
||||
padding_top="20px",
|
||||
),
|
||||
rx.box(
|
||||
rx.drawer.root(
|
||||
rx.drawer.trigger(
|
||||
rx.button("Open Drawer with snap points"), as_child=True
|
||||
),
|
||||
rx.drawer.overlay(),
|
||||
rx.drawer.portal(
|
||||
rx.drawer.content(
|
||||
rx.flex(
|
||||
rx.drawer.title("Drawer Content"),
|
||||
rx.drawer.description("Drawer description"),
|
||||
rx.drawer.close(
|
||||
rx.button("Close Button"),
|
||||
as_child=True,
|
||||
),
|
||||
direction="column",
|
||||
margin="5em",
|
||||
align_items="center",
|
||||
),
|
||||
top="auto",
|
||||
height="100%",
|
||||
flex_direction="column",
|
||||
background_color="var(--green-3)",
|
||||
),
|
||||
),
|
||||
snap_points=["148px", "355px", 1],
|
||||
),
|
||||
),
|
||||
rx.box(
|
||||
rx.callout(
|
||||
"You will need admin privileges to install and access this application.",
|
||||
icon="info",
|
||||
size="3",
|
||||
),
|
||||
),
|
||||
rx.box(
|
||||
rx.table.root(
|
||||
rx.table.header(
|
||||
rx.table.row(
|
||||
rx.table.column_header_cell("Full name"),
|
||||
rx.table.column_header_cell("Email"),
|
||||
rx.table.column_header_cell("Group"),
|
||||
),
|
||||
),
|
||||
rx.table.body(
|
||||
rx.table.row(
|
||||
rx.table.row_header_cell("Danilo Sousa"),
|
||||
rx.table.cell("danilo@example.com"),
|
||||
rx.table.cell("Developer"),
|
||||
),
|
||||
rx.table.row(
|
||||
rx.table.row_header_cell("Zahra Ambessa"),
|
||||
rx.table.cell("zahra@example.com"),
|
||||
rx.table.cell("Admin"),
|
||||
),
|
||||
rx.table.row(
|
||||
rx.table.row_header_cell("Jasper Eriksson"),
|
||||
rx.table.cell("jasper@example.com"),
|
||||
rx.table.cell("Developer"),
|
||||
),
|
||||
),
|
||||
)
|
||||
),
|
||||
)
|
||||
] * num
|
||||
|
||||
|
||||
def AppWithTenComponentsOnePage():
|
||||
"""A reflex app with roughly 10 components on one page."""
|
||||
import reflex as rx
|
||||
|
||||
def index() -> rx.Component:
|
||||
return rx.center(rx.vstack(*render_component(1)))
|
||||
|
||||
app = rx.App(_state=rx.State)
|
||||
app.add_page(index)
|
||||
|
||||
|
||||
def AppWithHundredComponentOnePage():
|
||||
"""A reflex app with roughly 100 components on one page."""
|
||||
import reflex as rx
|
||||
|
||||
def index() -> rx.Component:
|
||||
return rx.center(rx.vstack(*render_component(100)))
|
||||
|
||||
app = rx.App(_state=rx.State)
|
||||
app.add_page(index)
|
||||
|
||||
|
||||
def AppWithThousandComponentsOnePage():
|
||||
"""A reflex app with roughly 1000 components on one page."""
|
||||
import reflex as rx
|
||||
|
||||
def index() -> rx.Component:
|
||||
return rx.center(rx.vstack(*render_component(1000)))
|
||||
|
||||
app = rx.App(_state=rx.State)
|
||||
app.add_page(index)
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def app_with_10_components(
|
||||
tmp_path_factory,
|
||||
) -> Generator[AppHarness, None, None]:
|
||||
"""Start Blank Template app at tmp_path via AppHarness.
|
||||
|
||||
Args:
|
||||
tmp_path_factory: pytest tmp_path_factory fixture
|
||||
|
||||
Yields:
|
||||
running AppHarness instance
|
||||
"""
|
||||
root = tmp_path_factory.mktemp("app10components")
|
||||
|
||||
yield AppHarness.create(
|
||||
root=root,
|
||||
app_source=functools.partial(
|
||||
AppWithTenComponentsOnePage,
|
||||
render_component=render_component, # pyright: ignore [reportCallIssue]
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def app_with_100_components(
|
||||
tmp_path_factory,
|
||||
) -> Generator[AppHarness, None, None]:
|
||||
"""Start Blank Template app at tmp_path via AppHarness.
|
||||
|
||||
Args:
|
||||
tmp_path_factory: pytest tmp_path_factory fixture
|
||||
|
||||
Yields:
|
||||
running AppHarness instance
|
||||
"""
|
||||
root = tmp_path_factory.mktemp("app100components")
|
||||
|
||||
yield AppHarness.create(
|
||||
root=root,
|
||||
app_source=functools.partial(
|
||||
AppWithHundredComponentOnePage,
|
||||
render_component=render_component, # pyright: ignore [reportCallIssue]
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def app_with_1000_components(
|
||||
tmp_path_factory,
|
||||
) -> Generator[AppHarness, None, None]:
|
||||
"""Create an app with 1000 components at tmp_path via AppHarness.
|
||||
|
||||
Args:
|
||||
tmp_path_factory: pytest tmp_path_factory fixture
|
||||
|
||||
Yields:
|
||||
an AppHarness instance
|
||||
"""
|
||||
root = tmp_path_factory.mktemp("app1000components")
|
||||
|
||||
yield AppHarness.create(
|
||||
root=root,
|
||||
app_source=functools.partial(
|
||||
AppWithThousandComponentsOnePage,
|
||||
render_component=render_component, # pyright: ignore [reportCallIssue]
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.skipif(constants.IS_WINDOWS, reason=WINDOWS_SKIP_REASON)
|
||||
@pytest.mark.benchmark(
|
||||
group="Compile time of varying component numbers",
|
||||
timer=time.perf_counter,
|
||||
disable_gc=True,
|
||||
warmup=False,
|
||||
)
|
||||
def test_app_10_compile_time_cold(benchmark, app_with_10_components):
|
||||
"""Test the compile time on a cold start for an app with roughly 10 components.
|
||||
|
||||
Args:
|
||||
benchmark: The benchmark fixture.
|
||||
app_with_10_components: The app harness.
|
||||
"""
|
||||
|
||||
def setup():
|
||||
with chdir(app_with_10_components.app_path):
|
||||
utils.empty_dir(web_pages, ["_app.js"])
|
||||
app_with_10_components._initialize_app()
|
||||
build.setup_frontend(app_with_10_components.app_path)
|
||||
|
||||
def benchmark_fn():
|
||||
with chdir(app_with_10_components.app_path):
|
||||
app_with_10_components.app_instance._compile()
|
||||
|
||||
benchmark.pedantic(benchmark_fn, setup=setup, rounds=10)
|
||||
|
||||
|
||||
@pytest.mark.benchmark(
|
||||
group="Compile time of varying component numbers",
|
||||
min_rounds=5,
|
||||
timer=time.perf_counter,
|
||||
disable_gc=True,
|
||||
warmup=False,
|
||||
)
|
||||
def test_app_10_compile_time_warm(benchmark, app_with_10_components):
|
||||
"""Test the compile time on a warm start for an app with roughly 10 components.
|
||||
|
||||
Args:
|
||||
benchmark: The benchmark fixture.
|
||||
app_with_10_components: The app harness.
|
||||
"""
|
||||
with chdir(app_with_10_components.app_path):
|
||||
app_with_10_components._initialize_app()
|
||||
build.setup_frontend(app_with_10_components.app_path)
|
||||
|
||||
def benchmark_fn():
|
||||
with chdir(app_with_10_components.app_path):
|
||||
app_with_10_components.app_instance._compile()
|
||||
|
||||
benchmark(benchmark_fn)
|
||||
|
||||
|
||||
@pytest.mark.skipif(constants.IS_WINDOWS, reason=WINDOWS_SKIP_REASON)
|
||||
@pytest.mark.benchmark(
|
||||
group="Compile time of varying component numbers",
|
||||
timer=time.perf_counter,
|
||||
disable_gc=True,
|
||||
warmup=False,
|
||||
)
|
||||
def test_app_100_compile_time_cold(benchmark, app_with_100_components):
|
||||
"""Test the compile time on a cold start for an app with roughly 100 components.
|
||||
|
||||
Args:
|
||||
benchmark: The benchmark fixture.
|
||||
app_with_100_components: The app harness.
|
||||
"""
|
||||
|
||||
def setup():
|
||||
with chdir(app_with_100_components.app_path):
|
||||
utils.empty_dir(web_pages, ["_app.js"])
|
||||
app_with_100_components._initialize_app()
|
||||
build.setup_frontend(app_with_100_components.app_path)
|
||||
|
||||
def benchmark_fn():
|
||||
with chdir(app_with_100_components.app_path):
|
||||
app_with_100_components.app_instance._compile()
|
||||
|
||||
benchmark.pedantic(benchmark_fn, setup=setup, rounds=5)
|
||||
|
||||
|
||||
@pytest.mark.benchmark(
|
||||
group="Compile time of varying component numbers",
|
||||
min_rounds=5,
|
||||
timer=time.perf_counter,
|
||||
disable_gc=True,
|
||||
warmup=False,
|
||||
)
|
||||
def test_app_100_compile_time_warm(benchmark, app_with_100_components):
|
||||
"""Test the compile time on a warm start for an app with roughly 100 components.
|
||||
|
||||
Args:
|
||||
benchmark: The benchmark fixture.
|
||||
app_with_100_components: The app harness.
|
||||
"""
|
||||
with chdir(app_with_100_components.app_path):
|
||||
app_with_100_components._initialize_app()
|
||||
build.setup_frontend(app_with_100_components.app_path)
|
||||
|
||||
def benchmark_fn():
|
||||
with chdir(app_with_100_components.app_path):
|
||||
app_with_100_components.app_instance._compile()
|
||||
|
||||
benchmark(benchmark_fn)
|
||||
|
||||
|
||||
@pytest.mark.skipif(constants.IS_WINDOWS, reason=WINDOWS_SKIP_REASON)
|
||||
@pytest.mark.benchmark(
|
||||
group="Compile time of varying component numbers",
|
||||
timer=time.perf_counter,
|
||||
disable_gc=True,
|
||||
warmup=False,
|
||||
)
|
||||
def test_app_1000_compile_time_cold(benchmark, app_with_1000_components):
|
||||
"""Test the compile time on a cold start for an app with roughly 1000 components.
|
||||
|
||||
Args:
|
||||
benchmark: The benchmark fixture.
|
||||
app_with_1000_components: The app harness.
|
||||
"""
|
||||
|
||||
def setup():
|
||||
with chdir(app_with_1000_components.app_path):
|
||||
utils.empty_dir(web_pages, keep_files=["_app.js"])
|
||||
app_with_1000_components._initialize_app()
|
||||
build.setup_frontend(app_with_1000_components.app_path)
|
||||
|
||||
def benchmark_fn():
|
||||
with chdir(app_with_1000_components.app_path):
|
||||
app_with_1000_components.app_instance._compile()
|
||||
|
||||
benchmark.pedantic(benchmark_fn, setup=setup, rounds=5)
|
||||
|
||||
|
||||
@pytest.mark.benchmark(
|
||||
group="Compile time of varying component numbers",
|
||||
min_rounds=5,
|
||||
timer=time.perf_counter,
|
||||
disable_gc=True,
|
||||
warmup=False,
|
||||
)
|
||||
def test_app_1000_compile_time_warm(benchmark, app_with_1000_components):
|
||||
"""Test the compile time on a warm start for an app with roughly 1000 components.
|
||||
|
||||
Args:
|
||||
benchmark: The benchmark fixture.
|
||||
app_with_1000_components: The app harness.
|
||||
"""
|
||||
with chdir(app_with_1000_components.app_path):
|
||||
app_with_1000_components._initialize_app()
|
||||
build.setup_frontend(app_with_1000_components.app_path)
|
||||
|
||||
def benchmark_fn():
|
||||
with chdir(app_with_1000_components.app_path):
|
||||
app_with_1000_components.app_instance._compile()
|
||||
|
||||
benchmark(benchmark_fn)
|
579
benchmarks/test_benchmark_compile_pages.py
Normal file
579
benchmarks/test_benchmark_compile_pages.py
Normal file
@ -0,0 +1,579 @@
|
||||
"""Benchmark tests for apps with varying page numbers."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import functools
|
||||
import time
|
||||
from typing import Generator
|
||||
|
||||
import pytest
|
||||
|
||||
from benchmarks import WINDOWS_SKIP_REASON
|
||||
from reflex import constants
|
||||
from reflex.compiler import utils
|
||||
from reflex.testing import AppHarness, chdir
|
||||
from reflex.utils import build
|
||||
from reflex.utils.prerequisites import get_web_dir
|
||||
|
||||
web_pages = get_web_dir() / constants.Dirs.PAGES
|
||||
|
||||
|
||||
def render_multiple_pages(app, num: int):
|
||||
"""Add multiple pages based on num.
|
||||
|
||||
Args:
|
||||
app: The App object.
|
||||
num: number of pages to render.
|
||||
|
||||
"""
|
||||
from typing import Tuple
|
||||
|
||||
from rxconfig import config # pyright: ignore [reportMissingImports]
|
||||
|
||||
import reflex as rx
|
||||
|
||||
docs_url = "https://reflex.dev/docs/getting-started/introduction/"
|
||||
filename = f"{config.app_name}/{config.app_name}.py"
|
||||
college = [
|
||||
"Stanford University",
|
||||
"Arizona",
|
||||
"Arizona state",
|
||||
"Baylor",
|
||||
"Boston College",
|
||||
"Boston University",
|
||||
]
|
||||
|
||||
class State(rx.State):
|
||||
"""The app state."""
|
||||
|
||||
position: str
|
||||
college: str
|
||||
age: Tuple[int, int] = (18, 50)
|
||||
salary: Tuple[int, int] = (0, 25000000)
|
||||
|
||||
comp1 = rx.center(
|
||||
rx.theme_panel(),
|
||||
rx.vstack(
|
||||
rx.heading("Welcome to Reflex!", size="9"),
|
||||
rx.text("Get started by editing ", rx.code(filename)),
|
||||
rx.button(
|
||||
"Check out our docs!",
|
||||
on_click=lambda: rx.redirect(docs_url),
|
||||
size="4",
|
||||
),
|
||||
align="center",
|
||||
spacing="7",
|
||||
font_size="2em",
|
||||
),
|
||||
height="100vh",
|
||||
)
|
||||
|
||||
comp2 = rx.vstack(
|
||||
rx.hstack(
|
||||
rx.vstack(
|
||||
rx.select(
|
||||
["C", "PF", "SF", "PG", "SG"],
|
||||
placeholder="Select a position. (All)",
|
||||
on_change=State.set_position, # pyright: ignore [reportAttributeAccessIssue]
|
||||
size="3",
|
||||
),
|
||||
rx.select(
|
||||
college,
|
||||
placeholder="Select a college. (All)",
|
||||
on_change=State.set_college, # pyright: ignore [reportAttributeAccessIssue]
|
||||
size="3",
|
||||
),
|
||||
),
|
||||
rx.vstack(
|
||||
rx.vstack(
|
||||
rx.hstack(
|
||||
rx.badge("Min Age: ", State.age[0]),
|
||||
rx.divider(orientation="vertical"),
|
||||
rx.badge("Max Age: ", State.age[1]),
|
||||
),
|
||||
rx.slider(
|
||||
default_value=[18, 50],
|
||||
min=18,
|
||||
max=50,
|
||||
on_value_commit=State.set_age, # pyright: ignore [reportAttributeAccessIssue]
|
||||
),
|
||||
align_items="left",
|
||||
width="100%",
|
||||
),
|
||||
rx.vstack(
|
||||
rx.hstack(
|
||||
rx.badge("Min Sal: ", State.salary[0] // 1000000, "M"),
|
||||
rx.divider(orientation="vertical"),
|
||||
rx.badge("Max Sal: ", State.salary[1] // 1000000, "M"),
|
||||
),
|
||||
rx.slider(
|
||||
default_value=[0, 25000000],
|
||||
min=0,
|
||||
max=25000000,
|
||||
on_value_commit=State.set_salary, # pyright: ignore [reportAttributeAccessIssue]
|
||||
),
|
||||
align_items="left",
|
||||
width="100%",
|
||||
),
|
||||
),
|
||||
spacing="4",
|
||||
),
|
||||
width="100%",
|
||||
)
|
||||
|
||||
for i in range(1, num + 1):
|
||||
if i % 2 == 1:
|
||||
app.add_page(comp1, route=f"page{i}")
|
||||
else:
|
||||
app.add_page(comp2, route=f"page{i}")
|
||||
|
||||
|
||||
def AppWithOnePage():
|
||||
"""A reflex app with one page."""
|
||||
from rxconfig import config # pyright: ignore [reportMissingImports]
|
||||
|
||||
import reflex as rx
|
||||
|
||||
docs_url = "https://reflex.dev/docs/getting-started/introduction/"
|
||||
filename = f"{config.app_name}/{config.app_name}.py"
|
||||
|
||||
class State(rx.State):
|
||||
"""The app state."""
|
||||
|
||||
pass
|
||||
|
||||
def index() -> rx.Component:
|
||||
return rx.center(
|
||||
rx.input(
|
||||
id="token", value=State.router.session.client_token, is_read_only=True
|
||||
),
|
||||
rx.vstack(
|
||||
rx.heading("Welcome to Reflex!", size="9"),
|
||||
rx.text("Get started by editing ", rx.code(filename)),
|
||||
rx.button(
|
||||
"Check out our docs!",
|
||||
on_click=lambda: rx.redirect(docs_url),
|
||||
size="4",
|
||||
),
|
||||
align="center",
|
||||
spacing="7",
|
||||
font_size="2em",
|
||||
),
|
||||
height="100vh",
|
||||
)
|
||||
|
||||
app = rx.App(_state=rx.State)
|
||||
app.add_page(index)
|
||||
|
||||
|
||||
def AppWithTenPages():
|
||||
"""A reflex app with 10 pages."""
|
||||
import reflex as rx
|
||||
|
||||
app = rx.App(_state=rx.State)
|
||||
render_multiple_pages(app, 10)
|
||||
|
||||
|
||||
def AppWithHundredPages():
|
||||
"""A reflex app with 100 pages."""
|
||||
import reflex as rx
|
||||
|
||||
app = rx.App(_state=rx.State)
|
||||
render_multiple_pages(app, 100)
|
||||
|
||||
|
||||
def AppWithThousandPages():
|
||||
"""A reflex app with Thousand pages."""
|
||||
import reflex as rx
|
||||
|
||||
app = rx.App(_state=rx.State)
|
||||
render_multiple_pages(app, 1000)
|
||||
|
||||
|
||||
def AppWithTenThousandPages():
|
||||
"""A reflex app with ten thousand pages."""
|
||||
import reflex as rx
|
||||
|
||||
app = rx.App(_state=rx.State)
|
||||
render_multiple_pages(app, 10000)
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def app_with_one_page(
|
||||
tmp_path_factory,
|
||||
) -> Generator[AppHarness, None, None]:
|
||||
"""Create an app with 10000 pages at tmp_path via AppHarness.
|
||||
|
||||
Args:
|
||||
tmp_path_factory: pytest tmp_path_factory fixture
|
||||
|
||||
Yields:
|
||||
an AppHarness instance
|
||||
"""
|
||||
root = tmp_path_factory.mktemp("app1")
|
||||
|
||||
yield AppHarness.create(root=root, app_source=AppWithOnePage)
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def app_with_ten_pages(
|
||||
tmp_path_factory,
|
||||
) -> Generator[AppHarness, None, None]:
|
||||
"""Create an app with 10 pages at tmp_path via AppHarness.
|
||||
|
||||
Args:
|
||||
tmp_path_factory: pytest tmp_path_factory fixture
|
||||
|
||||
Yields:
|
||||
an AppHarness instance
|
||||
"""
|
||||
root = tmp_path_factory.mktemp("app10")
|
||||
yield AppHarness.create(
|
||||
root=root,
|
||||
app_source=functools.partial(
|
||||
AppWithTenPages,
|
||||
render_comp=render_multiple_pages, # pyright: ignore [reportCallIssue]
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def app_with_hundred_pages(
|
||||
tmp_path_factory,
|
||||
) -> Generator[AppHarness, None, None]:
|
||||
"""Create an app with 100 pages at tmp_path via AppHarness.
|
||||
|
||||
Args:
|
||||
tmp_path_factory: pytest tmp_path_factory fixture
|
||||
|
||||
Yields:
|
||||
an AppHarness instance
|
||||
"""
|
||||
root = tmp_path_factory.mktemp("app100")
|
||||
|
||||
yield AppHarness.create(
|
||||
root=root,
|
||||
app_source=functools.partial(
|
||||
AppWithHundredPages,
|
||||
render_comp=render_multiple_pages, # pyright: ignore [reportCallIssue]
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def app_with_thousand_pages(
|
||||
tmp_path_factory,
|
||||
) -> Generator[AppHarness, None, None]:
|
||||
"""Create an app with 1000 pages at tmp_path via AppHarness.
|
||||
|
||||
Args:
|
||||
tmp_path_factory: pytest tmp_path_factory fixture
|
||||
|
||||
Yields:
|
||||
an AppHarness instance
|
||||
"""
|
||||
root = tmp_path_factory.mktemp("app1000")
|
||||
|
||||
yield AppHarness.create(
|
||||
root=root,
|
||||
app_source=functools.partial(
|
||||
AppWithThousandPages,
|
||||
render_comp=render_multiple_pages, # pyright: ignore [reportCallIssue]
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def app_with_ten_thousand_pages(
|
||||
tmp_path_factory,
|
||||
) -> Generator[AppHarness, None, None]:
|
||||
"""Create an app with 10000 pages at tmp_path via AppHarness.
|
||||
|
||||
Args:
|
||||
tmp_path_factory: pytest tmp_path_factory fixture
|
||||
|
||||
Yields:
|
||||
running AppHarness instance
|
||||
"""
|
||||
root = tmp_path_factory.mktemp("app10000")
|
||||
|
||||
yield AppHarness.create(
|
||||
root=root,
|
||||
app_source=functools.partial(
|
||||
AppWithTenThousandPages,
|
||||
render_comp=render_multiple_pages, # pyright: ignore [reportCallIssue]
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.skipif(constants.IS_WINDOWS, reason=WINDOWS_SKIP_REASON)
|
||||
@pytest.mark.benchmark(
|
||||
group="Compile time of varying page numbers",
|
||||
timer=time.perf_counter,
|
||||
disable_gc=True,
|
||||
warmup=False,
|
||||
)
|
||||
def test_app_1_compile_time_cold(benchmark, app_with_one_page):
|
||||
"""Test the compile time on a cold start for an app with 1 page.
|
||||
|
||||
Args:
|
||||
benchmark: The benchmark fixture.
|
||||
app_with_one_page: The app harness.
|
||||
"""
|
||||
|
||||
def setup():
|
||||
with chdir(app_with_one_page.app_path):
|
||||
utils.empty_dir(web_pages, keep_files=["_app.js"])
|
||||
app_with_one_page._initialize_app()
|
||||
build.setup_frontend(app_with_one_page.app_path)
|
||||
|
||||
def benchmark_fn():
|
||||
with chdir(app_with_one_page.app_path):
|
||||
app_with_one_page.app_instance._compile()
|
||||
|
||||
benchmark.pedantic(benchmark_fn, setup=setup, rounds=5)
|
||||
app_with_one_page._reload_state_module()
|
||||
|
||||
|
||||
@pytest.mark.benchmark(
|
||||
group="Compile time of varying page numbers",
|
||||
min_rounds=5,
|
||||
timer=time.perf_counter,
|
||||
disable_gc=True,
|
||||
warmup=False,
|
||||
)
|
||||
def test_app_1_compile_time_warm(benchmark, app_with_one_page):
|
||||
"""Test the compile time on a warm start for an app with 1 page.
|
||||
|
||||
Args:
|
||||
benchmark: The benchmark fixture.
|
||||
app_with_one_page: The app harness.
|
||||
"""
|
||||
with chdir(app_with_one_page.app_path):
|
||||
app_with_one_page._initialize_app()
|
||||
build.setup_frontend(app_with_one_page.app_path)
|
||||
|
||||
def benchmark_fn():
|
||||
with chdir(app_with_one_page.app_path):
|
||||
app_with_one_page.app_instance._compile()
|
||||
|
||||
benchmark(benchmark_fn)
|
||||
app_with_one_page._reload_state_module()
|
||||
|
||||
|
||||
@pytest.mark.skipif(constants.IS_WINDOWS, reason=WINDOWS_SKIP_REASON)
|
||||
@pytest.mark.benchmark(
|
||||
group="Compile time of varying page numbers",
|
||||
timer=time.perf_counter,
|
||||
disable_gc=True,
|
||||
warmup=False,
|
||||
)
|
||||
def test_app_10_compile_time_cold(benchmark, app_with_ten_pages):
|
||||
"""Test the compile time on a cold start for an app with 10 page.
|
||||
|
||||
Args:
|
||||
benchmark: The benchmark fixture.
|
||||
app_with_ten_pages: The app harness.
|
||||
"""
|
||||
|
||||
def setup():
|
||||
with chdir(app_with_ten_pages.app_path):
|
||||
utils.empty_dir(web_pages, keep_files=["_app.js"])
|
||||
app_with_ten_pages._initialize_app()
|
||||
build.setup_frontend(app_with_ten_pages.app_path)
|
||||
|
||||
def benchmark_fn():
|
||||
with chdir(app_with_ten_pages.app_path):
|
||||
app_with_ten_pages.app_instance._compile()
|
||||
|
||||
benchmark.pedantic(benchmark_fn, setup=setup, rounds=5)
|
||||
app_with_ten_pages._reload_state_module()
|
||||
|
||||
|
||||
@pytest.mark.benchmark(
|
||||
group="Compile time of varying page numbers",
|
||||
min_rounds=5,
|
||||
timer=time.perf_counter,
|
||||
disable_gc=True,
|
||||
warmup=False,
|
||||
)
|
||||
def test_app_10_compile_time_warm(benchmark, app_with_ten_pages):
|
||||
"""Test the compile time on a warm start for an app with 10 page.
|
||||
|
||||
Args:
|
||||
benchmark: The benchmark fixture.
|
||||
app_with_ten_pages: The app harness.
|
||||
"""
|
||||
with chdir(app_with_ten_pages.app_path):
|
||||
app_with_ten_pages._initialize_app()
|
||||
build.setup_frontend(app_with_ten_pages.app_path)
|
||||
|
||||
def benchmark_fn():
|
||||
with chdir(app_with_ten_pages.app_path):
|
||||
app_with_ten_pages.app_instance._compile()
|
||||
|
||||
benchmark(benchmark_fn)
|
||||
app_with_ten_pages._reload_state_module()
|
||||
|
||||
|
||||
@pytest.mark.skipif(constants.IS_WINDOWS, reason=WINDOWS_SKIP_REASON)
|
||||
@pytest.mark.benchmark(
|
||||
group="Compile time of varying page numbers",
|
||||
timer=time.perf_counter,
|
||||
disable_gc=True,
|
||||
warmup=False,
|
||||
)
|
||||
def test_app_100_compile_time_cold(benchmark, app_with_hundred_pages):
|
||||
"""Test the compile time on a cold start for an app with 100 page.
|
||||
|
||||
Args:
|
||||
benchmark: The benchmark fixture.
|
||||
app_with_hundred_pages: The app harness.
|
||||
"""
|
||||
|
||||
def setup():
|
||||
with chdir(app_with_hundred_pages.app_path):
|
||||
utils.empty_dir(web_pages, keep_files=["_app.js"])
|
||||
app_with_hundred_pages._initialize_app()
|
||||
build.setup_frontend(app_with_hundred_pages.app_path)
|
||||
|
||||
def benchmark_fn():
|
||||
with chdir(app_with_hundred_pages.app_path):
|
||||
app_with_hundred_pages.app_instance._compile()
|
||||
|
||||
benchmark.pedantic(benchmark_fn, setup=setup, rounds=5)
|
||||
app_with_hundred_pages._reload_state_module()
|
||||
|
||||
|
||||
@pytest.mark.benchmark(
|
||||
group="Compile time of varying page numbers",
|
||||
min_rounds=5,
|
||||
timer=time.perf_counter,
|
||||
disable_gc=True,
|
||||
warmup=False,
|
||||
)
|
||||
def test_app_100_compile_time_warm(benchmark, app_with_hundred_pages):
|
||||
"""Test the compile time on a warm start for an app with 100 page.
|
||||
|
||||
Args:
|
||||
benchmark: The benchmark fixture.
|
||||
app_with_hundred_pages: The app harness.
|
||||
"""
|
||||
with chdir(app_with_hundred_pages.app_path):
|
||||
app_with_hundred_pages._initialize_app()
|
||||
build.setup_frontend(app_with_hundred_pages.app_path)
|
||||
|
||||
def benchmark_fn():
|
||||
with chdir(app_with_hundred_pages.app_path):
|
||||
app_with_hundred_pages.app_instance._compile()
|
||||
|
||||
benchmark(benchmark_fn)
|
||||
app_with_hundred_pages._reload_state_module()
|
||||
|
||||
|
||||
@pytest.mark.skipif(constants.IS_WINDOWS, reason=WINDOWS_SKIP_REASON)
|
||||
@pytest.mark.benchmark(
|
||||
group="Compile time of varying page numbers",
|
||||
timer=time.perf_counter,
|
||||
disable_gc=True,
|
||||
warmup=False,
|
||||
)
|
||||
def test_app_1000_compile_time_cold(benchmark, app_with_thousand_pages):
|
||||
"""Test the compile time on a cold start for an app with 1000 page.
|
||||
|
||||
Args:
|
||||
benchmark: The benchmark fixture.
|
||||
app_with_thousand_pages: The app harness.
|
||||
"""
|
||||
|
||||
def setup():
|
||||
with chdir(app_with_thousand_pages.app_path):
|
||||
utils.empty_dir(web_pages, keep_files=["_app.js"])
|
||||
app_with_thousand_pages._initialize_app()
|
||||
build.setup_frontend(app_with_thousand_pages.app_path)
|
||||
|
||||
def benchmark_fn():
|
||||
with chdir(app_with_thousand_pages.app_path):
|
||||
app_with_thousand_pages.app_instance._compile()
|
||||
|
||||
benchmark.pedantic(benchmark_fn, setup=setup, rounds=5)
|
||||
app_with_thousand_pages._reload_state_module()
|
||||
|
||||
|
||||
@pytest.mark.benchmark(
|
||||
group="Compile time of varying page numbers",
|
||||
min_rounds=5,
|
||||
timer=time.perf_counter,
|
||||
disable_gc=True,
|
||||
warmup=False,
|
||||
)
|
||||
def test_app_1000_compile_time_warm(benchmark, app_with_thousand_pages):
|
||||
"""Test the compile time on a warm start for an app with 1000 page.
|
||||
|
||||
Args:
|
||||
benchmark: The benchmark fixture.
|
||||
app_with_thousand_pages: The app harness.
|
||||
"""
|
||||
with chdir(app_with_thousand_pages.app_path):
|
||||
app_with_thousand_pages._initialize_app()
|
||||
build.setup_frontend(app_with_thousand_pages.app_path)
|
||||
|
||||
def benchmark_fn():
|
||||
with chdir(app_with_thousand_pages.app_path):
|
||||
app_with_thousand_pages.app_instance._compile()
|
||||
|
||||
benchmark(benchmark_fn)
|
||||
app_with_thousand_pages._reload_state_module()
|
||||
|
||||
|
||||
@pytest.mark.skip
|
||||
@pytest.mark.benchmark(
|
||||
group="Compile time of varying page numbers",
|
||||
timer=time.perf_counter,
|
||||
disable_gc=True,
|
||||
warmup=False,
|
||||
)
|
||||
def test_app_10000_compile_time_cold(benchmark, app_with_ten_thousand_pages):
|
||||
"""Test the compile time on a cold start for an app with 10000 page.
|
||||
|
||||
Args:
|
||||
benchmark: The benchmark fixture.
|
||||
app_with_ten_thousand_pages: The app harness.
|
||||
"""
|
||||
|
||||
def setup():
|
||||
with chdir(app_with_ten_thousand_pages.app_path):
|
||||
utils.empty_dir(web_pages, keep_files=["_app.js"])
|
||||
app_with_ten_thousand_pages._initialize_app()
|
||||
build.setup_frontend(app_with_ten_thousand_pages.app_path)
|
||||
|
||||
def benchmark_fn():
|
||||
with chdir(app_with_ten_thousand_pages.app_path):
|
||||
app_with_ten_thousand_pages.app_instance._compile()
|
||||
|
||||
benchmark.pedantic(benchmark_fn, setup=setup, rounds=5)
|
||||
app_with_ten_thousand_pages._reload_state_module()
|
||||
|
||||
|
||||
@pytest.mark.skip
|
||||
@pytest.mark.benchmark(
|
||||
group="Compile time of varying page numbers",
|
||||
min_rounds=5,
|
||||
timer=time.perf_counter,
|
||||
disable_gc=True,
|
||||
warmup=False,
|
||||
)
|
||||
def test_app_10000_compile_time_warm(benchmark, app_with_ten_thousand_pages):
|
||||
"""Test the compile time on a warm start for an app with 10000 page.
|
||||
|
||||
Args:
|
||||
benchmark: The benchmark fixture.
|
||||
app_with_ten_thousand_pages: The app harness.
|
||||
"""
|
||||
|
||||
def benchmark_fn():
|
||||
with chdir(app_with_ten_thousand_pages.app_path):
|
||||
app_with_ten_thousand_pages.app_instance._compile()
|
||||
|
||||
benchmark(benchmark_fn)
|
||||
app_with_ten_thousand_pages._reload_state_module()
|
645
poetry.lock
generated
645
poetry.lock
generated
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "reflex"
|
||||
version = "0.7.2dev1"
|
||||
version = "0.7.0dev1"
|
||||
description = "Web apps in pure Python."
|
||||
license = "Apache-2.0"
|
||||
authors = [
|
||||
@ -23,42 +23,55 @@ fastapi = ">=0.96.0,!=0.111.0,!=0.111.1"
|
||||
gunicorn = ">=20.1.0,<24.0"
|
||||
jinja2 = ">=3.1.2,<4.0"
|
||||
psutil = ">=5.9.4,<7.0"
|
||||
pydantic = ">=1.10.21,<3.0"
|
||||
pydantic = ">=1.10.2,<3.0"
|
||||
python-multipart = ">=0.0.5,<0.1"
|
||||
python-socketio = ">=5.7.0,<6.0"
|
||||
redis = ">=4.3.5,<6.0"
|
||||
rich = ">=13.0.0,<14.0"
|
||||
sqlmodel = ">=0.0.14,<0.1"
|
||||
typer = ">=0.15.1,<1.0"
|
||||
typer = ">=0.4.2,<1.0"
|
||||
uvicorn = ">=0.20.0"
|
||||
starlette-admin = ">=0.11.0,<1.0"
|
||||
alembic = ">=1.11.1,<2.0"
|
||||
platformdirs = ">=3.10.0,<5.0"
|
||||
distro = { version = ">=1.8.0,<2.0", platform = "linux" }
|
||||
python-engineio = "!=4.6.0"
|
||||
wrapt = ">=1.17.0,<2.0"
|
||||
wrapt = [
|
||||
{ version = ">=1.14.0,<2.0", python = ">=3.11" },
|
||||
{ version = ">=1.11.0,<2.0", python = "<3.11" },
|
||||
]
|
||||
packaging = ">=23.1,<25.0"
|
||||
reflex-hosting-cli = ">=0.1.29"
|
||||
charset-normalizer = ">=3.3.2,<4.0"
|
||||
wheel = ">=0.42.0,<1.0"
|
||||
build = ">=1.0.3,<2.0"
|
||||
setuptools = ">=75.0"
|
||||
httpx = ">=0.25.1,<1.0"
|
||||
twine = ">=4.0.0,<7.0"
|
||||
tomlkit = ">=0.12.4,<1.0"
|
||||
lazy_loader = ">=0.4"
|
||||
typing_extensions = ">=4.6.0"
|
||||
# For custom component subcommand
|
||||
wheel = { version = ">=0.42.0,<1.0", optional = true }
|
||||
build = { version = ">=1.0.3,<2.0", optional = true }
|
||||
setuptools = { version = ">=75.0", optional = true }
|
||||
twine = { version = ">=4.0.0,<7.0", optional = true }
|
||||
tomlkit = { version = ">=0.12.4,<1.0", optional = true }
|
||||
|
||||
[tool.poetry.extras]
|
||||
custom_components = [
|
||||
"build",
|
||||
"setuptools",
|
||||
"twine",
|
||||
"tomlkit",
|
||||
"wheel",
|
||||
]
|
||||
|
||||
[tool.poetry.group.dev.dependencies]
|
||||
pytest = ">=7.1.2,<9.0"
|
||||
pytest-mock = ">=3.10.0,<4.0"
|
||||
pyright = ">=1.1.394, <1.2"
|
||||
pyright = ">=1.1.392, <1.2"
|
||||
darglint = ">=1.8.1,<2.0"
|
||||
dill = ">=0.3.8"
|
||||
toml = ">=0.10.2,<1.0"
|
||||
pytest-asyncio = ">=0.24.0"
|
||||
pytest-cov = ">=4.0.0,<7.0"
|
||||
ruff = "0.9.6"
|
||||
ruff = "0.9.3"
|
||||
pandas = ">=2.1.1,<3.0"
|
||||
pillow = ">=10.0.0,<12.0"
|
||||
plotly = ">=5.13.0,<6.0"
|
||||
@ -84,37 +97,8 @@ reportIncompatibleMethodOverride = false
|
||||
target-version = "py310"
|
||||
output-format = "concise"
|
||||
lint.isort.split-on-trailing-comma = false
|
||||
lint.select = [
|
||||
"ANN001",
|
||||
"B",
|
||||
"C4",
|
||||
"D",
|
||||
"E",
|
||||
"ERA",
|
||||
"F",
|
||||
"FURB",
|
||||
"I",
|
||||
"N",
|
||||
"PERF",
|
||||
"PGH",
|
||||
"PTH",
|
||||
"RUF",
|
||||
"SIM",
|
||||
"T",
|
||||
"TRY",
|
||||
"W",
|
||||
]
|
||||
lint.ignore = [
|
||||
"B008",
|
||||
"D205",
|
||||
"E501",
|
||||
"F403",
|
||||
"SIM115",
|
||||
"RUF006",
|
||||
"RUF008",
|
||||
"RUF012",
|
||||
"TRY0",
|
||||
]
|
||||
lint.select = ["ANN001","B", "C4", "D", "E", "ERA", "F", "FURB", "I", "N", "PERF", "PGH", "PTH", "RUF", "SIM", "T", "TRY", "W"]
|
||||
lint.ignore = ["B008", "D205", "E501", "F403", "SIM115", "RUF006", "RUF008", "RUF012", "TRY0"]
|
||||
lint.pydocstyle.convention = "google"
|
||||
|
||||
[tool.ruff.lint.per-file-ignores]
|
||||
|
@ -15,13 +15,7 @@
|
||||
"devDependencies": {
|
||||
{% for package, version in dev_dependencies.items() %}
|
||||
"{{ package }}": "{{ version }}"{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
},
|
||||
"overrides": {
|
||||
{% for package, version in overrides.items() %}
|
||||
"{{ package }}": "{{ version }}"{% if not loop.last %},{% endif %}
|
||||
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
}
|
@ -78,9 +78,9 @@ export function UploadFilesProvider({ children }) {
|
||||
return newFilesById
|
||||
})
|
||||
return (
|
||||
<UploadFilesContext value={[filesById, setFilesById]}>
|
||||
<UploadFilesContext.Provider value={[filesById, setFilesById]}>
|
||||
{children}
|
||||
</UploadFilesContext>
|
||||
</UploadFilesContext.Provider>
|
||||
)
|
||||
}
|
||||
|
||||
@ -92,9 +92,9 @@ export function EventLoopProvider({ children }) {
|
||||
clientStorage,
|
||||
)
|
||||
return (
|
||||
<EventLoopContext value={[addEvents, connectErrors]}>
|
||||
<EventLoopContext.Provider value={[addEvents, connectErrors]}>
|
||||
{children}
|
||||
</EventLoopContext>
|
||||
</EventLoopContext.Provider>
|
||||
)
|
||||
}
|
||||
|
||||
@ -112,13 +112,13 @@ export function StateProvider({ children }) {
|
||||
|
||||
return (
|
||||
{% for state_name in initial_state %}
|
||||
<StateContexts.{{state_name|var_name}} value={ {{state_name|var_name}} }>
|
||||
<StateContexts.{{state_name|var_name}}.Provider value={ {{state_name|var_name}} }>
|
||||
{% endfor %}
|
||||
<DispatchContext value={dispatchers}>
|
||||
<DispatchContext.Provider value={dispatchers}>
|
||||
{children}
|
||||
</DispatchContext>
|
||||
</DispatchContext.Provider>
|
||||
{% for state_name in initial_state|reverse %}
|
||||
</StateContexts.{{state_name|var_name}}>
|
||||
</StateContexts.{{state_name|var_name}}.Provider>
|
||||
{% endfor %}
|
||||
)
|
||||
}
|
||||
|
@ -10,9 +10,7 @@ import {
|
||||
export default function RadixThemesColorModeProvider({ children }) {
|
||||
const { theme, resolvedTheme, setTheme } = useTheme();
|
||||
const [rawColorMode, setRawColorMode] = useState(defaultColorMode);
|
||||
const [resolvedColorMode, setResolvedColorMode] = useState(
|
||||
defaultColorMode === "dark" ? "dark" : "light"
|
||||
);
|
||||
const [resolvedColorMode, setResolvedColorMode] = useState("dark");
|
||||
|
||||
useEffect(() => {
|
||||
if (isDevMode) {
|
||||
@ -36,17 +34,17 @@ export default function RadixThemesColorModeProvider({ children }) {
|
||||
const allowedModes = ["light", "dark", "system"];
|
||||
if (!allowedModes.includes(mode)) {
|
||||
console.error(
|
||||
`Invalid color mode "${mode}". Defaulting to "${defaultColorMode}".`,
|
||||
`Invalid color mode "${mode}". Defaulting to "${defaultColorMode}".`
|
||||
);
|
||||
mode = defaultColorMode;
|
||||
}
|
||||
setTheme(mode);
|
||||
};
|
||||
return (
|
||||
<ColorModeContext
|
||||
<ColorModeContext.Provider
|
||||
value={{ rawColorMode, resolvedColorMode, toggleColorMode, setColorMode }}
|
||||
>
|
||||
{children}
|
||||
</ColorModeContext>
|
||||
</ColorModeContext.Provider>
|
||||
);
|
||||
}
|
||||
|
@ -248,7 +248,6 @@ COMPONENTS_CORE_MAPPING: dict = {
|
||||
"selected_files",
|
||||
"upload",
|
||||
],
|
||||
"components.core.auto_scroll": ["auto_scroll"],
|
||||
}
|
||||
|
||||
COMPONENTS_BASE_MAPPING: dict = {
|
||||
|
@ -34,7 +34,6 @@ from .components.component import Component as Component
|
||||
from .components.component import ComponentNamespace as ComponentNamespace
|
||||
from .components.component import NoSSRComponent as NoSSRComponent
|
||||
from .components.component import memo as memo
|
||||
from .components.core.auto_scroll import auto_scroll as auto_scroll
|
||||
from .components.core.banner import connection_banner as connection_banner
|
||||
from .components.core.banner import connection_modal as connection_modal
|
||||
from .components.core.breakpoints import breakpoints as breakpoints
|
||||
|
396
reflex/app.py
396
reflex/app.py
@ -11,17 +11,17 @@ import functools
|
||||
import inspect
|
||||
import io
|
||||
import json
|
||||
import multiprocessing
|
||||
import platform
|
||||
import sys
|
||||
import traceback
|
||||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
from timeit import default_timer as timer
|
||||
from types import SimpleNamespace
|
||||
from typing import (
|
||||
TYPE_CHECKING,
|
||||
Any,
|
||||
AsyncIterator,
|
||||
BinaryIO,
|
||||
Callable,
|
||||
Coroutine,
|
||||
Dict,
|
||||
@ -35,15 +35,12 @@ from typing import (
|
||||
get_type_hints,
|
||||
)
|
||||
|
||||
from fastapi import FastAPI, HTTPException, Request
|
||||
from fastapi import UploadFile as FastAPIUploadFile
|
||||
from fastapi import FastAPI, HTTPException, Request, UploadFile
|
||||
from fastapi.middleware import cors
|
||||
from fastapi.responses import JSONResponse, StreamingResponse
|
||||
from fastapi.staticfiles import StaticFiles
|
||||
from rich.progress import MofNCompleteColumn, Progress, TimeElapsedColumn
|
||||
from socketio import ASGIApp, AsyncNamespace, AsyncServer
|
||||
from starlette.datastructures import Headers
|
||||
from starlette.datastructures import UploadFile as StarletteUploadFile
|
||||
from starlette_admin.contrib.sqla.admin import Admin
|
||||
from starlette_admin.contrib.sqla.view import ModelView
|
||||
|
||||
@ -75,8 +72,7 @@ from reflex.components.core.client_side_routing import (
|
||||
from reflex.components.core.sticky import sticky
|
||||
from reflex.components.core.upload import Upload, get_upload_dir
|
||||
from reflex.components.radix import themes
|
||||
from reflex.components.sonner.toast import toast
|
||||
from reflex.config import ExecutorType, environment, get_config
|
||||
from reflex.config import environment, get_config
|
||||
from reflex.event import (
|
||||
_EVENT_FIELDS,
|
||||
Event,
|
||||
@ -85,6 +81,7 @@ from reflex.event import (
|
||||
EventType,
|
||||
IndividualEventType,
|
||||
get_hydrate_event,
|
||||
window_alert,
|
||||
)
|
||||
from reflex.model import Model, get_db_status
|
||||
from reflex.page import DECORATED_PAGES
|
||||
@ -100,25 +97,15 @@ from reflex.state import (
|
||||
StateManager,
|
||||
StateUpdate,
|
||||
_substate_key,
|
||||
all_base_state_classes,
|
||||
code_uses_state_contexts,
|
||||
)
|
||||
from reflex.utils import (
|
||||
codespaces,
|
||||
console,
|
||||
exceptions,
|
||||
format,
|
||||
path_ops,
|
||||
prerequisites,
|
||||
types,
|
||||
)
|
||||
from reflex.utils.exec import get_compile_context, is_prod_mode, is_testing_env
|
||||
from reflex.utils import codespaces, console, exceptions, format, prerequisites, types
|
||||
from reflex.utils.exec import is_prod_mode, is_testing_env
|
||||
from reflex.utils.imports import ImportVar
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from reflex.vars import Var
|
||||
|
||||
|
||||
# Define custom types.
|
||||
ComponentCallable = Callable[[], Component]
|
||||
Reducer = Callable[[Event], Coroutine[Any, Any, StateUpdate]]
|
||||
@ -144,7 +131,7 @@ def default_backend_exception_handler(exception: Exception) -> EventSpec:
|
||||
EventSpec: The window alert event.
|
||||
|
||||
"""
|
||||
from reflex.components.sonner.toast import toast
|
||||
from reflex.components.sonner.toast import Toaster, toast
|
||||
|
||||
error = traceback.format_exc()
|
||||
|
||||
@ -155,44 +142,18 @@ def default_backend_exception_handler(exception: Exception) -> EventSpec:
|
||||
if is_prod_mode()
|
||||
else [f"{type(exception).__name__}: {exception}.", "See logs for details."]
|
||||
)
|
||||
|
||||
return toast(
|
||||
"An error occurred.",
|
||||
level="error",
|
||||
fallback_to_alert=True,
|
||||
description="<br/>".join(error_message),
|
||||
position="top-center",
|
||||
id="backend_error",
|
||||
style={"width": "500px"},
|
||||
)
|
||||
|
||||
|
||||
def extra_overlay_function() -> Optional[Component]:
|
||||
"""Extra overlay function to add to the overlay component.
|
||||
|
||||
Returns:
|
||||
The extra overlay function.
|
||||
"""
|
||||
config = get_config()
|
||||
|
||||
extra_config = config.extra_overlay_function
|
||||
config_overlay = None
|
||||
if extra_config:
|
||||
module, _, function_name = extra_config.rpartition(".")
|
||||
try:
|
||||
module = __import__(module)
|
||||
config_overlay = Fragment.create(getattr(module, function_name)())
|
||||
config_overlay._get_all_imports()
|
||||
except Exception as e:
|
||||
from reflex.compiler.utils import save_error
|
||||
|
||||
log_path = save_error(e)
|
||||
|
||||
console.error(
|
||||
f"Error loading extra_overlay_function {extra_config}. Error saved to {log_path}"
|
||||
)
|
||||
|
||||
return config_overlay
|
||||
if Toaster.is_used:
|
||||
return toast(
|
||||
"An error occurred.",
|
||||
level="error",
|
||||
description="<br/>".join(error_message),
|
||||
position="top-center",
|
||||
id="backend_error",
|
||||
style={"width": "500px"},
|
||||
)
|
||||
else:
|
||||
error_message.insert(0, "An error occurred.")
|
||||
return window_alert("\n".join(error_message))
|
||||
|
||||
|
||||
def default_overlay_component() -> Component:
|
||||
@ -201,21 +162,14 @@ def default_overlay_component() -> Component:
|
||||
Returns:
|
||||
The default overlay_component, which is a connection_modal.
|
||||
"""
|
||||
from reflex.components.component import memo
|
||||
config = get_config()
|
||||
|
||||
def default_overlay_components():
|
||||
return Fragment.create(
|
||||
connection_pulser(),
|
||||
connection_toaster(),
|
||||
*(
|
||||
[backend_disabled()]
|
||||
if get_compile_context() == constants.CompileContext.DEPLOY
|
||||
else []
|
||||
),
|
||||
*codespaces.codespaces_auto_redirect(),
|
||||
)
|
||||
|
||||
return Fragment.create(memo(default_overlay_components)())
|
||||
return Fragment.create(
|
||||
connection_pulser(),
|
||||
connection_toaster(),
|
||||
*([backend_disabled()] if config.is_reflex_cloud else []),
|
||||
*codespaces.codespaces_auto_redirect(),
|
||||
)
|
||||
|
||||
|
||||
def default_error_boundary(*children: Component) -> Component:
|
||||
@ -237,53 +191,6 @@ class OverlayFragment(Fragment):
|
||||
pass
|
||||
|
||||
|
||||
@dataclasses.dataclass(frozen=True)
|
||||
class UploadFile(StarletteUploadFile):
|
||||
"""A file uploaded to the server.
|
||||
|
||||
Args:
|
||||
file: The standard Python file object (non-async).
|
||||
filename: The original file name.
|
||||
size: The size of the file in bytes.
|
||||
headers: The headers of the request.
|
||||
"""
|
||||
|
||||
file: BinaryIO
|
||||
|
||||
path: Optional[Path] = dataclasses.field(default=None)
|
||||
|
||||
_deprecated_filename: Optional[str] = dataclasses.field(default=None)
|
||||
|
||||
size: Optional[int] = dataclasses.field(default=None)
|
||||
|
||||
headers: Headers = dataclasses.field(default_factory=Headers)
|
||||
|
||||
@property
|
||||
def name(self) -> Optional[str]:
|
||||
"""Get the name of the uploaded file.
|
||||
|
||||
Returns:
|
||||
The name of the uploaded file.
|
||||
"""
|
||||
if self.path:
|
||||
return self.path.name
|
||||
|
||||
@property
|
||||
def filename(self) -> Optional[str]:
|
||||
"""Get the filename of the uploaded file.
|
||||
|
||||
Returns:
|
||||
The filename of the uploaded file.
|
||||
"""
|
||||
console.deprecate(
|
||||
feature_name="UploadFile.filename",
|
||||
reason="Use UploadFile.name instead.",
|
||||
deprecation_version="0.7.1",
|
||||
removal_version="0.8.0",
|
||||
)
|
||||
return self._deprecated_filename
|
||||
|
||||
|
||||
@dataclasses.dataclass(
|
||||
frozen=True,
|
||||
)
|
||||
@ -334,26 +241,11 @@ class App(MiddlewareMixin, LifespanMixin):
|
||||
|
||||
# A component that is present on every page (defaults to the Connection Error banner).
|
||||
overlay_component: Optional[Union[Component, ComponentCallable]] = (
|
||||
dataclasses.field(default=None)
|
||||
dataclasses.field(default_factory=default_overlay_component)
|
||||
)
|
||||
|
||||
# Error boundary component to wrap the app with.
|
||||
error_boundary: Optional[ComponentCallable] = dataclasses.field(default=None)
|
||||
|
||||
# App wraps to be applied to the whole app. Expected to be a dictionary of (order, name) to a function that takes whether the state is enabled and optionally returns a component.
|
||||
app_wraps: Dict[tuple[int, str], Callable[[bool], Optional[Component]]] = (
|
||||
dataclasses.field(
|
||||
default_factory=lambda: {
|
||||
(55, "ErrorBoundary"): (
|
||||
lambda stateful: default_error_boundary() if stateful else None
|
||||
),
|
||||
(5, "Overlay"): (
|
||||
lambda stateful: default_overlay_component() if stateful else None
|
||||
),
|
||||
(4, "ExtraOverlay"): lambda stateful: extra_overlay_function(),
|
||||
}
|
||||
)
|
||||
)
|
||||
error_boundary: Optional[ComponentCallable] = default_error_boundary
|
||||
|
||||
# Components to add to the head of every page.
|
||||
head_components: List[Component] = dataclasses.field(default_factory=list)
|
||||
@ -375,9 +267,6 @@ class App(MiddlewareMixin, LifespanMixin):
|
||||
# A map from a page route to the component to render. Users should use `add_page`.
|
||||
_pages: Dict[str, Component] = dataclasses.field(default_factory=dict)
|
||||
|
||||
# A mapping of pages which created states as they were being evaluated.
|
||||
_stateful_pages: Dict[str, None] = dataclasses.field(default_factory=dict)
|
||||
|
||||
# The backend API object.
|
||||
_api: FastAPI | None = None
|
||||
|
||||
@ -411,9 +300,6 @@ class App(MiddlewareMixin, LifespanMixin):
|
||||
[Exception], Union[EventSpec, List[EventSpec], None]
|
||||
] = default_backend_exception_handler
|
||||
|
||||
# Put the toast provider in the app wrap.
|
||||
toaster: Component | None = dataclasses.field(default_factory=toast.provider)
|
||||
|
||||
@property
|
||||
def api(self) -> FastAPI | None:
|
||||
"""Get the backend api.
|
||||
@ -595,10 +481,8 @@ class App(MiddlewareMixin, LifespanMixin):
|
||||
"""Add optional api endpoints (_upload)."""
|
||||
if not self.api:
|
||||
return
|
||||
upload_is_used_marker = (
|
||||
prerequisites.get_backend_dir() / constants.Dirs.UPLOAD_IS_USED
|
||||
)
|
||||
if Upload.is_used or upload_is_used_marker.exists():
|
||||
|
||||
if Upload.is_used:
|
||||
# To upload files.
|
||||
self.api.post(str(constants.Endpoint.UPLOAD))(upload(self))
|
||||
|
||||
@ -608,15 +492,10 @@ class App(MiddlewareMixin, LifespanMixin):
|
||||
StaticFiles(directory=get_upload_dir()),
|
||||
name="uploaded_files",
|
||||
)
|
||||
|
||||
upload_is_used_marker.parent.mkdir(parents=True, exist_ok=True)
|
||||
upload_is_used_marker.touch()
|
||||
if codespaces.is_running_in_codespaces():
|
||||
self.api.get(str(constants.Endpoint.AUTH_CODESPACE))(
|
||||
codespaces.auth_codespace
|
||||
)
|
||||
if environment.REFLEX_ADD_ALL_ROUTES_ENDPOINT.get():
|
||||
self.add_all_routes_endpoint()
|
||||
|
||||
def _add_cors(self):
|
||||
"""Add CORS middleware to the app."""
|
||||
@ -654,9 +533,7 @@ class App(MiddlewareMixin, LifespanMixin):
|
||||
Returns:
|
||||
The generated component.
|
||||
"""
|
||||
from reflex.compiler.compiler import into_component
|
||||
|
||||
return into_component(component)
|
||||
return component if isinstance(component, Component) else component()
|
||||
|
||||
def add_page(
|
||||
self,
|
||||
@ -757,19 +634,13 @@ class App(MiddlewareMixin, LifespanMixin):
|
||||
route: The route of the page to compile.
|
||||
save_page: If True, the compiled page is saved to self._pages.
|
||||
"""
|
||||
n_states_before = len(all_base_state_classes)
|
||||
component, enable_state = compiler.compile_unevaluated_page(
|
||||
route, self._unevaluated_pages[route], self._state, self.style, self.theme
|
||||
)
|
||||
|
||||
# Indicate that the app should use state.
|
||||
if enable_state:
|
||||
self._enable_state()
|
||||
|
||||
# Indicate that evaluating this page creates one or more state classes.
|
||||
if len(all_base_state_classes) > n_states_before:
|
||||
self._stateful_pages[route] = None
|
||||
|
||||
# Add the page.
|
||||
self._check_routes_conflict(route)
|
||||
if save_page:
|
||||
@ -984,6 +855,25 @@ class App(MiddlewareMixin, LifespanMixin):
|
||||
for k, component in self._pages.items():
|
||||
self._pages[k] = self._add_overlay_to_component(component)
|
||||
|
||||
def _add_error_boundary_to_component(self, component: Component) -> Component:
|
||||
if self.error_boundary is None:
|
||||
return component
|
||||
|
||||
component = self.error_boundary(*component.children)
|
||||
|
||||
return component
|
||||
|
||||
def _setup_error_boundary(self):
|
||||
"""If a State is not used and no error_boundary is specified, do not render the error boundary."""
|
||||
if self._state is None and self.error_boundary is default_error_boundary:
|
||||
self.error_boundary = None
|
||||
|
||||
for k, component in self._pages.items():
|
||||
# Skip the 404 page
|
||||
if k == constants.Page404.SLUG:
|
||||
continue
|
||||
self._pages[k] = self._add_error_boundary_to_component(component)
|
||||
|
||||
def _setup_sticky_badge(self):
|
||||
"""Add the sticky badge to the app."""
|
||||
for k, component in self._pages.items():
|
||||
@ -1058,20 +948,6 @@ class App(MiddlewareMixin, LifespanMixin):
|
||||
def get_compilation_time() -> str:
|
||||
return str(datetime.now().time()).split(".")[0]
|
||||
|
||||
should_compile = self._should_compile()
|
||||
backend_dir = prerequisites.get_backend_dir()
|
||||
if not should_compile and backend_dir.exists():
|
||||
stateful_pages_marker = backend_dir / constants.Dirs.STATEFUL_PAGES
|
||||
if stateful_pages_marker.exists():
|
||||
with stateful_pages_marker.open("r") as f:
|
||||
stateful_pages = json.load(f)
|
||||
for route in stateful_pages:
|
||||
console.info(f"BE Evaluating stateful page: {route}")
|
||||
self._compile_page(route, save_page=False)
|
||||
self._enable_state()
|
||||
self._add_optional_endpoints()
|
||||
return
|
||||
|
||||
# Render a default 404 page if the user didn't supply one
|
||||
if constants.Page404.SLUG not in self._unevaluated_pages:
|
||||
self.add_page(route=constants.Page404.SLUG)
|
||||
@ -1098,10 +974,9 @@ class App(MiddlewareMixin, LifespanMixin):
|
||||
should_compile = self._should_compile()
|
||||
|
||||
if not should_compile:
|
||||
with console.timing("Evaluate Pages (Backend)"):
|
||||
for route in self._unevaluated_pages:
|
||||
console.debug(f"Evaluating page: {route}")
|
||||
self._compile_page(route, save_page=should_compile)
|
||||
for route in self._unevaluated_pages:
|
||||
console.debug(f"Evaluating page: {route}")
|
||||
self._compile_page(route, save_page=should_compile)
|
||||
|
||||
# Add the optional endpoints (_upload)
|
||||
self._add_optional_endpoints()
|
||||
@ -1127,47 +1002,24 @@ class App(MiddlewareMixin, LifespanMixin):
|
||||
+ adhoc_steps_without_executor,
|
||||
)
|
||||
|
||||
with console.timing("Evaluate Pages (Frontend)"):
|
||||
performance_metrics: list[tuple[str, float]] = []
|
||||
for route in self._unevaluated_pages:
|
||||
console.debug(f"Evaluating page: {route}")
|
||||
start = timer()
|
||||
self._compile_page(route, save_page=should_compile)
|
||||
end = timer()
|
||||
performance_metrics.append((route, end - start))
|
||||
progress.advance(task)
|
||||
console.debug(
|
||||
"Slowest pages:\n"
|
||||
+ "\n".join(
|
||||
f"{route}: {time * 1000:.1f}ms"
|
||||
for route, time in sorted(
|
||||
performance_metrics, key=lambda x: x[1], reverse=True
|
||||
)[:10]
|
||||
)
|
||||
)
|
||||
for route in self._unevaluated_pages:
|
||||
console.debug(f"Evaluating page: {route}")
|
||||
self._compile_page(route, save_page=should_compile)
|
||||
progress.advance(task)
|
||||
|
||||
# Add the optional endpoints (_upload)
|
||||
self._add_optional_endpoints()
|
||||
|
||||
self._validate_var_dependencies()
|
||||
self._setup_overlay_component()
|
||||
|
||||
if config.show_built_with_reflex is None:
|
||||
if (
|
||||
get_compile_context() == constants.CompileContext.DEPLOY
|
||||
and prerequisites.get_user_tier() in ["pro", "team", "enterprise"]
|
||||
):
|
||||
config.show_built_with_reflex = False
|
||||
else:
|
||||
config.show_built_with_reflex = True
|
||||
|
||||
if is_prod_mode() and config.show_built_with_reflex:
|
||||
self._setup_error_boundary()
|
||||
if config.show_built_with_reflex:
|
||||
self._setup_sticky_badge()
|
||||
|
||||
progress.advance(task)
|
||||
|
||||
# Store the compile results.
|
||||
compile_results: list[tuple[str, str]] = []
|
||||
compile_results = []
|
||||
|
||||
progress.advance(task)
|
||||
|
||||
@ -1187,43 +1039,14 @@ class App(MiddlewareMixin, LifespanMixin):
|
||||
# Add the custom components from the page to the set.
|
||||
custom_components |= component._get_all_custom_components()
|
||||
|
||||
if (toaster := self.toaster) is not None:
|
||||
from reflex.components.component import memo
|
||||
|
||||
@memo
|
||||
def memoized_toast_provider():
|
||||
return toaster
|
||||
|
||||
toast_provider = Fragment.create(memoized_toast_provider())
|
||||
|
||||
app_wrappers[(1, "ToasterProvider")] = toast_provider
|
||||
|
||||
# Add the app wraps to the app.
|
||||
for key, app_wrap in self.app_wraps.items():
|
||||
component = app_wrap(self._state is not None)
|
||||
if component is not None:
|
||||
app_wrappers[key] = component
|
||||
|
||||
for component in app_wrappers.values():
|
||||
custom_components |= component._get_all_custom_components()
|
||||
|
||||
if self.error_boundary:
|
||||
console.deprecate(
|
||||
feature_name="App.error_boundary",
|
||||
reason="Use app_wraps instead.",
|
||||
deprecation_version="0.7.1",
|
||||
removal_version="0.8.0",
|
||||
)
|
||||
app_wrappers[(55, "ErrorBoundary")] = self.error_boundary()
|
||||
|
||||
# Perform auto-memoization of stateful components.
|
||||
with console.timing("Auto-memoize StatefulComponents"):
|
||||
(
|
||||
stateful_components_path,
|
||||
stateful_components_code,
|
||||
page_components,
|
||||
) = compiler.compile_stateful_components(self._pages.values())
|
||||
progress.advance(task)
|
||||
(
|
||||
stateful_components_path,
|
||||
stateful_components_code,
|
||||
page_components,
|
||||
) = compiler.compile_stateful_components(self._pages.values())
|
||||
|
||||
progress.advance(task)
|
||||
|
||||
# Catch "static" apps (that do not define a rx.State subclass) which are trying to access rx.State.
|
||||
if code_uses_state_contexts(stateful_components_code) and self._state is None:
|
||||
@ -1246,30 +1069,33 @@ class App(MiddlewareMixin, LifespanMixin):
|
||||
|
||||
progress.advance(task)
|
||||
|
||||
# Copy the assets.
|
||||
assets_src = Path.cwd() / constants.Dirs.APP_ASSETS
|
||||
if assets_src.is_dir():
|
||||
with console.timing("Copy assets"):
|
||||
path_ops.update_directory_tree(
|
||||
src=assets_src,
|
||||
dest=(
|
||||
Path.cwd() / prerequisites.get_web_dir() / constants.Dirs.PUBLIC
|
||||
),
|
||||
)
|
||||
|
||||
executor = ExecutorType.get_executor_from_environment()
|
||||
# Use a forking process pool, if possible. Much faster, especially for large sites.
|
||||
# Fallback to ThreadPoolExecutor as something that will always work.
|
||||
executor = None
|
||||
if (
|
||||
platform.system() in ("Linux", "Darwin")
|
||||
and (number_of_processes := environment.REFLEX_COMPILE_PROCESSES.get())
|
||||
is not None
|
||||
):
|
||||
executor = concurrent.futures.ProcessPoolExecutor(
|
||||
max_workers=number_of_processes or None,
|
||||
mp_context=multiprocessing.get_context("fork"),
|
||||
)
|
||||
else:
|
||||
executor = concurrent.futures.ThreadPoolExecutor(
|
||||
max_workers=environment.REFLEX_COMPILE_THREADS.get() or None
|
||||
)
|
||||
|
||||
for route, component in zip(self._pages, page_components, strict=True):
|
||||
ExecutorSafeFunctions.COMPONENTS[route] = component
|
||||
|
||||
ExecutorSafeFunctions.STATE = self._state
|
||||
|
||||
with console.timing("Compile to Javascript"), executor as executor:
|
||||
result_futures: list[concurrent.futures.Future[tuple[str, str]]] = []
|
||||
with executor:
|
||||
result_futures = []
|
||||
|
||||
def _submit_work(fn: Callable[..., tuple[str, str]], *args, **kwargs):
|
||||
def _submit_work(fn: Callable, *args, **kwargs):
|
||||
f = executor.submit(fn, *args, **kwargs)
|
||||
f.add_done_callback(lambda _: progress.advance(task))
|
||||
result_futures.append(f)
|
||||
|
||||
# Compile the pre-compiled pages.
|
||||
@ -1295,10 +1121,9 @@ class App(MiddlewareMixin, LifespanMixin):
|
||||
_submit_work(compiler.remove_tailwind_from_postcss)
|
||||
|
||||
# Wait for all compilation tasks to complete.
|
||||
compile_results.extend(
|
||||
future.result()
|
||||
for future in concurrent.futures.as_completed(result_futures)
|
||||
)
|
||||
for future in concurrent.futures.as_completed(result_futures):
|
||||
compile_results.append(future.result())
|
||||
progress.advance(task)
|
||||
|
||||
app_root = self._app_root(app_wrappers=app_wrappers)
|
||||
|
||||
@ -1323,20 +1148,17 @@ class App(MiddlewareMixin, LifespanMixin):
|
||||
progress.advance(task)
|
||||
|
||||
# Compile custom components.
|
||||
(
|
||||
custom_components_output,
|
||||
custom_components_result,
|
||||
custom_components_imports,
|
||||
) = compiler.compile_components(custom_components)
|
||||
compile_results.append((custom_components_output, custom_components_result))
|
||||
*custom_components_result, custom_components_imports = (
|
||||
compiler.compile_components(custom_components)
|
||||
)
|
||||
compile_results.append(custom_components_result)
|
||||
all_imports.update(custom_components_imports)
|
||||
|
||||
progress.advance(task)
|
||||
progress.stop()
|
||||
|
||||
# Install frontend packages.
|
||||
with console.timing("Install Frontend Packages"):
|
||||
self._get_frontend_packages(all_imports)
|
||||
self._get_frontend_packages(all_imports)
|
||||
|
||||
# Setup the next.config.js
|
||||
transpile_packages = [
|
||||
@ -1362,27 +1184,8 @@ class App(MiddlewareMixin, LifespanMixin):
|
||||
# Remove pages that are no longer in the app.
|
||||
p.unlink()
|
||||
|
||||
with console.timing("Write to Disk"):
|
||||
for output_path, code in compile_results:
|
||||
compiler_utils.write_page(output_path, code)
|
||||
|
||||
# Write list of routes that create dynamic states for backend to use.
|
||||
if self._state is not None:
|
||||
stateful_pages_marker = (
|
||||
prerequisites.get_backend_dir() / constants.Dirs.STATEFUL_PAGES
|
||||
)
|
||||
stateful_pages_marker.parent.mkdir(parents=True, exist_ok=True)
|
||||
with stateful_pages_marker.open("w") as f:
|
||||
json.dump(list(self._stateful_pages), f)
|
||||
|
||||
def add_all_routes_endpoint(self):
|
||||
"""Add an endpoint to the app that returns all the routes."""
|
||||
if not self.api:
|
||||
return
|
||||
|
||||
@self.api.get(str(constants.Endpoint.ALL_ROUTES))
|
||||
async def all_routes():
|
||||
return list(self._unevaluated_pages.keys())
|
||||
for output_path, code in compile_results:
|
||||
compiler_utils.write_page(output_path, code)
|
||||
|
||||
@contextlib.asynccontextmanager
|
||||
async def modify_state(self, token: str) -> AsyncIterator[BaseState]:
|
||||
@ -1690,7 +1493,7 @@ def upload(app: App):
|
||||
The upload function.
|
||||
"""
|
||||
|
||||
async def upload_file(request: Request, files: List[FastAPIUploadFile]):
|
||||
async def upload_file(request: Request, files: List[UploadFile]):
|
||||
"""Upload a file.
|
||||
|
||||
Args:
|
||||
@ -1766,8 +1569,7 @@ def upload(app: App):
|
||||
file_copies.append(
|
||||
UploadFile(
|
||||
file=content_copy,
|
||||
path=Path(file.filename.lstrip("/")) if file.filename else None,
|
||||
_deprecated_filename=file.filename,
|
||||
filename=file.filename,
|
||||
size=file.size,
|
||||
headers=file.headers,
|
||||
)
|
||||
|
@ -5,9 +5,15 @@ from __future__ import annotations
|
||||
import os
|
||||
from typing import TYPE_CHECKING, Any, List, Type
|
||||
|
||||
import pydantic.v1.main as pydantic_main
|
||||
from pydantic.v1 import BaseModel
|
||||
from pydantic.v1.fields import ModelField
|
||||
try:
|
||||
import pydantic.v1.main as pydantic_main
|
||||
from pydantic.v1 import BaseModel
|
||||
from pydantic.v1.fields import ModelField
|
||||
except ModuleNotFoundError:
|
||||
if not TYPE_CHECKING:
|
||||
import pydantic.main as pydantic_main
|
||||
from pydantic import BaseModel
|
||||
from pydantic.fields import ModelField
|
||||
|
||||
|
||||
def validate_field_name(bases: List[Type["BaseModel"]], field_name: str) -> None:
|
||||
@ -44,7 +50,7 @@ if TYPE_CHECKING:
|
||||
from reflex.vars import Var
|
||||
|
||||
|
||||
class Base(BaseModel):
|
||||
class Base(BaseModel): # pyright: ignore [reportPossiblyUnboundVariable]
|
||||
"""The base class subclassed by all Reflex classes.
|
||||
|
||||
This class wraps Pydantic and provides common methods such as
|
||||
|
@ -4,7 +4,7 @@ from __future__ import annotations
|
||||
|
||||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
from typing import TYPE_CHECKING, Dict, Iterable, Optional, Sequence, Tuple, Type, Union
|
||||
from typing import TYPE_CHECKING, Dict, Iterable, Optional, Tuple, Type, Union
|
||||
|
||||
from reflex import constants
|
||||
from reflex.compiler import templates, utils
|
||||
@ -78,7 +78,6 @@ def _compile_app(app_root: Component) -> str:
|
||||
hooks=app_root._get_all_hooks(),
|
||||
window_libraries=window_libraries,
|
||||
render=app_root.render(),
|
||||
dynamic_imports=app_root._get_all_dynamic_imports(),
|
||||
)
|
||||
|
||||
|
||||
@ -508,7 +507,7 @@ def compile_tailwind(
|
||||
The compiled Tailwind config.
|
||||
"""
|
||||
# Get the path for the output file.
|
||||
output_path = str((get_web_dir() / constants.Tailwind.CONFIG).absolute())
|
||||
output_path = get_web_dir() / constants.Tailwind.CONFIG
|
||||
|
||||
# Compile the config.
|
||||
code = _compile_tailwind(config)
|
||||
@ -545,47 +544,7 @@ def purge_web_pages_dir():
|
||||
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from reflex.app import ComponentCallable, UnevaluatedPage
|
||||
|
||||
|
||||
def _into_component_once(component: Component | ComponentCallable) -> Component | None:
|
||||
"""Convert a component to a Component.
|
||||
|
||||
Args:
|
||||
component: The component to convert.
|
||||
|
||||
Returns:
|
||||
The converted component.
|
||||
"""
|
||||
if isinstance(component, Component):
|
||||
return component
|
||||
if isinstance(component, (Var, int, float, str)):
|
||||
return Fragment.create(component)
|
||||
if isinstance(component, Sequence):
|
||||
return Fragment.create(*component)
|
||||
return None
|
||||
|
||||
|
||||
def into_component(component: Component | ComponentCallable) -> Component:
|
||||
"""Convert a component to a Component.
|
||||
|
||||
Args:
|
||||
component: The component to convert.
|
||||
|
||||
Returns:
|
||||
The converted component.
|
||||
|
||||
Raises:
|
||||
TypeError: If the component is not a Component.
|
||||
"""
|
||||
if (converted := _into_component_once(component)) is not None:
|
||||
return converted
|
||||
if (
|
||||
callable(component)
|
||||
and (converted := _into_component_once(component())) is not None
|
||||
):
|
||||
return converted
|
||||
raise TypeError(f"Expected a Component, got {type(component)}")
|
||||
from reflex.app import UnevaluatedPage
|
||||
|
||||
|
||||
def compile_unevaluated_page(
|
||||
@ -608,7 +567,12 @@ def compile_unevaluated_page(
|
||||
The compiled component and whether state should be enabled.
|
||||
"""
|
||||
# Generate the component if it is a callable.
|
||||
component = into_component(page.component)
|
||||
component = page.component
|
||||
component = component if isinstance(component, Component) else component()
|
||||
|
||||
# unpack components that return tuples in an rx.fragment.
|
||||
if isinstance(component, tuple):
|
||||
component = Fragment.create(*component)
|
||||
|
||||
component._add_style_recursive(style or {}, theme)
|
||||
|
||||
@ -713,8 +677,10 @@ class ExecutorSafeFunctions:
|
||||
The route, compiled component, and compiled page.
|
||||
"""
|
||||
component, enable_state = compile_unevaluated_page(
|
||||
route, cls.UNCOMPILED_PAGES[route], cls.STATE, style, theme
|
||||
route, cls.UNCOMPILED_PAGES[route]
|
||||
)
|
||||
component = component if isinstance(component, Component) else component()
|
||||
component._add_style_recursive(style, theme)
|
||||
return route, component, compile_page(route, component, cls.STATE)
|
||||
|
||||
@classmethod
|
||||
|
@ -48,10 +48,11 @@ class ReflexJinjaEnvironment(Environment):
|
||||
|
||||
def __init__(self) -> None:
|
||||
"""Set default environment."""
|
||||
extensions = ["jinja2.ext.debug"]
|
||||
super().__init__(
|
||||
extensions=extensions,
|
||||
trim_blocks=True,
|
||||
lstrip_blocks=True,
|
||||
auto_reload=False,
|
||||
)
|
||||
self.filters["json_dumps"] = json_dumps
|
||||
self.filters["react_setter"] = lambda state: f"set{state.capitalize()}"
|
||||
|
@ -10,7 +10,16 @@ from pathlib import Path
|
||||
from typing import Any, Callable, Dict, Optional, Type, Union
|
||||
from urllib.parse import urlparse
|
||||
|
||||
from pydantic.v1.fields import ModelField
|
||||
from reflex.utils.exec import is_in_app_harness
|
||||
from reflex.utils.prerequisites import get_web_dir
|
||||
from reflex.vars.base import Var
|
||||
|
||||
try:
|
||||
from pydantic.v1.fields import ModelField
|
||||
except ModuleNotFoundError:
|
||||
from pydantic.fields import (
|
||||
ModelField, # pyright: ignore [reportAttributeAccessIssue]
|
||||
)
|
||||
|
||||
from reflex import constants
|
||||
from reflex.components.base import (
|
||||
@ -30,10 +39,7 @@ from reflex.istate.storage import Cookie, LocalStorage, SessionStorage
|
||||
from reflex.state import BaseState, _resolve_delta
|
||||
from reflex.style import Style
|
||||
from reflex.utils import console, format, imports, path_ops
|
||||
from reflex.utils.exec import is_in_app_harness
|
||||
from reflex.utils.imports import ImportVar, ParsedImportDict
|
||||
from reflex.utils.prerequisites import get_web_dir
|
||||
from reflex.vars.base import Var
|
||||
|
||||
# To re-export this function.
|
||||
merge_imports = imports.merge_imports
|
||||
@ -113,34 +119,24 @@ def compile_imports(import_dict: ParsedImportDict) -> list[dict]:
|
||||
validate_imports(collapsed_import_dict)
|
||||
import_dicts = []
|
||||
for lib, fields in collapsed_import_dict.items():
|
||||
default, rest = compile_import_statement(fields)
|
||||
|
||||
# prevent lib from being rendered on the page if all imports are non rendered kind
|
||||
if not any(f.render for f in fields):
|
||||
continue
|
||||
|
||||
lib_paths: dict[str, list[ImportVar]] = {}
|
||||
if not lib:
|
||||
if default:
|
||||
raise ValueError("No default field allowed for empty library.")
|
||||
if rest is None or len(rest) == 0:
|
||||
raise ValueError("No fields to import.")
|
||||
import_dicts.extend(get_import_dict(module) for module in sorted(rest))
|
||||
continue
|
||||
|
||||
for field in fields:
|
||||
lib_paths.setdefault(field.package_path, []).append(field)
|
||||
# remove the version before rendering the package imports
|
||||
lib = format.format_library_name(lib)
|
||||
|
||||
compiled = {
|
||||
path: compile_import_statement(fields) for path, fields in lib_paths.items()
|
||||
}
|
||||
|
||||
for path, (default, rest) in compiled.items():
|
||||
if not lib:
|
||||
if default:
|
||||
raise ValueError("No default field allowed for empty library.")
|
||||
if rest is None or len(rest) == 0:
|
||||
raise ValueError("No fields to import.")
|
||||
import_dicts.extend(get_import_dict(module) for module in sorted(rest))
|
||||
continue
|
||||
|
||||
# remove the version before rendering the package imports
|
||||
formatted_lib = format.format_library_name(lib) + (
|
||||
path if path != "/" else ""
|
||||
)
|
||||
|
||||
import_dicts.append(get_import_dict(formatted_lib, default, rest))
|
||||
import_dicts.append(get_import_dict(lib, default, rest))
|
||||
return import_dicts
|
||||
|
||||
|
||||
@ -162,22 +158,6 @@ def get_import_dict(lib: str, default: str = "", rest: list[str] | None = None)
|
||||
}
|
||||
|
||||
|
||||
def save_error(error: Exception) -> str:
|
||||
"""Save the error to a file.
|
||||
|
||||
Args:
|
||||
error: The error to save.
|
||||
|
||||
Returns:
|
||||
The path of the saved error.
|
||||
"""
|
||||
timestamp = datetime.now().strftime("%Y-%m-%d__%H-%M-%S")
|
||||
constants.Reflex.LOGS_DIR.mkdir(parents=True, exist_ok=True)
|
||||
log_path = constants.Reflex.LOGS_DIR / f"error_{timestamp}.log"
|
||||
traceback.TracebackException.from_exception(error).print(file=log_path.open("w+"))
|
||||
return str(log_path)
|
||||
|
||||
|
||||
def compile_state(state: Type[BaseState]) -> dict:
|
||||
"""Compile the state of the app.
|
||||
|
||||
@ -190,7 +170,10 @@ def compile_state(state: Type[BaseState]) -> dict:
|
||||
try:
|
||||
initial_state = state(_reflex_internal_init=True).dict(initial=True)
|
||||
except Exception as e:
|
||||
log_path = save_error(e)
|
||||
timestamp = datetime.now().strftime("%Y-%m-%d__%H-%M-%S")
|
||||
constants.Reflex.LOGS_DIR.mkdir(parents=True, exist_ok=True)
|
||||
log_path = constants.Reflex.LOGS_DIR / f"state_compile_error_{timestamp}.log"
|
||||
traceback.TracebackException.from_exception(e).print(file=log_path.open("w+"))
|
||||
console.warn(
|
||||
f"Failed to compile initial state with computed vars. Error log saved to {log_path}"
|
||||
)
|
||||
@ -517,8 +500,6 @@ def write_page(path: str | Path, code: str):
|
||||
"""
|
||||
path = Path(path)
|
||||
path_ops.mkdir(path.parent)
|
||||
if path.exists() and path.read_text(encoding="utf-8") == code:
|
||||
return
|
||||
path.write_text(code, encoding="utf-8")
|
||||
|
||||
|
||||
|
@ -2,54 +2,14 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any, Iterator, Sequence
|
||||
from typing import Any, Iterator
|
||||
|
||||
from reflex.components.component import BaseComponent, Component, ComponentStyle
|
||||
from reflex.components.component import Component, LiteralComponentVar
|
||||
from reflex.components.tags import Tag
|
||||
from reflex.components.tags.tagless import Tagless
|
||||
from reflex.config import PerformanceMode, environment
|
||||
from reflex.utils import console
|
||||
from reflex.utils.decorator import once
|
||||
from reflex.utils.imports import ParsedImportDict
|
||||
from reflex.vars import BooleanVar, ObjectVar, Var
|
||||
from reflex.vars.base import GLOBAL_CACHE, VarData
|
||||
from reflex.vars.sequence import LiteralStringVar
|
||||
|
||||
|
||||
@once
|
||||
def get_performance_mode():
|
||||
"""Get the performance mode.
|
||||
|
||||
Returns:
|
||||
The performance mode.
|
||||
"""
|
||||
return environment.REFLEX_PERF_MODE.get()
|
||||
|
||||
|
||||
def validate_str(value: str):
|
||||
"""Validate a string value.
|
||||
|
||||
Args:
|
||||
value: The value to validate.
|
||||
|
||||
Raises:
|
||||
ValueError: If the value is a Var and the performance mode is set to raise.
|
||||
"""
|
||||
perf_mode = get_performance_mode()
|
||||
if perf_mode != PerformanceMode.OFF and value.startswith("reflex___state"):
|
||||
if perf_mode == PerformanceMode.WARN:
|
||||
console.warn(
|
||||
f"Output includes {value!s} which will be displayed as a string. If you are calling `str` on a Var, consider using .to_string() instead."
|
||||
)
|
||||
elif perf_mode == PerformanceMode.RAISE:
|
||||
raise ValueError(
|
||||
f"Output includes {value!s} which will be displayed as a string. If you are calling `str` on a Var, consider using .to_string() instead."
|
||||
)
|
||||
|
||||
|
||||
def _components_from_var(var: Var) -> Sequence[BaseComponent]:
|
||||
var_data = var._get_all_var_data()
|
||||
return var_data.components if var_data else ()
|
||||
from reflex.vars.base import VarData
|
||||
|
||||
|
||||
class Bare(Component):
|
||||
@ -68,14 +28,9 @@ class Bare(Component):
|
||||
The component.
|
||||
"""
|
||||
if isinstance(contents, Var):
|
||||
if isinstance(contents, LiteralStringVar):
|
||||
validate_str(contents._var_value)
|
||||
return cls(contents=contents)
|
||||
else:
|
||||
if isinstance(contents, str):
|
||||
validate_str(contents)
|
||||
contents = str(contents) if contents is not None else ""
|
||||
|
||||
return cls(contents=contents)
|
||||
|
||||
def _get_all_hooks_internal(self) -> dict[str, VarData | None]:
|
||||
@ -85,9 +40,8 @@ class Bare(Component):
|
||||
The hooks for the component.
|
||||
"""
|
||||
hooks = super()._get_all_hooks_internal()
|
||||
if isinstance(self.contents, Var):
|
||||
for component in _components_from_var(self.contents):
|
||||
hooks |= component._get_all_hooks_internal()
|
||||
if isinstance(self.contents, LiteralComponentVar):
|
||||
hooks |= self.contents._var_value._get_all_hooks_internal()
|
||||
return hooks
|
||||
|
||||
def _get_all_hooks(self) -> dict[str, VarData | None]:
|
||||
@ -97,22 +51,18 @@ class Bare(Component):
|
||||
The hooks for the component.
|
||||
"""
|
||||
hooks = super()._get_all_hooks()
|
||||
if isinstance(self.contents, Var):
|
||||
for component in _components_from_var(self.contents):
|
||||
hooks |= component._get_all_hooks()
|
||||
if isinstance(self.contents, LiteralComponentVar):
|
||||
hooks |= self.contents._var_value._get_all_hooks()
|
||||
return hooks
|
||||
|
||||
def _get_all_imports(self, collapse: bool = False) -> ParsedImportDict:
|
||||
def _get_all_imports(self) -> ParsedImportDict:
|
||||
"""Include the imports for the component.
|
||||
|
||||
Args:
|
||||
collapse: Whether to collapse the imports.
|
||||
|
||||
Returns:
|
||||
The imports for the component.
|
||||
"""
|
||||
imports = super()._get_all_imports(collapse=collapse)
|
||||
if isinstance(self.contents, Var):
|
||||
imports = super()._get_all_imports()
|
||||
if isinstance(self.contents, LiteralComponentVar):
|
||||
var_data = self.contents._get_all_var_data()
|
||||
if var_data:
|
||||
imports |= {k: list(v) for k, v in var_data.imports}
|
||||
@ -125,9 +75,8 @@ class Bare(Component):
|
||||
The dynamic imports.
|
||||
"""
|
||||
dynamic_imports = super()._get_all_dynamic_imports()
|
||||
if isinstance(self.contents, Var):
|
||||
for component in _components_from_var(self.contents):
|
||||
dynamic_imports |= component._get_all_dynamic_imports()
|
||||
if isinstance(self.contents, LiteralComponentVar):
|
||||
dynamic_imports |= self.contents._var_value._get_all_dynamic_imports()
|
||||
return dynamic_imports
|
||||
|
||||
def _get_all_custom_code(self) -> set[str]:
|
||||
@ -137,24 +86,10 @@ class Bare(Component):
|
||||
The custom code.
|
||||
"""
|
||||
custom_code = super()._get_all_custom_code()
|
||||
if isinstance(self.contents, Var):
|
||||
for component in _components_from_var(self.contents):
|
||||
custom_code |= component._get_all_custom_code()
|
||||
if isinstance(self.contents, LiteralComponentVar):
|
||||
custom_code |= self.contents._var_value._get_all_custom_code()
|
||||
return custom_code
|
||||
|
||||
def _get_all_app_wrap_components(self) -> dict[tuple[int, str], Component]:
|
||||
"""Get the components that should be wrapped in the app.
|
||||
|
||||
Returns:
|
||||
The components that should be wrapped in the app.
|
||||
"""
|
||||
app_wrap_components = super()._get_all_app_wrap_components()
|
||||
if isinstance(self.contents, Var):
|
||||
for component in _components_from_var(self.contents):
|
||||
if isinstance(component, Component):
|
||||
app_wrap_components |= component._get_all_app_wrap_components()
|
||||
return app_wrap_components
|
||||
|
||||
def _get_all_refs(self) -> set[str]:
|
||||
"""Get the refs for the children of the component.
|
||||
|
||||
@ -162,9 +97,8 @@ class Bare(Component):
|
||||
The refs for the children.
|
||||
"""
|
||||
refs = super()._get_all_refs()
|
||||
if isinstance(self.contents, Var):
|
||||
for component in _components_from_var(self.contents):
|
||||
refs |= component._get_all_refs()
|
||||
if isinstance(self.contents, LiteralComponentVar):
|
||||
refs |= self.contents._var_value._get_all_refs()
|
||||
return refs
|
||||
|
||||
def _render(self) -> Tag:
|
||||
@ -174,33 +108,6 @@ class Bare(Component):
|
||||
return Tagless(contents=f"{{{self.contents!s}}}")
|
||||
return Tagless(contents=str(self.contents))
|
||||
|
||||
def _add_style_recursive(
|
||||
self, style: ComponentStyle, theme: Component | None = None
|
||||
) -> Component:
|
||||
"""Add style to the component and its children.
|
||||
|
||||
Args:
|
||||
style: The style to add.
|
||||
theme: The theme to add.
|
||||
|
||||
Returns:
|
||||
The component with the style added.
|
||||
"""
|
||||
new_self = super()._add_style_recursive(style, theme)
|
||||
|
||||
are_components_touched = False
|
||||
|
||||
if isinstance(self.contents, Var):
|
||||
for component in _components_from_var(self.contents):
|
||||
if isinstance(component, Component):
|
||||
component._add_style_recursive(style, theme)
|
||||
are_components_touched = True
|
||||
|
||||
if are_components_touched:
|
||||
GLOBAL_CACHE.clear()
|
||||
|
||||
return new_self
|
||||
|
||||
def _get_vars(
|
||||
self, include_children: bool = False, ignore_ids: set[int] | None = None
|
||||
) -> Iterator[Var]:
|
||||
|
@ -4,7 +4,6 @@ from __future__ import annotations
|
||||
|
||||
import copy
|
||||
import dataclasses
|
||||
import inspect
|
||||
import typing
|
||||
from abc import ABC, abstractmethod
|
||||
from functools import lru_cache, wraps
|
||||
@ -22,12 +21,8 @@ from typing import (
|
||||
Set,
|
||||
Type,
|
||||
Union,
|
||||
get_args,
|
||||
get_origin,
|
||||
)
|
||||
|
||||
from typing_extensions import Self
|
||||
|
||||
import reflex.state
|
||||
from reflex.base import Base
|
||||
from reflex.compiler.templates import STATEFUL_COMPONENT
|
||||
@ -46,7 +41,6 @@ from reflex.constants import (
|
||||
from reflex.constants.compiler import SpecialAttributes
|
||||
from reflex.constants.state import FRONTEND_EVENT_STATE
|
||||
from reflex.event import (
|
||||
EventActionsMixin,
|
||||
EventCallback,
|
||||
EventChain,
|
||||
EventHandler,
|
||||
@ -55,7 +49,13 @@ from reflex.event import (
|
||||
)
|
||||
from reflex.style import Style, format_as_emotion
|
||||
from reflex.utils import format, imports, types
|
||||
from reflex.utils.imports import ImportDict, ImportVar, ParsedImportDict, parse_imports
|
||||
from reflex.utils.imports import (
|
||||
ImmutableParsedImportDict,
|
||||
ImportDict,
|
||||
ImportVar,
|
||||
ParsedImportDict,
|
||||
parse_imports,
|
||||
)
|
||||
from reflex.vars import VarData
|
||||
from reflex.vars.base import (
|
||||
CachedVarOperation,
|
||||
@ -179,7 +179,6 @@ ComponentStyle = Dict[
|
||||
Union[str, Type[BaseComponent], Callable, ComponentNamespace], Any
|
||||
]
|
||||
ComponentChild = Union[types.PrimitiveType, Var, BaseComponent]
|
||||
ComponentChildTypes = (*types.PrimitiveTypes, Var, BaseComponent)
|
||||
|
||||
|
||||
def satisfies_type_hint(obj: Any, type_hint: Any) -> bool:
|
||||
@ -192,26 +191,11 @@ def satisfies_type_hint(obj: Any, type_hint: Any) -> bool:
|
||||
Returns:
|
||||
Whether the object satisfies the type hint.
|
||||
"""
|
||||
return types._isinstance(obj, type_hint, nested=1)
|
||||
|
||||
|
||||
def _components_from(
|
||||
component_or_var: Union[BaseComponent, Var],
|
||||
) -> tuple[BaseComponent, ...]:
|
||||
"""Get the components from a component or Var.
|
||||
|
||||
Args:
|
||||
component_or_var: The component or Var to get the components from.
|
||||
|
||||
Returns:
|
||||
The components.
|
||||
"""
|
||||
if isinstance(component_or_var, Var):
|
||||
var_data = component_or_var._get_all_var_data()
|
||||
return var_data.components if var_data else ()
|
||||
if isinstance(component_or_var, BaseComponent):
|
||||
return (component_or_var,)
|
||||
return ()
|
||||
if isinstance(obj, LiteralVar):
|
||||
return types._isinstance(obj._var_value, type_hint)
|
||||
if isinstance(obj, Var):
|
||||
return types._issubclass(obj._var_type, type_hint)
|
||||
return types._isinstance(obj, type_hint)
|
||||
|
||||
|
||||
class Component(BaseComponent, ABC):
|
||||
@ -512,7 +496,7 @@ class Component(BaseComponent, ABC):
|
||||
|
||||
# Remove any keys that were added as events.
|
||||
for key in kwargs["event_triggers"]:
|
||||
kwargs.pop(key, None)
|
||||
del kwargs[key]
|
||||
|
||||
# Place data_ and aria_ attributes into custom_attrs
|
||||
special_attributes = tuple(
|
||||
@ -688,22 +672,13 @@ class Component(BaseComponent, ABC):
|
||||
"""
|
||||
return set()
|
||||
|
||||
@classmethod
|
||||
def _are_fields_known(cls) -> bool:
|
||||
"""Check if all fields are known at compile time. True for most components.
|
||||
|
||||
Returns:
|
||||
Whether all fields are known at compile time.
|
||||
"""
|
||||
return True
|
||||
|
||||
@classmethod
|
||||
@lru_cache(maxsize=None)
|
||||
def _get_component_prop_names(cls) -> Set[str]:
|
||||
"""Get the names of the component props. NOTE: This assumes all fields are known.
|
||||
def get_component_props(cls) -> set[str]:
|
||||
"""Get the props that expected a component as value.
|
||||
|
||||
Returns:
|
||||
The names of the component props.
|
||||
The components props.
|
||||
"""
|
||||
return {
|
||||
name
|
||||
@ -712,28 +687,8 @@ class Component(BaseComponent, ABC):
|
||||
and types._issubclass(field.outer_type_, Component)
|
||||
}
|
||||
|
||||
def _get_components_in_props(self) -> Sequence[BaseComponent]:
|
||||
"""Get the components in the props.
|
||||
|
||||
Returns:
|
||||
The components in the props
|
||||
"""
|
||||
if self._are_fields_known():
|
||||
return [
|
||||
component
|
||||
for name in self._get_component_prop_names()
|
||||
for component in _components_from(getattr(self, name))
|
||||
]
|
||||
return [
|
||||
component
|
||||
for prop in self.get_props()
|
||||
if (value := getattr(self, prop)) is not None
|
||||
and isinstance(value, (BaseComponent, Var))
|
||||
for component in _components_from(value)
|
||||
]
|
||||
|
||||
@classmethod
|
||||
def create(cls, *children, **props) -> Self:
|
||||
def create(cls, *children, **props) -> Component:
|
||||
"""Create the component.
|
||||
|
||||
Args:
|
||||
@ -757,8 +712,8 @@ class Component(BaseComponent, ABC):
|
||||
validate_children(child)
|
||||
|
||||
# Make sure the child is a valid type.
|
||||
if isinstance(child, dict) or not isinstance(
|
||||
child, ComponentChildTypes
|
||||
if isinstance(child, dict) or not types._isinstance(
|
||||
child, ComponentChild
|
||||
):
|
||||
raise ChildrenTypeError(component=cls.__name__, child=child)
|
||||
|
||||
@ -1188,9 +1143,6 @@ class Component(BaseComponent, ABC):
|
||||
if custom_code is not None:
|
||||
code.add(custom_code)
|
||||
|
||||
for component in self._get_components_in_props():
|
||||
code |= component._get_all_custom_code()
|
||||
|
||||
# Add the custom code from add_custom_code method.
|
||||
for clz in self._iter_parent_classes_with_method("add_custom_code"):
|
||||
for item in clz.add_custom_code(self):
|
||||
@ -1218,7 +1170,7 @@ class Component(BaseComponent, ABC):
|
||||
The dynamic imports.
|
||||
"""
|
||||
# Store the import in a set to avoid duplicates.
|
||||
dynamic_imports: set[str] = set()
|
||||
dynamic_imports = set()
|
||||
|
||||
# Get dynamic import for this component.
|
||||
dynamic_import = self._get_dynamic_imports()
|
||||
@ -1229,12 +1181,25 @@ class Component(BaseComponent, ABC):
|
||||
for child in self.children:
|
||||
dynamic_imports |= child._get_all_dynamic_imports()
|
||||
|
||||
for component in self._get_components_in_props():
|
||||
dynamic_imports |= component._get_all_dynamic_imports()
|
||||
for prop in self.get_component_props():
|
||||
if getattr(self, prop) is not None:
|
||||
dynamic_imports |= getattr(self, prop)._get_all_dynamic_imports()
|
||||
|
||||
# Return the dynamic imports
|
||||
return dynamic_imports
|
||||
|
||||
def _get_props_imports(self) -> List[ParsedImportDict]:
|
||||
"""Get the imports needed for components props.
|
||||
|
||||
Returns:
|
||||
The imports for the components props of the component.
|
||||
"""
|
||||
return [
|
||||
getattr(self, prop)._get_all_imports()
|
||||
for prop in self.get_component_props()
|
||||
if getattr(self, prop) is not None
|
||||
]
|
||||
|
||||
def _should_transpile(self, dep: str | None) -> bool:
|
||||
"""Check if a dependency should be transpiled.
|
||||
|
||||
@ -1244,7 +1209,7 @@ class Component(BaseComponent, ABC):
|
||||
Returns:
|
||||
True if the dependency should be transpiled.
|
||||
"""
|
||||
return bool(self.transpile_packages) and (
|
||||
return (
|
||||
dep in self.transpile_packages
|
||||
or format.format_library_name(dep or "") in self.transpile_packages
|
||||
)
|
||||
@ -1327,10 +1292,9 @@ class Component(BaseComponent, ABC):
|
||||
event_imports = Imports.EVENTS if self.event_triggers else {}
|
||||
|
||||
# Collect imports from Vars used directly by this component.
|
||||
var_imports = [
|
||||
var_data.imports
|
||||
for var in self._get_vars()
|
||||
if (var_data := var._get_all_var_data()) is not None
|
||||
var_datas = [var._get_all_var_data() for var in self._get_vars()]
|
||||
var_imports: List[ImmutableParsedImportDict] = [
|
||||
var_data.imports for var_data in var_datas if var_data is not None
|
||||
]
|
||||
|
||||
added_import_dicts: list[ParsedImportDict] = []
|
||||
@ -1345,6 +1309,7 @@ class Component(BaseComponent, ABC):
|
||||
)
|
||||
|
||||
return imports.merge_imports(
|
||||
*self._get_props_imports(),
|
||||
self._get_dependencies_imports(),
|
||||
self._get_hooks_imports(),
|
||||
_imports,
|
||||
@ -1421,8 +1386,6 @@ class Component(BaseComponent, ABC):
|
||||
for k in var_data.hooks
|
||||
}
|
||||
)
|
||||
for component in var_data.components:
|
||||
vars_hooks.update(component._get_all_hooks())
|
||||
return vars_hooks
|
||||
|
||||
def _get_events_hooks(self) -> dict[str, VarData | None]:
|
||||
@ -1571,9 +1534,6 @@ class Component(BaseComponent, ABC):
|
||||
refs.add(ref)
|
||||
for child in self.children:
|
||||
refs |= child._get_all_refs()
|
||||
for component in self._get_components_in_props():
|
||||
refs |= component._get_all_refs()
|
||||
|
||||
return refs
|
||||
|
||||
def _get_all_custom_components(
|
||||
@ -1597,9 +1557,6 @@ class Component(BaseComponent, ABC):
|
||||
if not isinstance(child, Component):
|
||||
continue
|
||||
custom_components |= child._get_all_custom_components(seen=seen)
|
||||
for component in self._get_components_in_props():
|
||||
if isinstance(component, Component) and component.tag is not None:
|
||||
custom_components |= component._get_all_custom_components(seen=seen)
|
||||
return custom_components
|
||||
|
||||
@property
|
||||
@ -1663,65 +1620,17 @@ class CustomComponent(Component):
|
||||
# The props of the component.
|
||||
props: Dict[str, Any] = {}
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
# Props that reference other components.
|
||||
component_props: Dict[str, Component] = {}
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
"""Initialize the custom component.
|
||||
|
||||
Args:
|
||||
*args: The args to pass to the component.
|
||||
**kwargs: The kwargs to pass to the component.
|
||||
"""
|
||||
component_fn = kwargs.get("component_fn")
|
||||
|
||||
# Set the props.
|
||||
props_types = typing.get_type_hints(component_fn) if component_fn else {}
|
||||
props = {key: value for key, value in kwargs.items() if key in props_types}
|
||||
kwargs = {key: value for key, value in kwargs.items() if key not in props_types}
|
||||
|
||||
event_types = {
|
||||
key
|
||||
for key in props
|
||||
if (
|
||||
(get_origin((annotation := props_types.get(key))) or annotation)
|
||||
== EventHandler
|
||||
)
|
||||
}
|
||||
|
||||
def get_args_spec(key: str) -> types.ArgsSpec | Sequence[types.ArgsSpec]:
|
||||
type_ = props_types[key]
|
||||
|
||||
return (
|
||||
args[0]
|
||||
if (args := get_args(type_))
|
||||
else (
|
||||
annotation_args[1]
|
||||
if get_origin(
|
||||
(
|
||||
annotation := inspect.getfullargspec(
|
||||
component_fn
|
||||
).annotations[key]
|
||||
)
|
||||
)
|
||||
is typing.Annotated
|
||||
and (annotation_args := get_args(annotation))
|
||||
else no_args_event_spec
|
||||
)
|
||||
)
|
||||
|
||||
super().__init__(
|
||||
event_triggers={
|
||||
key: EventChain.create(
|
||||
value=props[key],
|
||||
args_spec=get_args_spec(key),
|
||||
key=key,
|
||||
)
|
||||
for key in event_types
|
||||
},
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
to_camel_cased_props = {
|
||||
format.to_camel_case(key) for key in props if key not in event_types
|
||||
}
|
||||
self.get_props = lambda: to_camel_cased_props # pyright: ignore [reportIncompatibleVariableOverride]
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
# Unset the style.
|
||||
self.style = Style()
|
||||
@ -1729,36 +1638,51 @@ class CustomComponent(Component):
|
||||
# Set the tag to the name of the function.
|
||||
self.tag = format.to_title_case(self.component_fn.__name__)
|
||||
|
||||
for key, value in props.items():
|
||||
# Skip kwargs that are not props.
|
||||
if key not in props_types:
|
||||
continue
|
||||
# Get the event triggers defined in the component declaration.
|
||||
event_triggers_in_component_declaration = self.get_event_triggers()
|
||||
|
||||
camel_cased_key = format.to_camel_case(key)
|
||||
# Set the props.
|
||||
props = typing.get_type_hints(self.component_fn)
|
||||
for key, value in kwargs.items():
|
||||
# Skip kwargs that are not props.
|
||||
if key not in props:
|
||||
continue
|
||||
|
||||
# Get the type based on the annotation.
|
||||
type_ = props_types[key]
|
||||
type_ = props[key]
|
||||
|
||||
# Handle event chains.
|
||||
if types._issubclass(type_, EventActionsMixin):
|
||||
inspect.getfullargspec(component_fn).annotations[key]
|
||||
self.props[camel_cased_key] = EventChain.create(
|
||||
value=value, args_spec=get_args_spec(key), key=key
|
||||
if types._issubclass(type_, EventChain):
|
||||
value = EventChain.create(
|
||||
value=value,
|
||||
args_spec=event_triggers_in_component_declaration.get(
|
||||
key, no_args_event_spec
|
||||
),
|
||||
key=key,
|
||||
)
|
||||
self.props[format.to_camel_case(key)] = value
|
||||
continue
|
||||
|
||||
value = LiteralVar.create(value)
|
||||
self.props[camel_cased_key] = value
|
||||
setattr(self, camel_cased_key, value)
|
||||
# Handle subclasses of Base.
|
||||
if isinstance(value, Base):
|
||||
base_value = LiteralVar.create(value)
|
||||
|
||||
@classmethod
|
||||
def _are_fields_known(cls) -> bool:
|
||||
"""Check if the fields are known.
|
||||
# Track hooks and imports associated with Component instances.
|
||||
if base_value is not None and isinstance(value, Component):
|
||||
self.component_props[key] = value
|
||||
value = base_value._replace(
|
||||
merge_var_data=VarData(
|
||||
imports=value._get_all_imports(),
|
||||
hooks=value._get_all_hooks(),
|
||||
)
|
||||
)
|
||||
else:
|
||||
value = base_value
|
||||
else:
|
||||
value = LiteralVar.create(value)
|
||||
|
||||
Returns:
|
||||
Whether the fields are known.
|
||||
"""
|
||||
return False
|
||||
# Set the prop.
|
||||
self.props[format.to_camel_case(key)] = value
|
||||
|
||||
def __eq__(self, other: Any) -> bool:
|
||||
"""Check if the component is equal to another.
|
||||
@ -1780,7 +1704,7 @@ class CustomComponent(Component):
|
||||
return hash(self.tag)
|
||||
|
||||
@classmethod
|
||||
def get_props(cls) -> Set[str]:
|
||||
def get_props(cls) -> Set[str]: # pyright: ignore [reportIncompatibleVariableOverride]
|
||||
"""Get the props for the component.
|
||||
|
||||
Returns:
|
||||
@ -1817,8 +1741,27 @@ class CustomComponent(Component):
|
||||
seen=seen
|
||||
)
|
||||
|
||||
# Fetch custom components from props as well.
|
||||
for child_component in self.component_props.values():
|
||||
if child_component.tag is None:
|
||||
continue
|
||||
if child_component.tag not in seen:
|
||||
seen.add(child_component.tag)
|
||||
if isinstance(child_component, CustomComponent):
|
||||
custom_components |= {child_component}
|
||||
custom_components |= child_component._get_all_custom_components(
|
||||
seen=seen
|
||||
)
|
||||
return custom_components
|
||||
|
||||
def _render(self) -> Tag:
|
||||
"""Define how to render the component in React.
|
||||
|
||||
Returns:
|
||||
The tag to render.
|
||||
"""
|
||||
return super()._render(props=self.props)
|
||||
|
||||
def get_prop_vars(self) -> List[Var]:
|
||||
"""Get the prop vars.
|
||||
|
||||
@ -1829,18 +1772,33 @@ class CustomComponent(Component):
|
||||
Var(
|
||||
_js_expr=name,
|
||||
_var_type=(
|
||||
prop._var_type
|
||||
if isinstance(prop, Var)
|
||||
else (
|
||||
type(prop)
|
||||
if not isinstance(prop, EventActionsMixin)
|
||||
else EventChain
|
||||
)
|
||||
prop._var_type if types._isinstance(prop, Var) else type(prop)
|
||||
),
|
||||
).guess_type()
|
||||
for name, prop in self.props.items()
|
||||
]
|
||||
|
||||
def _get_vars(
|
||||
self, include_children: bool = False, ignore_ids: set[int] | None = None
|
||||
) -> Iterator[Var]:
|
||||
"""Walk all Vars used in this component.
|
||||
|
||||
Args:
|
||||
include_children: Whether to include Vars from children.
|
||||
ignore_ids: The ids to ignore.
|
||||
|
||||
Yields:
|
||||
Each var referenced by the component (props, styles, event handlers).
|
||||
"""
|
||||
ignore_ids = ignore_ids or set()
|
||||
yield from super()._get_vars(
|
||||
include_children=include_children, ignore_ids=ignore_ids
|
||||
)
|
||||
yield from filter(lambda prop: isinstance(prop, Var), self.props.values())
|
||||
yield from self.get_component(self)._get_vars(
|
||||
include_children=include_children, ignore_ids=ignore_ids
|
||||
)
|
||||
|
||||
@lru_cache(maxsize=None) # noqa: B019
|
||||
def get_component(self) -> Component:
|
||||
"""Render the component.
|
||||
@ -2528,7 +2486,6 @@ class LiteralComponentVar(CachedVarOperation, LiteralVar, ComponentVar):
|
||||
The VarData for the var.
|
||||
"""
|
||||
return VarData.merge(
|
||||
self._var_data,
|
||||
VarData(
|
||||
imports={
|
||||
"@emotion/react": [
|
||||
@ -2571,21 +2528,9 @@ class LiteralComponentVar(CachedVarOperation, LiteralVar, ComponentVar):
|
||||
Returns:
|
||||
The var.
|
||||
"""
|
||||
var_datas = [
|
||||
var_data
|
||||
for var in value._get_vars(include_children=True)
|
||||
if (var_data := var._get_all_var_data())
|
||||
]
|
||||
|
||||
return LiteralComponentVar(
|
||||
_js_expr="",
|
||||
_var_type=type(value),
|
||||
_var_data=VarData.merge(
|
||||
_var_data,
|
||||
*var_datas,
|
||||
VarData(
|
||||
components=(value,),
|
||||
),
|
||||
),
|
||||
_var_data=_var_data,
|
||||
_var_value=value,
|
||||
)
|
||||
|
@ -48,7 +48,6 @@ _SUBMOD_ATTRS: dict[str, list[str]] = {
|
||||
"get_upload_url",
|
||||
"selected_files",
|
||||
],
|
||||
"auto_scroll": ["auto_scroll"],
|
||||
}
|
||||
|
||||
__getattr__, __dir__, __all__ = lazy_loader.attach(
|
||||
|
@ -4,7 +4,6 @@
|
||||
# ------------------------------------------------------
|
||||
|
||||
from . import layout as layout
|
||||
from .auto_scroll import auto_scroll as auto_scroll
|
||||
from .banner import ConnectionBanner as ConnectionBanner
|
||||
from .banner import ConnectionModal as ConnectionModal
|
||||
from .banner import ConnectionPulser as ConnectionPulser
|
||||
|
@ -1,114 +0,0 @@
|
||||
"""A component that automatically scrolls to the bottom when new content is added."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from reflex.components.el.elements.typography import Div
|
||||
from reflex.constants.compiler import MemoizationDisposition, MemoizationMode
|
||||
from reflex.utils.imports import ImportDict
|
||||
from reflex.vars.base import Var, get_unique_variable_name
|
||||
|
||||
|
||||
class AutoScroll(Div):
|
||||
"""A div that automatically scrolls to the bottom when new content is added."""
|
||||
|
||||
_memoization_mode = MemoizationMode(
|
||||
disposition=MemoizationDisposition.ALWAYS, recursive=False
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def create(cls, *children, **props):
|
||||
"""Create an AutoScroll component.
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
**props: The props of the component.
|
||||
|
||||
Returns:
|
||||
An AutoScroll component.
|
||||
"""
|
||||
props.setdefault("overflow", "auto")
|
||||
props.setdefault("id", get_unique_variable_name())
|
||||
return super().create(*children, **props)
|
||||
|
||||
def add_imports(self) -> ImportDict | list[ImportDict]:
|
||||
"""Add imports required for the component.
|
||||
|
||||
Returns:
|
||||
The imports required for the component.
|
||||
"""
|
||||
return {"react": ["useEffect", "useRef"]}
|
||||
|
||||
def add_hooks(self) -> list[str | Var]:
|
||||
"""Add hooks required for the component.
|
||||
|
||||
Returns:
|
||||
The hooks required for the component.
|
||||
"""
|
||||
ref_name = self.get_ref()
|
||||
return [
|
||||
"const wasNearBottom = useRef(false);",
|
||||
"const hadScrollbar = useRef(false);",
|
||||
f"""
|
||||
const checkIfNearBottom = () => {{
|
||||
if (!{ref_name}.current) return;
|
||||
|
||||
const container = {ref_name}.current;
|
||||
const nearBottomThreshold = 50; // pixels from bottom to trigger auto-scroll
|
||||
|
||||
const distanceFromBottom = container.scrollHeight - container.scrollTop - container.clientHeight;
|
||||
|
||||
wasNearBottom.current = distanceFromBottom <= nearBottomThreshold;
|
||||
|
||||
// Track if container had a scrollbar
|
||||
hadScrollbar.current = container.scrollHeight > container.clientHeight;
|
||||
}};
|
||||
""",
|
||||
f"""
|
||||
const scrollToBottomIfNeeded = () => {{
|
||||
if (!{ref_name}.current) return;
|
||||
|
||||
const container = {ref_name}.current;
|
||||
const hasScrollbarNow = container.scrollHeight > container.clientHeight;
|
||||
|
||||
// Scroll if:
|
||||
// 1. User was near bottom, OR
|
||||
// 2. Container didn't have scrollbar before but does now
|
||||
if (wasNearBottom.current || (!hadScrollbar.current && hasScrollbarNow)) {{
|
||||
container.scrollTop = container.scrollHeight;
|
||||
}}
|
||||
|
||||
// Update scrollbar state for next check
|
||||
hadScrollbar.current = hasScrollbarNow;
|
||||
}};
|
||||
""",
|
||||
f"""
|
||||
useEffect(() => {{
|
||||
const container = {ref_name}.current;
|
||||
if (!container) return;
|
||||
|
||||
scrollToBottomIfNeeded();
|
||||
|
||||
// Create ResizeObserver to detect height changes
|
||||
const resizeObserver = new ResizeObserver(() => {{
|
||||
scrollToBottomIfNeeded();
|
||||
}});
|
||||
|
||||
// Track scroll position before height changes
|
||||
container.addEventListener('scroll', checkIfNearBottom);
|
||||
|
||||
// Initial check
|
||||
checkIfNearBottom();
|
||||
|
||||
// Observe container for size changes
|
||||
resizeObserver.observe(container);
|
||||
|
||||
return () => {{
|
||||
container.removeEventListener('scroll', checkIfNearBottom);
|
||||
resizeObserver.disconnect();
|
||||
}};
|
||||
}});
|
||||
""",
|
||||
]
|
||||
|
||||
|
||||
auto_scroll = AutoScroll.create
|
@ -1,284 +0,0 @@
|
||||
"""Stub file for reflex/components/core/auto_scroll.py"""
|
||||
|
||||
# ------------------- DO NOT EDIT ----------------------
|
||||
# This file was generated by `reflex/utils/pyi_generator.py`!
|
||||
# ------------------------------------------------------
|
||||
from typing import Any, Dict, Literal, Optional, Union, overload
|
||||
|
||||
from reflex.components.el.elements.typography import Div
|
||||
from reflex.event import EventType
|
||||
from reflex.style import Style
|
||||
from reflex.utils.imports import ImportDict
|
||||
from reflex.vars.base import Var
|
||||
|
||||
class AutoScroll(Div):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
access_key: Optional[Union[Var[str], str]] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[
|
||||
Literal["characters", "none", "off", "on", "sentences", "words"],
|
||||
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
|
||||
]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[
|
||||
Literal["inherit", "plaintext-only", False, True],
|
||||
Var[Literal["inherit", "plaintext-only", False, True]],
|
||||
]
|
||||
] = None,
|
||||
context_menu: Optional[Union[Var[str], str]] = None,
|
||||
dir: Optional[Union[Var[str], str]] = None,
|
||||
draggable: Optional[Union[Var[bool], bool]] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"],
|
||||
Var[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
hidden: Optional[Union[Var[bool], bool]] = None,
|
||||
input_mode: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
item_prop: Optional[Union[Var[str], str]] = None,
|
||||
lang: Optional[Union[Var[str], str]] = None,
|
||||
role: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
slot: Optional[Union[Var[str], str]] = None,
|
||||
spell_check: Optional[Union[Var[bool], bool]] = None,
|
||||
tab_index: Optional[Union[Var[int], int]] = None,
|
||||
title: Optional[Union[Var[str], 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, Any]]] = None,
|
||||
on_blur: Optional[EventType[()]] = None,
|
||||
on_click: Optional[EventType[()]] = None,
|
||||
on_context_menu: Optional[EventType[()]] = None,
|
||||
on_double_click: Optional[EventType[()]] = None,
|
||||
on_focus: Optional[EventType[()]] = None,
|
||||
on_mount: Optional[EventType[()]] = None,
|
||||
on_mouse_down: Optional[EventType[()]] = None,
|
||||
on_mouse_enter: Optional[EventType[()]] = None,
|
||||
on_mouse_leave: Optional[EventType[()]] = None,
|
||||
on_mouse_move: Optional[EventType[()]] = None,
|
||||
on_mouse_out: Optional[EventType[()]] = None,
|
||||
on_mouse_over: Optional[EventType[()]] = None,
|
||||
on_mouse_up: Optional[EventType[()]] = None,
|
||||
on_scroll: Optional[EventType[()]] = None,
|
||||
on_unmount: Optional[EventType[()]] = None,
|
||||
**props,
|
||||
) -> "AutoScroll":
|
||||
"""Create an AutoScroll component.
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
access_key: Provides a hint for generating a keyboard shortcut for the current element.
|
||||
auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
||||
content_editable: Indicates whether the element's content is editable.
|
||||
context_menu: Defines the ID of a <menu> element which will serve as the element's context menu.
|
||||
dir: Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
|
||||
draggable: Defines whether the element can be dragged.
|
||||
enter_key_hint: Hints what media types the media element is able to play.
|
||||
hidden: Defines whether the element is hidden.
|
||||
input_mode: Defines the type of the element.
|
||||
item_prop: Defines the name of the element for metadata purposes.
|
||||
lang: Defines the language used in the element.
|
||||
role: Defines the role of the element.
|
||||
slot: Assigns a slot in a shadow DOM shadow tree to an element.
|
||||
spell_check: Defines whether the element may be checked for spelling errors.
|
||||
tab_index: Defines the position of the current element in the tabbing order.
|
||||
title: Defines a tooltip for the element.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: The props of the component.
|
||||
|
||||
Returns:
|
||||
An AutoScroll component.
|
||||
"""
|
||||
...
|
||||
|
||||
def add_imports(self) -> ImportDict | list[ImportDict]: ...
|
||||
def add_hooks(self) -> list[str | Var]: ...
|
||||
|
||||
auto_scroll = AutoScroll.create
|
@ -5,7 +5,6 @@ from __future__ import annotations
|
||||
from typing import Optional
|
||||
|
||||
from reflex import constants
|
||||
from reflex.components.base.fragment import Fragment
|
||||
from reflex.components.component import Component
|
||||
from reflex.components.core.cond import cond
|
||||
from reflex.components.el.elements.typography import Div
|
||||
@ -17,8 +16,7 @@ from reflex.components.radix.themes.components.dialog import (
|
||||
)
|
||||
from reflex.components.radix.themes.layout.flex import Flex
|
||||
from reflex.components.radix.themes.typography.text import Text
|
||||
from reflex.components.sonner.toast import ToastProps, toast_ref
|
||||
from reflex.config import environment
|
||||
from reflex.components.sonner.toast import Toaster, ToastProps
|
||||
from reflex.constants import Dirs, Hooks, Imports
|
||||
from reflex.constants.compiler import CompileVars
|
||||
from reflex.utils.imports import ImportVar
|
||||
@ -91,7 +89,7 @@ def default_connection_error() -> list[str | Var | Component]:
|
||||
]
|
||||
|
||||
|
||||
class ConnectionToaster(Fragment):
|
||||
class ConnectionToaster(Toaster):
|
||||
"""A connection toaster component."""
|
||||
|
||||
def add_hooks(self) -> list[str | Var]:
|
||||
@ -111,42 +109,9 @@ class ConnectionToaster(Fragment):
|
||||
id=toast_id,
|
||||
) # pyright: ignore [reportCallIssue]
|
||||
|
||||
if environment.REFLEX_DOES_BACKEND_COLD_START.get():
|
||||
loading_message = Var.create("Backend is starting.")
|
||||
backend_is_loading_toast_var = Var(
|
||||
f"toast?.loading({loading_message!s}, {{...toast_props, description: '', closeButton: false, onDismiss: () => setUserDismissed(true)}},)"
|
||||
)
|
||||
backend_is_not_responding = Var.create("Backend is not responding.")
|
||||
backend_is_down_toast_var = Var(
|
||||
f"toast?.error({backend_is_not_responding!s}, {{...toast_props, description: '', onDismiss: () => setUserDismissed(true)}},)"
|
||||
)
|
||||
toast_var = Var(
|
||||
f"""
|
||||
if (waitedForBackend) {{
|
||||
{backend_is_down_toast_var!s}
|
||||
}} else {{
|
||||
{backend_is_loading_toast_var!s};
|
||||
}}
|
||||
setTimeout(() => {{
|
||||
if ({has_too_many_connection_errors!s}) {{
|
||||
setWaitedForBackend(true);
|
||||
}}
|
||||
}}, {environment.REFLEX_BACKEND_COLD_START_TIMEOUT.get() * 1000});
|
||||
"""
|
||||
)
|
||||
else:
|
||||
loading_message = Var.create(
|
||||
f"Cannot connect to server: {connection_error}."
|
||||
)
|
||||
toast_var = Var(
|
||||
f"toast?.error({loading_message!s}, {{...toast_props, onDismiss: () => setUserDismissed(true)}},)"
|
||||
)
|
||||
|
||||
individual_hooks = [
|
||||
Var(f"const toast = {toast_ref};"),
|
||||
f"const toast_props = {LiteralVar.create(props)!s};",
|
||||
"const [userDismissed, setUserDismissed] = useState(false);",
|
||||
"const [waitedForBackend, setWaitedForBackend] = useState(false);",
|
||||
FunctionStringVar(
|
||||
"useEffect",
|
||||
_var_data=VarData(
|
||||
@ -162,16 +127,19 @@ setTimeout(() => {{
|
||||
() => {{
|
||||
if ({has_too_many_connection_errors!s}) {{
|
||||
if (!userDismissed) {{
|
||||
{toast_var!s}
|
||||
toast.error(
|
||||
`Cannot connect to server: ${{{connection_error}}}.`,
|
||||
{{...toast_props, onDismiss: () => setUserDismissed(true)}},
|
||||
)
|
||||
}}
|
||||
}} else {{
|
||||
toast?.dismiss("{toast_id}");
|
||||
toast.dismiss("{toast_id}");
|
||||
setUserDismissed(false); // after reconnection reset dismissed state
|
||||
}}
|
||||
}}
|
||||
"""
|
||||
),
|
||||
LiteralArrayVar.create([connect_errors, Var("waitedForBackend")]),
|
||||
LiteralArrayVar.create([connect_errors]),
|
||||
),
|
||||
]
|
||||
|
||||
@ -191,6 +159,7 @@ setTimeout(() => {{
|
||||
Returns:
|
||||
The connection toaster component.
|
||||
"""
|
||||
Toaster.is_used = True
|
||||
return super().create(*children, **props)
|
||||
|
||||
|
||||
|
@ -5,10 +5,10 @@
|
||||
# ------------------------------------------------------
|
||||
from typing import Any, Dict, Literal, Optional, Union, overload
|
||||
|
||||
from reflex.components.base.fragment import Fragment
|
||||
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 EventType
|
||||
from reflex.style import Style
|
||||
@ -41,13 +41,48 @@ class WebsocketTargetURL(Var):
|
||||
|
||||
def default_connection_error() -> list[str | Var | Component]: ...
|
||||
|
||||
class ConnectionToaster(Fragment):
|
||||
class ConnectionToaster(Toaster):
|
||||
def add_hooks(self) -> list[str | Var]: ...
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
theme: Optional[Union[Var[str], str]] = None,
|
||||
rich_colors: Optional[Union[Var[bool], bool]] = None,
|
||||
expand: Optional[Union[Var[bool], bool]] = None,
|
||||
visible_toasts: Optional[Union[Var[int], int]] = None,
|
||||
position: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"bottom-center",
|
||||
"bottom-left",
|
||||
"bottom-right",
|
||||
"top-center",
|
||||
"top-left",
|
||||
"top-right",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"bottom-center",
|
||||
"bottom-left",
|
||||
"bottom-right",
|
||||
"top-center",
|
||||
"top-left",
|
||||
"top-right",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
close_button: Optional[Union[Var[bool], bool]] = None,
|
||||
offset: Optional[Union[Var[str], str]] = None,
|
||||
dir: Optional[Union[Var[str], str]] = None,
|
||||
hotkey: Optional[Union[Var[str], str]] = None,
|
||||
invert: Optional[Union[Var[bool], bool]] = None,
|
||||
toast_options: Optional[Union[ToastProps, Var[ToastProps]]] = None,
|
||||
gap: Optional[Union[Var[int], int]] = None,
|
||||
loading_icon: Optional[Union[Icon, Var[Icon]]] = None,
|
||||
pause_when_page_is_hidden: Optional[Union[Var[bool], bool]] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
@ -75,6 +110,20 @@ class ConnectionToaster(Fragment):
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
theme: the theme of the toast
|
||||
rich_colors: whether to show rich colors
|
||||
expand: whether to expand the toast
|
||||
visible_toasts: the number of toasts that are currently visible
|
||||
position: the position of the toast
|
||||
close_button: whether to show the close button
|
||||
offset: offset of the toast
|
||||
dir: directionality of the toast (default: ltr)
|
||||
hotkey: Keyboard shortcut that will move focus to the toaster area.
|
||||
invert: Dark toasts in light mode and vice versa.
|
||||
toast_options: These will act as default options for all toasts. See toast() for all available options.
|
||||
gap: Gap between toasts when expanded
|
||||
loading_icon: Changes the default loading icon
|
||||
pause_when_page_is_hidden: Pauses toast timers when the page is hidden, e.g., when the tab is backgrounded, the browser is minimized, or the OS is locked.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
@ -222,211 +271,30 @@ class ConnectionPulser(Div):
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
access_key: Optional[Union[Var[str], str]] = None,
|
||||
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[
|
||||
Literal["characters", "none", "off", "on", "sentences", "words"],
|
||||
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[
|
||||
Literal["inherit", "plaintext-only", False, True],
|
||||
Var[Literal["inherit", "plaintext-only", False, True]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
context_menu: Optional[Union[Var[str], str]] = None,
|
||||
dir: Optional[Union[Var[str], str]] = None,
|
||||
draggable: Optional[Union[Var[bool], bool]] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"],
|
||||
Var[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"]
|
||||
],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
hidden: Optional[Union[Var[bool], bool]] = None,
|
||||
input_mode: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
item_prop: Optional[Union[Var[str], str]] = None,
|
||||
lang: Optional[Union[Var[str], str]] = None,
|
||||
role: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
slot: Optional[Union[Var[str], str]] = None,
|
||||
spell_check: Optional[Union[Var[bool], bool]] = None,
|
||||
tab_index: Optional[Union[Var[int], int]] = None,
|
||||
title: Optional[Union[Var[str], str]] = None,
|
||||
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
@ -488,211 +356,30 @@ class BackendDisabled(Div):
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
access_key: Optional[Union[Var[str], str]] = None,
|
||||
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[
|
||||
Literal["characters", "none", "off", "on", "sentences", "words"],
|
||||
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[
|
||||
Literal["inherit", "plaintext-only", False, True],
|
||||
Var[Literal["inherit", "plaintext-only", False, True]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
context_menu: Optional[Union[Var[str], str]] = None,
|
||||
dir: Optional[Union[Var[str], str]] = None,
|
||||
draggable: Optional[Union[Var[bool], bool]] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"],
|
||||
Var[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"]
|
||||
],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
hidden: Optional[Union[Var[bool], bool]] = None,
|
||||
input_mode: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
item_prop: Optional[Union[Var[str], str]] = None,
|
||||
lang: Optional[Union[Var[str], str]] = None,
|
||||
role: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
slot: Optional[Union[Var[str], str]] = None,
|
||||
spell_check: Optional[Union[Var[bool], bool]] = None,
|
||||
tab_index: Optional[Union[Var[int], int]] = None,
|
||||
title: Optional[Union[Var[str], str]] = None,
|
||||
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
|
@ -18,7 +18,7 @@ def set_breakpoints(values: Tuple[str, str, str, str, str]):
|
||||
breakpoints_values.extend(values)
|
||||
|
||||
|
||||
K = TypeVar("K", bound=str)
|
||||
K = TypeVar("K")
|
||||
V = TypeVar("V")
|
||||
|
||||
|
||||
|
@ -61,6 +61,14 @@ class Cond(MemoizationLeaf):
|
||||
)
|
||||
)
|
||||
|
||||
def _get_props_imports(self):
|
||||
"""Get the imports needed for component's props.
|
||||
|
||||
Returns:
|
||||
The imports for the component's props of the component.
|
||||
"""
|
||||
return []
|
||||
|
||||
def _render(self) -> Tag:
|
||||
return CondTag(
|
||||
cond=self.cond,
|
||||
|
@ -54,10 +54,9 @@ class Foreach(Component):
|
||||
TypeError: If the render function is a ComponentState.
|
||||
UntypedVarError: If the iterable is of type Any without a type annotation.
|
||||
"""
|
||||
from reflex.vars import ArrayVar, ObjectVar, StringVar
|
||||
|
||||
iterable = LiteralVar.create(iterable).guess_type()
|
||||
from reflex.vars.object import ObjectVar
|
||||
|
||||
iterable = LiteralVar.create(iterable)
|
||||
if iterable._var_type == Any:
|
||||
raise ForeachVarError(
|
||||
f"Could not foreach over var `{iterable!s}` of type Any. "
|
||||
@ -76,15 +75,6 @@ class Foreach(Component):
|
||||
if isinstance(iterable, ObjectVar):
|
||||
iterable = iterable.entries()
|
||||
|
||||
if isinstance(iterable, StringVar):
|
||||
iterable = iterable.split()
|
||||
|
||||
if not isinstance(iterable, ArrayVar):
|
||||
raise ForeachVarError(
|
||||
f"Could not foreach over var `{iterable!s}` of type {iterable._var_type}. "
|
||||
"See https://reflex.dev/docs/library/dynamic-rendering/foreach/"
|
||||
)
|
||||
|
||||
component = cls(
|
||||
iterable=iterable,
|
||||
render_fn=render_fn,
|
||||
|
@ -3,7 +3,7 @@
|
||||
# ------------------- DO NOT EDIT ----------------------
|
||||
# This file was generated by `reflex/utils/pyi_generator.py`!
|
||||
# ------------------------------------------------------
|
||||
from typing import Any, Dict, Literal, Optional, Union, overload
|
||||
from typing import Any, Dict, Optional, Union, overload
|
||||
|
||||
from reflex.components.el.elements.typography import Div
|
||||
from reflex.event import EventType
|
||||
@ -19,211 +19,30 @@ class Html(Div):
|
||||
dangerouslySetInnerHTML: Optional[
|
||||
Union[Dict[str, str], Var[Dict[str, str]]]
|
||||
] = None,
|
||||
access_key: Optional[Union[Var[str], str]] = None,
|
||||
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[
|
||||
Literal["characters", "none", "off", "on", "sentences", "words"],
|
||||
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[
|
||||
Literal["inherit", "plaintext-only", False, True],
|
||||
Var[Literal["inherit", "plaintext-only", False, True]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
context_menu: Optional[Union[Var[str], str]] = None,
|
||||
dir: Optional[Union[Var[str], str]] = None,
|
||||
draggable: Optional[Union[Var[bool], bool]] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"],
|
||||
Var[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"]
|
||||
],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
hidden: Optional[Union[Var[bool], bool]] = None,
|
||||
input_mode: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
item_prop: Optional[Union[Var[str], str]] = None,
|
||||
lang: Optional[Union[Var[str], str]] = None,
|
||||
role: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
slot: Optional[Union[Var[str], str]] = None,
|
||||
spell_check: Optional[Union[Var[bool], bool]] = None,
|
||||
tab_index: Optional[Union[Var[int], int]] = None,
|
||||
title: Optional[Union[Var[str], str]] = None,
|
||||
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
|
@ -178,9 +178,9 @@ class Match(MemoizationLeaf):
|
||||
first_case_return = match_cases[0][-1]
|
||||
return_type = type(first_case_return)
|
||||
|
||||
if isinstance(first_case_return, BaseComponent):
|
||||
if types._isinstance(first_case_return, BaseComponent):
|
||||
return_type = BaseComponent
|
||||
elif isinstance(first_case_return, Var):
|
||||
elif types._isinstance(first_case_return, Var):
|
||||
return_type = Var
|
||||
|
||||
for index, case in enumerate(match_cases):
|
||||
@ -228,8 +228,8 @@ class Match(MemoizationLeaf):
|
||||
|
||||
# Validate the match cases (as well as the default case) to have Var return types.
|
||||
if any(
|
||||
case for case in match_cases if not isinstance(case[-1], Var)
|
||||
) or not isinstance(default, Var):
|
||||
case for case in match_cases if not types._isinstance(case[-1], Var)
|
||||
) or not types._isinstance(default, Var):
|
||||
raise ValueError("Return types of match cases should be Vars.")
|
||||
|
||||
return Var(
|
||||
|
@ -2,12 +2,14 @@
|
||||
|
||||
from reflex.components.component import ComponentNamespace
|
||||
from reflex.components.core.colors import color
|
||||
from reflex.components.core.cond import color_mode_cond
|
||||
from reflex.components.core.responsive import desktop_only
|
||||
from reflex.components.core.cond import color_mode_cond, cond
|
||||
from reflex.components.core.responsive import tablet_and_desktop
|
||||
from reflex.components.el.elements.inline import A
|
||||
from reflex.components.el.elements.media import Path, Rect, Svg
|
||||
from reflex.components.radix.themes.typography.text import Text
|
||||
from reflex.experimental.client_state import ClientStateVar
|
||||
from reflex.style import Style
|
||||
from reflex.vars.base import Var, VarData
|
||||
|
||||
|
||||
class StickyLogo(Svg):
|
||||
@ -85,7 +87,7 @@ class StickyBadge(A):
|
||||
"""
|
||||
return super().create(
|
||||
StickyLogo.create(),
|
||||
desktop_only(StickyLabel.create()),
|
||||
tablet_and_desktop(StickyLabel.create()),
|
||||
href="https://reflex.dev",
|
||||
target="_blank",
|
||||
width="auto",
|
||||
@ -100,12 +102,36 @@ class StickyBadge(A):
|
||||
Returns:
|
||||
The style of the component.
|
||||
"""
|
||||
is_localhost_cs = ClientStateVar.create(
|
||||
"is_localhost",
|
||||
default=True,
|
||||
global_ref=False,
|
||||
)
|
||||
localhost_hostnames = Var.create(
|
||||
["localhost", "127.0.0.1", "[::1]"]
|
||||
).guess_type()
|
||||
is_localhost_expr = localhost_hostnames.contains(
|
||||
Var("window.location.hostname", _var_type=str).guess_type(),
|
||||
)
|
||||
check_is_localhost = Var(
|
||||
f"useEffect(({is_localhost_cs}) => {is_localhost_cs.set}({is_localhost_expr}), [])",
|
||||
_var_data=VarData(
|
||||
imports={"react": "useEffect"},
|
||||
),
|
||||
)
|
||||
is_localhost = is_localhost_cs.value._replace(
|
||||
merge_var_data=VarData.merge(
|
||||
check_is_localhost._get_all_var_data(),
|
||||
VarData(hooks={str(check_is_localhost): None}),
|
||||
),
|
||||
)
|
||||
return Style(
|
||||
{
|
||||
"position": "fixed",
|
||||
"bottom": "1rem",
|
||||
"right": "1rem",
|
||||
"display": "flex",
|
||||
# Do not show the badge on localhost.
|
||||
"display": cond(is_localhost, "none", "flex"),
|
||||
"flex-direction": "row",
|
||||
"gap": "0.375rem",
|
||||
"align-items": "center",
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -29,7 +29,7 @@ from reflex.event import (
|
||||
from reflex.utils import format
|
||||
from reflex.utils.imports import ImportVar
|
||||
from reflex.vars import VarData
|
||||
from reflex.vars.base import Var, get_unique_variable_name
|
||||
from reflex.vars.base import CallableVar, Var, get_unique_variable_name
|
||||
from reflex.vars.sequence import LiteralStringVar
|
||||
|
||||
DEFAULT_UPLOAD_ID: str = "default"
|
||||
@ -45,6 +45,7 @@ upload_files_context_var_data: VarData = VarData(
|
||||
)
|
||||
|
||||
|
||||
@CallableVar
|
||||
def upload_file(id_: str = DEFAULT_UPLOAD_ID) -> Var:
|
||||
"""Get the file upload drop trigger.
|
||||
|
||||
@ -74,6 +75,7 @@ def upload_file(id_: str = DEFAULT_UPLOAD_ID) -> Var:
|
||||
)
|
||||
|
||||
|
||||
@CallableVar
|
||||
def selected_files(id_: str = DEFAULT_UPLOAD_ID) -> Var:
|
||||
"""Get the list of selected files.
|
||||
|
||||
@ -147,7 +149,7 @@ uploaded_files_url_prefix = Var(
|
||||
).to(str)
|
||||
|
||||
|
||||
def get_upload_url(file_path: str | Var[str]) -> Var[str]:
|
||||
def get_upload_url(file_path: str) -> Var[str]:
|
||||
"""Get the URL of an uploaded file.
|
||||
|
||||
Args:
|
||||
@ -158,7 +160,7 @@ def get_upload_url(file_path: str | Var[str]) -> Var[str]:
|
||||
"""
|
||||
Upload.is_used = True
|
||||
|
||||
return Var.create(f"{uploaded_files_url_prefix}/{file_path}")
|
||||
return uploaded_files_url_prefix + "/" + file_path
|
||||
|
||||
|
||||
def _on_drop_spec(files: Var) -> Tuple[Var[Any]]:
|
||||
|
@ -13,12 +13,14 @@ from reflex.event import CallableEventSpec, EventSpec, EventType
|
||||
from reflex.style import Style
|
||||
from reflex.utils.imports import ImportVar
|
||||
from reflex.vars import VarData
|
||||
from reflex.vars.base import Var
|
||||
from reflex.vars.base import CallableVar, Var
|
||||
|
||||
DEFAULT_UPLOAD_ID: str
|
||||
upload_files_context_var_data: VarData
|
||||
|
||||
@CallableVar
|
||||
def upload_file(id_: str = DEFAULT_UPLOAD_ID) -> Var: ...
|
||||
@CallableVar
|
||||
def selected_files(id_: str = DEFAULT_UPLOAD_ID) -> Var: ...
|
||||
@CallableEventSpec
|
||||
def clear_selected_files(id_: str = DEFAULT_UPLOAD_ID) -> EventSpec: ...
|
||||
@ -35,7 +37,7 @@ uploaded_files_url_prefix = Var(
|
||||
),
|
||||
).to(str)
|
||||
|
||||
def get_upload_url(file_path: str | Var[str]) -> Var[str]: ...
|
||||
def get_upload_url(file_path: str) -> Var[str]: ...
|
||||
|
||||
class UploadFilesProvider(Component):
|
||||
@overload
|
||||
|
@ -3,7 +3,6 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import dataclasses
|
||||
import typing
|
||||
from typing import ClassVar, Dict, Literal, Optional, Union
|
||||
|
||||
from reflex.components.component import Component, ComponentNamespace
|
||||
@ -504,7 +503,7 @@ class CodeBlock(Component, MarkdownComponentMap):
|
||||
return ["can_copy", "copy_button"]
|
||||
|
||||
@classmethod
|
||||
def _get_language_registration_hook(cls, language_var: Var = _LANGUAGE) -> Var:
|
||||
def _get_language_registration_hook(cls, language_var: Var = _LANGUAGE) -> str:
|
||||
"""Get the hook to register the language.
|
||||
|
||||
Args:
|
||||
@ -515,46 +514,21 @@ class CodeBlock(Component, MarkdownComponentMap):
|
||||
Returns:
|
||||
The hook to register the language.
|
||||
"""
|
||||
language_in_there = Var.create(typing.get_args(LiteralCodeLanguage)).contains(
|
||||
language_var
|
||||
)
|
||||
async_load = f"""
|
||||
(async () => {{
|
||||
try {{
|
||||
return f"""
|
||||
if ({language_var!s}) {{
|
||||
(async () => {{
|
||||
try {{
|
||||
const module = await import(`react-syntax-highlighter/dist/cjs/languages/prism/${{{language_var!s}}}`);
|
||||
SyntaxHighlighter.registerLanguage({language_var!s}, module.default);
|
||||
}} catch (error) {{
|
||||
console.error(`Language ${{{language_var!s}}} is not supported for code blocks inside of markdown: `, error);
|
||||
}}
|
||||
}})();
|
||||
"""
|
||||
return Var(
|
||||
f"""
|
||||
if ({language_var!s}) {{
|
||||
if (!{language_in_there!s}) {{
|
||||
console.warn(`Language \\`${{{language_var!s}}}\\` is not supported for code blocks inside of markdown.`);
|
||||
{language_var!s} = '';
|
||||
}} else {{
|
||||
{async_load!s}
|
||||
}}
|
||||
}} catch (error) {{
|
||||
console.error(`Error importing language module for ${{{language_var!s}}}:`, error);
|
||||
}}
|
||||
}})();
|
||||
}}
|
||||
"""
|
||||
if not isinstance(language_var, LiteralVar)
|
||||
else f"""
|
||||
if ({language_var!s}) {{
|
||||
{async_load!s}
|
||||
}}""",
|
||||
_var_data=VarData(
|
||||
imports={
|
||||
cls.__fields__["library"].default: [
|
||||
ImportVar(tag="PrismAsyncLight", alias="SyntaxHighlighter")
|
||||
]
|
||||
},
|
||||
),
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def get_component_map_custom_code(cls) -> Var:
|
||||
def get_component_map_custom_code(cls) -> str:
|
||||
"""Get the custom code for the component.
|
||||
|
||||
Returns:
|
||||
|
@ -984,7 +984,7 @@ class CodeBlock(Component, MarkdownComponentMap):
|
||||
|
||||
def add_style(self): ...
|
||||
@classmethod
|
||||
def get_component_map_custom_code(cls) -> Var: ...
|
||||
def get_component_map_custom_code(cls) -> str: ...
|
||||
def add_hooks(self) -> list[str | Var]: ...
|
||||
|
||||
class CodeblockNamespace(ComponentNamespace):
|
||||
|
@ -3,7 +3,9 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from enum import Enum
|
||||
from typing import Any, Dict, List, Literal, Optional, Tuple, TypedDict, Union
|
||||
from typing import Any, Dict, List, Literal, Optional, Tuple, Union
|
||||
|
||||
from typing_extensions import TypedDict
|
||||
|
||||
from reflex.base import Base
|
||||
from reflex.components.component import Component, NoSSRComponent
|
||||
|
@ -4,7 +4,9 @@
|
||||
# This file was generated by `reflex/utils/pyi_generator.py`!
|
||||
# ------------------------------------------------------
|
||||
from enum import Enum
|
||||
from typing import Any, Dict, List, Literal, Optional, TypedDict, Union, overload
|
||||
from typing import Any, Dict, List, Literal, Optional, Union, overload
|
||||
|
||||
from typing_extensions import TypedDict
|
||||
|
||||
from reflex.base import Base
|
||||
from reflex.components.component import NoSSRComponent
|
||||
|
@ -1,136 +1,58 @@
|
||||
"""Base classes."""
|
||||
|
||||
from typing import Literal
|
||||
from typing import Union
|
||||
|
||||
from reflex.components.el.element import Element
|
||||
from reflex.vars.base import Var
|
||||
|
||||
AutoCapitalize = Literal["off", "none", "on", "sentences", "words", "characters"]
|
||||
ContentEditable = Literal[True, False, "inherit", "plaintext-only"]
|
||||
EnterKeyHint = Literal["enter", "done", "go", "next", "previous", "search", "send"]
|
||||
InputMode = Literal[
|
||||
"none", "text", "tel", "url", "email", "numeric", "decimal", "search", "search"
|
||||
]
|
||||
AriaRole = Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
]
|
||||
|
||||
|
||||
class BaseHTML(Element):
|
||||
"""Base class for common attributes."""
|
||||
|
||||
# Provides a hint for generating a keyboard shortcut for the current element.
|
||||
access_key: Var[str]
|
||||
access_key: Var[Union[str, int, bool]]
|
||||
|
||||
# Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
||||
auto_capitalize: Var[AutoCapitalize]
|
||||
auto_capitalize: Var[Union[str, int, bool]]
|
||||
|
||||
# Indicates whether the element's content is editable.
|
||||
content_editable: Var[ContentEditable]
|
||||
content_editable: Var[Union[str, int, bool]]
|
||||
|
||||
# Defines the ID of a <menu> element which will serve as the element's context menu.
|
||||
context_menu: Var[str]
|
||||
context_menu: Var[Union[str, int, bool]]
|
||||
|
||||
# Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)
|
||||
dir: Var[str]
|
||||
dir: Var[Union[str, int, bool]]
|
||||
|
||||
# Defines whether the element can be dragged.
|
||||
draggable: Var[bool]
|
||||
draggable: Var[Union[str, int, bool]]
|
||||
|
||||
# Hints what media types the media element is able to play.
|
||||
enter_key_hint: Var[EnterKeyHint]
|
||||
enter_key_hint: Var[Union[str, int, bool]]
|
||||
|
||||
# Defines whether the element is hidden.
|
||||
hidden: Var[bool]
|
||||
hidden: Var[Union[str, int, bool]]
|
||||
|
||||
# Defines the type of the element.
|
||||
input_mode: Var[InputMode]
|
||||
input_mode: Var[Union[str, int, bool]]
|
||||
|
||||
# Defines the name of the element for metadata purposes.
|
||||
item_prop: Var[str]
|
||||
item_prop: Var[Union[str, int, bool]]
|
||||
|
||||
# Defines the language used in the element.
|
||||
lang: Var[str]
|
||||
lang: Var[Union[str, int, bool]]
|
||||
|
||||
# Defines the role of the element.
|
||||
role: Var[AriaRole]
|
||||
role: Var[Union[str, int, bool]]
|
||||
|
||||
# Assigns a slot in a shadow DOM shadow tree to an element.
|
||||
slot: Var[str]
|
||||
slot: Var[Union[str, int, bool]]
|
||||
|
||||
# Defines whether the element may be checked for spelling errors.
|
||||
spell_check: Var[bool]
|
||||
spell_check: Var[Union[str, int, bool]]
|
||||
|
||||
# Defines the position of the current element in the tabbing order.
|
||||
tab_index: Var[int]
|
||||
tab_index: Var[Union[str, int, bool]]
|
||||
|
||||
# Defines a tooltip for the element.
|
||||
title: Var[str]
|
||||
title: Var[Union[str, int, bool]]
|
||||
|
@ -3,302 +3,43 @@
|
||||
# ------------------- DO NOT EDIT ----------------------
|
||||
# This file was generated by `reflex/utils/pyi_generator.py`!
|
||||
# ------------------------------------------------------
|
||||
from typing import Any, Dict, Literal, Optional, Union, overload
|
||||
from typing import Any, Dict, Optional, Union, overload
|
||||
|
||||
from reflex.components.el.element import Element
|
||||
from reflex.event import EventType
|
||||
from reflex.style import Style
|
||||
from reflex.vars.base import Var
|
||||
|
||||
AutoCapitalize = Literal["off", "none", "on", "sentences", "words", "characters"]
|
||||
ContentEditable = Literal[True, False, "inherit", "plaintext-only"]
|
||||
EnterKeyHint = Literal["enter", "done", "go", "next", "previous", "search", "send"]
|
||||
InputMode = Literal[
|
||||
"none", "text", "tel", "url", "email", "numeric", "decimal", "search", "search"
|
||||
]
|
||||
AriaRole = Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
]
|
||||
|
||||
class BaseHTML(Element):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
access_key: Optional[Union[Var[str], str]] = None,
|
||||
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[
|
||||
Literal["characters", "none", "off", "on", "sentences", "words"],
|
||||
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[
|
||||
Literal["inherit", "plaintext-only", False, True],
|
||||
Var[Literal["inherit", "plaintext-only", False, True]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
context_menu: Optional[Union[Var[str], str]] = None,
|
||||
dir: Optional[Union[Var[str], str]] = None,
|
||||
draggable: Optional[Union[Var[bool], bool]] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"],
|
||||
Var[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"]
|
||||
],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
hidden: Optional[Union[Var[bool], bool]] = None,
|
||||
input_mode: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
item_prop: Optional[Union[Var[str], str]] = None,
|
||||
lang: Optional[Union[Var[str], str]] = None,
|
||||
role: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
slot: Optional[Union[Var[str], str]] = None,
|
||||
spell_check: Optional[Union[Var[bool], bool]] = None,
|
||||
tab_index: Optional[Union[Var[int], int]] = None,
|
||||
title: Optional[Union[Var[str], str]] = None,
|
||||
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
|
@ -3,7 +3,7 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from hashlib import md5
|
||||
from typing import Any, Dict, Iterator, Literal, Set, Tuple, Union
|
||||
from typing import Any, Dict, Iterator, Set, Tuple, Union
|
||||
|
||||
from jinja2 import Environment
|
||||
|
||||
@ -41,8 +41,6 @@ HANDLE_SUBMIT_JS_JINJA2 = Environment().from_string(
|
||||
"""
|
||||
)
|
||||
|
||||
ButtonType = Literal["submit", "reset", "button"]
|
||||
|
||||
|
||||
class Button(BaseHTML):
|
||||
"""Display the button element."""
|
||||
@ -50,37 +48,37 @@ class Button(BaseHTML):
|
||||
tag = "button"
|
||||
|
||||
# Automatically focuses the button when the page loads
|
||||
auto_focus: Var[bool]
|
||||
auto_focus: Var[Union[str, int, bool]]
|
||||
|
||||
# Disables the button
|
||||
disabled: Var[bool]
|
||||
|
||||
# Associates the button with a form (by id)
|
||||
form: Var[str]
|
||||
form: Var[Union[str, int, bool]]
|
||||
|
||||
# URL to send the form data to (for type="submit" buttons)
|
||||
form_action: Var[str]
|
||||
form_action: Var[Union[str, int, bool]]
|
||||
|
||||
# How the form data should be encoded when submitting to the server (for type="submit" buttons)
|
||||
form_enc_type: Var[str]
|
||||
form_enc_type: Var[Union[str, int, bool]]
|
||||
|
||||
# HTTP method to use for sending form data (for type="submit" buttons)
|
||||
form_method: Var[str]
|
||||
form_method: Var[Union[str, int, bool]]
|
||||
|
||||
# Bypasses form validation when submitting (for type="submit" buttons)
|
||||
form_no_validate: Var[bool]
|
||||
form_no_validate: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies where to display the response after submitting the form (for type="submit" buttons)
|
||||
form_target: Var[str]
|
||||
form_target: Var[Union[str, int, bool]]
|
||||
|
||||
# Name of the button, used when sending form data
|
||||
name: Var[str]
|
||||
name: Var[Union[str, int, bool]]
|
||||
|
||||
# Type of the button (submit, reset, or button)
|
||||
type: Var[ButtonType]
|
||||
type: Var[Union[str, int, bool]]
|
||||
|
||||
# Value of the button, used when sending form data
|
||||
value: Var[Union[str, int, float]]
|
||||
value: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Datalist(BaseHTML):
|
||||
@ -95,13 +93,13 @@ class Fieldset(Element):
|
||||
tag = "fieldset"
|
||||
|
||||
# Disables all the form control descendants of the fieldset
|
||||
disabled: Var[bool]
|
||||
disabled: Var[Union[str, int, bool]]
|
||||
|
||||
# Associates the fieldset with a form (by id)
|
||||
form: Var[str]
|
||||
form: Var[Union[str, int, bool]]
|
||||
|
||||
# Name of the fieldset, used for scripting
|
||||
name: Var[str]
|
||||
name: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
def on_submit_event_spec() -> Tuple[Var[dict[str, Any]]]:
|
||||
@ -128,31 +126,31 @@ class Form(BaseHTML):
|
||||
tag = "form"
|
||||
|
||||
# MIME types the server accepts for file upload
|
||||
accept: Var[str]
|
||||
accept: Var[Union[str, int, bool]]
|
||||
|
||||
# Character encodings to be used for form submission
|
||||
accept_charset: Var[str]
|
||||
accept_charset: Var[Union[str, int, bool]]
|
||||
|
||||
# URL where the form's data should be submitted
|
||||
action: Var[str]
|
||||
action: Var[Union[str, int, bool]]
|
||||
|
||||
# Whether the form should have autocomplete enabled
|
||||
auto_complete: Var[str]
|
||||
auto_complete: Var[Union[str, int, bool]]
|
||||
|
||||
# Encoding type for the form data when submitted
|
||||
enc_type: Var[str]
|
||||
enc_type: Var[Union[str, int, bool]]
|
||||
|
||||
# HTTP method to use for form submission
|
||||
method: Var[str]
|
||||
method: Var[Union[str, int, bool]]
|
||||
|
||||
# Name of the form
|
||||
name: Var[str]
|
||||
name: Var[Union[str, int, bool]]
|
||||
|
||||
# Indicates that the form should not be validated on submit
|
||||
no_validate: Var[bool]
|
||||
no_validate: Var[Union[str, int, bool]]
|
||||
|
||||
# Where to display the response after submitting the form
|
||||
target: Var[str]
|
||||
target: Var[Union[str, int, bool]]
|
||||
|
||||
# If true, the form will be cleared after submit.
|
||||
reset_on_submit: Var[bool] = Var.create(False)
|
||||
@ -268,126 +266,106 @@ class Form(BaseHTML):
|
||||
]
|
||||
|
||||
|
||||
HTMLInputTypeAttribute = Literal[
|
||||
"button",
|
||||
"checkbox",
|
||||
"color",
|
||||
"date",
|
||||
"datetime-local",
|
||||
"email",
|
||||
"file",
|
||||
"hidden",
|
||||
"image",
|
||||
"month",
|
||||
"number",
|
||||
"password",
|
||||
"radio",
|
||||
"range",
|
||||
"reset",
|
||||
"search",
|
||||
"submit",
|
||||
"tel",
|
||||
"text",
|
||||
"time",
|
||||
"url",
|
||||
"week",
|
||||
]
|
||||
|
||||
|
||||
class Input(BaseHTML):
|
||||
"""Display the input element."""
|
||||
|
||||
tag = "input"
|
||||
|
||||
# Accepted types of files when the input is file type
|
||||
accept: Var[str]
|
||||
accept: Var[Union[str, int, bool]]
|
||||
|
||||
# Alternate text for input type="image"
|
||||
alt: Var[str]
|
||||
alt: Var[Union[str, int, bool]]
|
||||
|
||||
# Whether the input should have autocomplete enabled
|
||||
auto_complete: Var[str]
|
||||
auto_complete: Var[Union[str, int, bool]]
|
||||
|
||||
# Automatically focuses the input when the page loads
|
||||
auto_focus: Var[bool]
|
||||
auto_focus: Var[Union[str, int, bool]]
|
||||
|
||||
# Captures media from the user (camera or microphone)
|
||||
capture: Var[Literal[True, False, "user", "environment"]]
|
||||
capture: Var[Union[str, int, bool]]
|
||||
|
||||
# Indicates whether the input is checked (for checkboxes and radio buttons)
|
||||
checked: Var[bool]
|
||||
checked: Var[Union[str, int, bool]]
|
||||
|
||||
# The initial value (for checkboxes and radio buttons)
|
||||
default_checked: Var[bool]
|
||||
|
||||
# The initial value for a text field
|
||||
default_value: Var[Union[str, int, float]]
|
||||
default_value: Var[str]
|
||||
|
||||
# Name part of the input to submit in 'dir' and 'name' pair when form is submitted
|
||||
dirname: Var[Union[str, int, bool]]
|
||||
|
||||
# Disables the input
|
||||
disabled: Var[bool]
|
||||
disabled: Var[Union[str, int, bool]]
|
||||
|
||||
# Associates the input with a form (by id)
|
||||
form: Var[str]
|
||||
form: Var[Union[str, int, bool]]
|
||||
|
||||
# URL to send the form data to (for type="submit" buttons)
|
||||
form_action: Var[str]
|
||||
form_action: Var[Union[str, int, bool]]
|
||||
|
||||
# How the form data should be encoded when submitting to the server (for type="submit" buttons)
|
||||
form_enc_type: Var[str]
|
||||
form_enc_type: Var[Union[str, int, bool]]
|
||||
|
||||
# HTTP method to use for sending form data (for type="submit" buttons)
|
||||
form_method: Var[str]
|
||||
form_method: Var[Union[str, int, bool]]
|
||||
|
||||
# Bypasses form validation when submitting (for type="submit" buttons)
|
||||
form_no_validate: Var[bool]
|
||||
form_no_validate: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies where to display the response after submitting the form (for type="submit" buttons)
|
||||
form_target: Var[str]
|
||||
form_target: Var[Union[str, int, bool]]
|
||||
|
||||
# References a datalist for suggested options
|
||||
list: Var[str]
|
||||
list: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies the maximum value for the input
|
||||
max: Var[Union[str, int, float]]
|
||||
max: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies the maximum number of characters allowed in the input
|
||||
max_length: Var[Union[int, float]]
|
||||
max_length: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies the minimum number of characters required in the input
|
||||
min_length: Var[Union[int, float]]
|
||||
min_length: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies the minimum value for the input
|
||||
min: Var[Union[str, int, float]]
|
||||
min: Var[Union[str, int, bool]]
|
||||
|
||||
# Indicates whether multiple values can be entered in an input of the type email or file
|
||||
multiple: Var[bool]
|
||||
multiple: Var[Union[str, int, bool]]
|
||||
|
||||
# Name of the input, used when sending form data
|
||||
name: Var[str]
|
||||
name: Var[Union[str, int, bool]]
|
||||
|
||||
# Regex pattern the input's value must match to be valid
|
||||
pattern: Var[str]
|
||||
pattern: Var[Union[str, int, bool]]
|
||||
|
||||
# Placeholder text in the input
|
||||
placeholder: Var[str]
|
||||
placeholder: Var[Union[str, int, bool]]
|
||||
|
||||
# Indicates whether the input is read-only
|
||||
read_only: Var[bool]
|
||||
read_only: Var[Union[str, int, bool]]
|
||||
|
||||
# Indicates that the input is required
|
||||
required: Var[bool]
|
||||
required: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies the visible width of a text control
|
||||
size: Var[Union[int, float]]
|
||||
size: Var[Union[str, int, bool]]
|
||||
|
||||
# URL for image inputs
|
||||
src: Var[str]
|
||||
src: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies the legal number intervals for an input
|
||||
step: Var[Union[str, int, float]]
|
||||
step: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies the type of input
|
||||
type: Var[HTMLInputTypeAttribute]
|
||||
type: Var[Union[str, int, bool]]
|
||||
|
||||
# Name of the image map used with the input
|
||||
use_map: Var[Union[str, int, bool]]
|
||||
|
||||
# Value of the input
|
||||
value: Var[Union[str, int, float]]
|
||||
@ -441,10 +419,10 @@ class Label(BaseHTML):
|
||||
tag = "label"
|
||||
|
||||
# ID of a form control with which the label is associated
|
||||
html_for: Var[str]
|
||||
html_for: Var[Union[str, int, bool]]
|
||||
|
||||
# Associates the label with a form (by id)
|
||||
form: Var[str]
|
||||
form: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Legend(BaseHTML):
|
||||
@ -459,25 +437,25 @@ class Meter(BaseHTML):
|
||||
tag = "meter"
|
||||
|
||||
# Associates the meter with a form (by id)
|
||||
form: Var[str]
|
||||
form: Var[Union[str, int, bool]]
|
||||
|
||||
# High limit of range (above this is considered high value)
|
||||
high: Var[Union[int, float]]
|
||||
high: Var[Union[str, int, bool]]
|
||||
|
||||
# Low limit of range (below this is considered low value)
|
||||
low: Var[Union[int, float]]
|
||||
low: Var[Union[str, int, bool]]
|
||||
|
||||
# Maximum value of the range
|
||||
max: Var[Union[int, float]]
|
||||
max: Var[Union[str, int, bool]]
|
||||
|
||||
# Minimum value of the range
|
||||
min: Var[Union[int, float]]
|
||||
min: Var[Union[str, int, bool]]
|
||||
|
||||
# Optimum value in the range
|
||||
optimum: Var[Union[int, float]]
|
||||
optimum: Var[Union[str, int, bool]]
|
||||
|
||||
# Current value of the meter
|
||||
value: Var[Union[int, float]]
|
||||
value: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Optgroup(BaseHTML):
|
||||
@ -486,10 +464,10 @@ class Optgroup(BaseHTML):
|
||||
tag = "optgroup"
|
||||
|
||||
# Disables the optgroup
|
||||
disabled: Var[bool]
|
||||
disabled: Var[Union[str, int, bool]]
|
||||
|
||||
# Label for the optgroup
|
||||
label: Var[str]
|
||||
label: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Option(BaseHTML):
|
||||
@ -498,16 +476,16 @@ class Option(BaseHTML):
|
||||
tag = "option"
|
||||
|
||||
# Disables the option
|
||||
disabled: Var[bool]
|
||||
disabled: Var[Union[str, int, bool]]
|
||||
|
||||
# Label for the option, if the text is not the label
|
||||
label: Var[str]
|
||||
label: Var[Union[str, int, bool]]
|
||||
|
||||
# Indicates that the option is initially selected
|
||||
selected: Var[bool]
|
||||
selected: Var[Union[str, int, bool]]
|
||||
|
||||
# Value to be sent as form data
|
||||
value: Var[Union[str, int, float]]
|
||||
value: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Output(BaseHTML):
|
||||
@ -516,13 +494,13 @@ class Output(BaseHTML):
|
||||
tag = "output"
|
||||
|
||||
# Associates the output with one or more elements (by their IDs)
|
||||
html_for: Var[str]
|
||||
html_for: Var[Union[str, int, bool]]
|
||||
|
||||
# Associates the output with a form (by id)
|
||||
form: Var[str]
|
||||
form: Var[Union[str, int, bool]]
|
||||
|
||||
# Name of the output element for form submission
|
||||
name: Var[str]
|
||||
name: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Progress(BaseHTML):
|
||||
@ -531,13 +509,13 @@ class Progress(BaseHTML):
|
||||
tag = "progress"
|
||||
|
||||
# Associates the progress element with a form (by id)
|
||||
form: Var[str]
|
||||
form: Var[Union[str, int, bool]]
|
||||
|
||||
# Maximum value of the progress indicator
|
||||
max: Var[Union[str, int, float]]
|
||||
max: Var[Union[str, int, bool]]
|
||||
|
||||
# Current value of the progress indicator
|
||||
value: Var[Union[str, int, float]]
|
||||
value: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Select(BaseHTML):
|
||||
@ -546,28 +524,28 @@ class Select(BaseHTML):
|
||||
tag = "select"
|
||||
|
||||
# Whether the form control should have autocomplete enabled
|
||||
auto_complete: Var[str]
|
||||
auto_complete: Var[Union[str, int, bool]]
|
||||
|
||||
# Automatically focuses the select when the page loads
|
||||
auto_focus: Var[bool]
|
||||
auto_focus: Var[Union[str, int, bool]]
|
||||
|
||||
# Disables the select control
|
||||
disabled: Var[bool]
|
||||
disabled: Var[Union[str, int, bool]]
|
||||
|
||||
# Associates the select with a form (by id)
|
||||
form: Var[str]
|
||||
form: Var[Union[str, int, bool]]
|
||||
|
||||
# Indicates that multiple options can be selected
|
||||
multiple: Var[bool]
|
||||
multiple: Var[Union[str, int, bool]]
|
||||
|
||||
# Name of the select, used when submitting the form
|
||||
name: Var[str]
|
||||
name: Var[Union[str, int, bool]]
|
||||
|
||||
# Indicates that the select control must have a selected option
|
||||
required: Var[bool]
|
||||
required: Var[Union[str, int, bool]]
|
||||
|
||||
# Number of visible options in a drop-down list
|
||||
size: Var[int]
|
||||
size: Var[Union[str, int, bool]]
|
||||
|
||||
# Fired when the select value changes
|
||||
on_change: EventHandler[input_event]
|
||||
@ -609,58 +587,58 @@ class Textarea(BaseHTML):
|
||||
tag = "textarea"
|
||||
|
||||
# Whether the form control should have autocomplete enabled
|
||||
auto_complete: Var[str]
|
||||
auto_complete: Var[Union[str, int, bool]]
|
||||
|
||||
# Automatically focuses the textarea when the page loads
|
||||
auto_focus: Var[bool]
|
||||
auto_focus: Var[Union[str, int, bool]]
|
||||
|
||||
# Automatically fit the content height to the text (use min-height with this prop)
|
||||
auto_height: Var[bool]
|
||||
|
||||
# Visible width of the text control, in average character widths
|
||||
cols: Var[int]
|
||||
cols: Var[Union[str, int, bool]]
|
||||
|
||||
# The default value of the textarea when initially rendered
|
||||
default_value: Var[str]
|
||||
|
||||
# Name part of the textarea to submit in 'dir' and 'name' pair when form is submitted
|
||||
dirname: Var[str]
|
||||
dirname: Var[Union[str, int, bool]]
|
||||
|
||||
# Disables the textarea
|
||||
disabled: Var[bool]
|
||||
disabled: Var[Union[str, int, bool]]
|
||||
|
||||
# Enter key submits form (shift-enter adds new line)
|
||||
enter_key_submit: Var[bool]
|
||||
|
||||
# Associates the textarea with a form (by id)
|
||||
form: Var[str]
|
||||
form: Var[Union[str, int, bool]]
|
||||
|
||||
# Maximum number of characters allowed in the textarea
|
||||
max_length: Var[int]
|
||||
max_length: Var[Union[str, int, bool]]
|
||||
|
||||
# Minimum number of characters required in the textarea
|
||||
min_length: Var[int]
|
||||
min_length: Var[Union[str, int, bool]]
|
||||
|
||||
# Name of the textarea, used when submitting the form
|
||||
name: Var[str]
|
||||
name: Var[Union[str, int, bool]]
|
||||
|
||||
# Placeholder text in the textarea
|
||||
placeholder: Var[str]
|
||||
placeholder: Var[Union[str, int, bool]]
|
||||
|
||||
# Indicates whether the textarea is read-only
|
||||
read_only: Var[bool]
|
||||
read_only: Var[Union[str, int, bool]]
|
||||
|
||||
# Indicates that the textarea is required
|
||||
required: Var[bool]
|
||||
required: Var[Union[str, int, bool]]
|
||||
|
||||
# Visible number of lines in the text control
|
||||
rows: Var[int]
|
||||
rows: Var[Union[str, int, bool]]
|
||||
|
||||
# The controlled value of the textarea, read only unless used with on_change
|
||||
value: Var[str]
|
||||
value: Var[Union[str, int, bool]]
|
||||
|
||||
# How the text in the textarea is to be wrapped when submitting the form
|
||||
wrap: Var[str]
|
||||
wrap: Var[Union[str, int, bool]]
|
||||
|
||||
# Fired when the input value changes
|
||||
on_change: EventHandler[input_event]
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,23 +1,11 @@
|
||||
"""Inline classes."""
|
||||
|
||||
from typing import Literal, Union
|
||||
from typing import Union
|
||||
|
||||
from reflex.vars.base import Var
|
||||
|
||||
from .base import BaseHTML
|
||||
|
||||
ReferrerPolicy = Literal[
|
||||
"",
|
||||
"no-referrer",
|
||||
"no-referrer-when-downgrade",
|
||||
"origin",
|
||||
"origin-when-cross-origin",
|
||||
"same-origin",
|
||||
"strict-origin",
|
||||
"strict-origin-when-cross-origin",
|
||||
"unsafe-url",
|
||||
]
|
||||
|
||||
|
||||
class A(BaseHTML): # Inherits common attributes from BaseMeta
|
||||
"""Display the 'a' element."""
|
||||
@ -25,28 +13,31 @@ class A(BaseHTML): # Inherits common attributes from BaseMeta
|
||||
tag = "a"
|
||||
|
||||
# Specifies that the target (the file specified in the href attribute) will be downloaded when a user clicks on the hyperlink.
|
||||
download: Var[Union[str, bool]]
|
||||
download: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies the URL of the page the link goes to
|
||||
href: Var[str]
|
||||
href: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies the language of the linked document
|
||||
href_lang: Var[str]
|
||||
href_lang: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies what media/device the linked document is optimized for
|
||||
media: Var[str]
|
||||
media: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies which referrer is sent when fetching the resource
|
||||
ping: Var[str]
|
||||
ping: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies the relationship between the current document and the linked document
|
||||
referrer_policy: Var[ReferrerPolicy]
|
||||
referrer_policy: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies the relationship between the linked document and the current document
|
||||
rel: Var[str]
|
||||
rel: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies the shape of the area
|
||||
shape: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies where to open the linked document
|
||||
target: Var[Union[str, Literal["_self", "_blank", "_parent", "_top"]]]
|
||||
target: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Abbr(BaseHTML):
|
||||
@ -97,7 +88,7 @@ class Data(BaseHTML):
|
||||
tag = "data"
|
||||
|
||||
# Specifies the machine-readable translation of the data element.
|
||||
value: Var[Union[str, int, float]]
|
||||
value: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Dfn(BaseHTML):
|
||||
@ -136,7 +127,7 @@ class Q(BaseHTML):
|
||||
tag = "q"
|
||||
|
||||
# Specifies the source URL of the quote.
|
||||
cite: Var[str]
|
||||
cite: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Rp(BaseHTML):
|
||||
@ -205,7 +196,7 @@ class Time(BaseHTML):
|
||||
tag = "time"
|
||||
|
||||
# Specifies the date and/or time of the element.
|
||||
date_time: Var[str]
|
||||
date_time: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class U(BaseHTML):
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,9 +1,8 @@
|
||||
"""Media classes."""
|
||||
|
||||
from typing import Any, Literal, Union
|
||||
from typing import Any, Union
|
||||
|
||||
from reflex import Component, ComponentNamespace
|
||||
from reflex.components.el.elements.inline import ReferrerPolicy
|
||||
from reflex.constants.colors import Color
|
||||
from reflex.vars.base import Var
|
||||
|
||||
@ -16,37 +15,37 @@ class Area(BaseHTML):
|
||||
tag = "area"
|
||||
|
||||
# Alternate text for the area, used for accessibility
|
||||
alt: Var[str]
|
||||
alt: Var[Union[str, int, bool]]
|
||||
|
||||
# Coordinates to define the shape of the area
|
||||
coords: Var[str]
|
||||
coords: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies that the target will be downloaded when clicked
|
||||
download: Var[Union[str, bool]]
|
||||
download: Var[Union[str, int, bool]]
|
||||
|
||||
# Hyperlink reference for the area
|
||||
href: Var[str]
|
||||
href: Var[Union[str, int, bool]]
|
||||
|
||||
# Language of the linked resource
|
||||
href_lang: Var[str]
|
||||
href_lang: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies what media/device the linked resource is optimized for
|
||||
media: Var[str]
|
||||
media: Var[Union[str, int, bool]]
|
||||
|
||||
# A list of URLs to be notified if the user follows the hyperlink
|
||||
ping: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies which referrer information to send with the link
|
||||
referrer_policy: Var[ReferrerPolicy]
|
||||
referrer_policy: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies the relationship of the target object to the link object
|
||||
rel: Var[str]
|
||||
rel: Var[Union[str, int, bool]]
|
||||
|
||||
# Defines the shape of the area (rectangle, circle, polygon)
|
||||
shape: Var[str]
|
||||
shape: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies where to open the linked document
|
||||
target: Var[str]
|
||||
|
||||
|
||||
CrossOrigin = Literal["anonymous", "use-credentials", ""]
|
||||
target: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Audio(BaseHTML):
|
||||
@ -55,29 +54,28 @@ class Audio(BaseHTML):
|
||||
tag = "audio"
|
||||
|
||||
# Specifies that the audio will start playing as soon as it is ready
|
||||
auto_play: Var[bool]
|
||||
auto_play: Var[Union[str, int, bool]]
|
||||
|
||||
# Represents the time range of the buffered media
|
||||
buffered: Var[Union[str, int, bool]]
|
||||
|
||||
# Displays the standard audio controls
|
||||
controls: Var[bool]
|
||||
controls: Var[Union[str, int, bool]]
|
||||
|
||||
# Configures the CORS requests for the element
|
||||
cross_origin: Var[CrossOrigin]
|
||||
cross_origin: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies that the audio will loop
|
||||
loop: Var[bool]
|
||||
loop: Var[Union[str, int, bool]]
|
||||
|
||||
# Indicates whether the audio is muted by default
|
||||
muted: Var[bool]
|
||||
muted: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies how the audio file should be preloaded
|
||||
preload: Var[str]
|
||||
preload: Var[Union[str, int, bool]]
|
||||
|
||||
# URL of the audio to play
|
||||
src: Var[str]
|
||||
|
||||
|
||||
ImageDecoding = Literal["async", "auto", "sync"]
|
||||
ImageLoading = Literal["eager", "lazy"]
|
||||
src: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Img(BaseHTML):
|
||||
@ -85,32 +83,41 @@ class Img(BaseHTML):
|
||||
|
||||
tag = "img"
|
||||
|
||||
# Image alignment with respect to its surrounding elements
|
||||
align: Var[Union[str, int, bool]]
|
||||
|
||||
# Alternative text for the image
|
||||
alt: Var[str]
|
||||
alt: Var[Union[str, int, bool]]
|
||||
|
||||
# Configures the CORS requests for the image
|
||||
cross_origin: Var[CrossOrigin]
|
||||
cross_origin: Var[Union[str, int, bool]]
|
||||
|
||||
# How the image should be decoded
|
||||
decoding: Var[ImageDecoding]
|
||||
decoding: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies an intrinsic size for the image
|
||||
intrinsicsize: Var[Union[str, int, bool]]
|
||||
|
||||
# Whether the image is a server-side image map
|
||||
ismap: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies the loading behavior of the image
|
||||
loading: Var[ImageLoading]
|
||||
loading: Var[Union[str, int, bool]]
|
||||
|
||||
# Referrer policy for the image
|
||||
referrer_policy: Var[ReferrerPolicy]
|
||||
referrer_policy: Var[Union[str, int, bool]]
|
||||
|
||||
# Sizes of the image for different layouts
|
||||
sizes: Var[str]
|
||||
sizes: Var[Union[str, int, bool]]
|
||||
|
||||
# URL of the image to display
|
||||
src: Var[Any]
|
||||
|
||||
# A set of source sizes and URLs for responsive images
|
||||
src_set: Var[str]
|
||||
src_set: Var[Union[str, int, bool]]
|
||||
|
||||
# The name of the map to use with the image
|
||||
use_map: Var[str]
|
||||
use_map: Var[Union[str, int, bool]]
|
||||
|
||||
@classmethod
|
||||
def create(cls, *children, **props) -> Component:
|
||||
@ -136,7 +143,7 @@ class Map(BaseHTML):
|
||||
tag = "map"
|
||||
|
||||
# Name of the map, referenced by the 'usemap' attribute in 'img' and 'object' elements
|
||||
name: Var[str]
|
||||
name: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Track(BaseHTML):
|
||||
@ -145,19 +152,19 @@ class Track(BaseHTML):
|
||||
tag = "track"
|
||||
|
||||
# Indicates that the track should be enabled unless the user's preferences indicate otherwise
|
||||
default: Var[bool]
|
||||
default: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies the kind of text track
|
||||
kind: Var[str]
|
||||
kind: Var[Union[str, int, bool]]
|
||||
|
||||
# Title of the text track, used by the browser when listing available text tracks
|
||||
label: Var[str]
|
||||
label: Var[Union[str, int, bool]]
|
||||
|
||||
# URL of the track file
|
||||
src: Var[str]
|
||||
src: Var[Union[str, int, bool]]
|
||||
|
||||
# Language of the track text data
|
||||
src_lang: Var[str]
|
||||
src_lang: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Video(BaseHTML):
|
||||
@ -166,31 +173,34 @@ class Video(BaseHTML):
|
||||
tag = "video"
|
||||
|
||||
# Specifies that the video will start playing as soon as it is ready
|
||||
auto_play: Var[bool]
|
||||
auto_play: Var[Union[str, int, bool]]
|
||||
|
||||
# Represents the time range of the buffered media
|
||||
buffered: Var[Union[str, int, bool]]
|
||||
|
||||
# Displays the standard video controls
|
||||
controls: Var[bool]
|
||||
controls: Var[Union[str, int, bool]]
|
||||
|
||||
# Configures the CORS requests for the video
|
||||
cross_origin: Var[CrossOrigin]
|
||||
cross_origin: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies that the video will loop
|
||||
loop: Var[bool]
|
||||
loop: Var[Union[str, int, bool]]
|
||||
|
||||
# Indicates whether the video is muted by default
|
||||
muted: Var[bool]
|
||||
muted: Var[Union[str, int, bool]]
|
||||
|
||||
# Indicates that the video should play 'inline', inside its element's playback area
|
||||
plays_inline: Var[bool]
|
||||
plays_inline: Var[Union[str, int, bool]]
|
||||
|
||||
# URL of an image to show while the video is downloading, or until the user hits the play button
|
||||
poster: Var[str]
|
||||
poster: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies how the video file should be preloaded
|
||||
preload: Var[str]
|
||||
preload: Var[Union[str, int, bool]]
|
||||
|
||||
# URL of the video to play
|
||||
src: Var[str]
|
||||
src: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Embed(BaseHTML):
|
||||
@ -199,10 +209,10 @@ class Embed(BaseHTML):
|
||||
tag = "embed"
|
||||
|
||||
# URL of the embedded content
|
||||
src: Var[str]
|
||||
src: Var[Union[str, int, bool]]
|
||||
|
||||
# Media type of the embedded content
|
||||
type: Var[str]
|
||||
type: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Iframe(BaseHTML):
|
||||
@ -210,26 +220,32 @@ class Iframe(BaseHTML):
|
||||
|
||||
tag = "iframe"
|
||||
|
||||
# Alignment of the iframe within the page or surrounding elements
|
||||
align: Var[Union[str, int, bool]]
|
||||
|
||||
# Permissions policy for the iframe
|
||||
allow: Var[str]
|
||||
allow: Var[Union[str, int, bool]]
|
||||
|
||||
# Content Security Policy to apply to the iframe's content
|
||||
csp: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies the loading behavior of the iframe
|
||||
loading: Var[Literal["eager", "lazy"]]
|
||||
loading: Var[Union[str, int, bool]]
|
||||
|
||||
# Name of the iframe, used as a target for hyperlinks and forms
|
||||
name: Var[str]
|
||||
name: Var[Union[str, int, bool]]
|
||||
|
||||
# Referrer policy for the iframe
|
||||
referrer_policy: Var[ReferrerPolicy]
|
||||
referrer_policy: Var[Union[str, int, bool]]
|
||||
|
||||
# Security restrictions for the content in the iframe
|
||||
sandbox: Var[str]
|
||||
sandbox: Var[Union[str, int, bool]]
|
||||
|
||||
# URL of the document to display in the iframe
|
||||
src: Var[str]
|
||||
src: Var[Union[str, int, bool]]
|
||||
|
||||
# HTML content to embed directly within the iframe
|
||||
src_doc: Var[str]
|
||||
src_doc: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Object(BaseHTML):
|
||||
@ -238,19 +254,19 @@ class Object(BaseHTML):
|
||||
tag = "object"
|
||||
|
||||
# URL of the data to be used by the object
|
||||
data: Var[str]
|
||||
data: Var[Union[str, int, bool]]
|
||||
|
||||
# Associates the object with a form element
|
||||
form: Var[str]
|
||||
form: Var[Union[str, int, bool]]
|
||||
|
||||
# Name of the object, used for scripting or as a target for forms and links
|
||||
name: Var[str]
|
||||
name: Var[Union[str, int, bool]]
|
||||
|
||||
# Media type of the data specified in the data attribute
|
||||
type: Var[str]
|
||||
type: Var[Union[str, int, bool]]
|
||||
|
||||
# Name of an image map to use with the object
|
||||
use_map: Var[str]
|
||||
use_map: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Picture(BaseHTML):
|
||||
@ -271,19 +287,19 @@ class Source(BaseHTML):
|
||||
tag = "source"
|
||||
|
||||
# Media query indicating what device the linked resource is optimized for
|
||||
media: Var[str]
|
||||
media: Var[Union[str, int, bool]]
|
||||
|
||||
# Sizes of the source for different layouts
|
||||
sizes: Var[str]
|
||||
sizes: Var[Union[str, int, bool]]
|
||||
|
||||
# URL of the media file or an image for the element to use
|
||||
src: Var[str]
|
||||
src: Var[Union[str, int, bool]]
|
||||
|
||||
# A set of source sizes and URLs for responsive images
|
||||
src_set: Var[str]
|
||||
src_set: Var[Union[str, int, bool]]
|
||||
|
||||
# Media type of the source
|
||||
type: Var[str]
|
||||
type: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Svg(BaseHTML):
|
||||
@ -415,16 +431,16 @@ class LinearGradient(BaseHTML):
|
||||
spread_method: Var[Union[str, bool]]
|
||||
|
||||
# X coordinate of the starting point of the gradient.
|
||||
x1: Var[Union[str, int, float]]
|
||||
x1: Var[Union[str, int, bool]]
|
||||
|
||||
# X coordinate of the ending point of the gradient.
|
||||
x2: Var[Union[str, int, float]]
|
||||
x2: Var[Union[str, int, bool]]
|
||||
|
||||
# Y coordinate of the starting point of the gradient.
|
||||
y1: Var[Union[str, int, float]]
|
||||
y1: Var[Union[str, int, bool]]
|
||||
|
||||
# Y coordinate of the ending point of the gradient.
|
||||
y2: Var[Union[str, int, float]]
|
||||
y2: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class RadialGradient(BaseHTML):
|
||||
@ -433,19 +449,19 @@ class RadialGradient(BaseHTML):
|
||||
tag = "radialGradient"
|
||||
|
||||
# The x coordinate of the end circle of the radial gradient.
|
||||
cx: Var[Union[str, int, float]]
|
||||
cx: Var[Union[str, int, bool]]
|
||||
|
||||
# The y coordinate of the end circle of the radial gradient.
|
||||
cy: Var[Union[str, int, float]]
|
||||
cy: Var[Union[str, int, bool]]
|
||||
|
||||
# The radius of the start circle of the radial gradient.
|
||||
fr: Var[Union[str, int, float]]
|
||||
fr: Var[Union[str, int, bool]]
|
||||
|
||||
# The x coordinate of the start circle of the radial gradient.
|
||||
fx: Var[Union[str, int, float]]
|
||||
fx: Var[Union[str, int, bool]]
|
||||
|
||||
# The y coordinate of the start circle of the radial gradient.
|
||||
fy: Var[Union[str, int, float]]
|
||||
fy: Var[Union[str, int, bool]]
|
||||
|
||||
# Units for the gradient.
|
||||
gradient_units: Var[Union[str, bool]]
|
||||
@ -454,7 +470,7 @@ class RadialGradient(BaseHTML):
|
||||
gradient_transform: Var[Union[str, bool]]
|
||||
|
||||
# The radius of the end circle of the radial gradient.
|
||||
r: Var[Union[str, int, float]]
|
||||
r: Var[Union[str, int, bool]]
|
||||
|
||||
# Method used to spread the gradient.
|
||||
spread_method: Var[Union[str, bool]]
|
||||
@ -481,7 +497,7 @@ class Path(BaseHTML):
|
||||
tag = "path"
|
||||
|
||||
# Defines the shape of the path.
|
||||
d: Var[Union[str, int, float]]
|
||||
d: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class SVG(ComponentNamespace):
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,10 +1,8 @@
|
||||
"""Metadata classes."""
|
||||
|
||||
from typing import List
|
||||
from typing import List, Union
|
||||
|
||||
from reflex.components.el.element import Element
|
||||
from reflex.components.el.elements.inline import ReferrerPolicy
|
||||
from reflex.components.el.elements.media import CrossOrigin
|
||||
from reflex.vars.base import Var
|
||||
|
||||
from .base import BaseHTML
|
||||
@ -16,8 +14,8 @@ class Base(BaseHTML):
|
||||
tag = "base"
|
||||
|
||||
tag = "base"
|
||||
href: Var[str]
|
||||
target: Var[str]
|
||||
href: Var[Union[str, int, bool]]
|
||||
target: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Head(BaseHTML):
|
||||
@ -32,31 +30,31 @@ class Link(BaseHTML):
|
||||
tag = "link"
|
||||
|
||||
# Specifies the CORS settings for the linked resource
|
||||
cross_origin: Var[CrossOrigin]
|
||||
cross_origin: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies the URL of the linked document/resource
|
||||
href: Var[str]
|
||||
href: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies the language of the text in the linked document
|
||||
href_lang: Var[str]
|
||||
href_lang: Var[Union[str, int, bool]]
|
||||
|
||||
# Allows a browser to check the fetched link for integrity
|
||||
integrity: Var[str]
|
||||
integrity: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies on what device the linked document will be displayed
|
||||
media: Var[str]
|
||||
media: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies the referrer policy of the linked document
|
||||
referrer_policy: Var[ReferrerPolicy]
|
||||
referrer_policy: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies the relationship between the current document and the linked one
|
||||
rel: Var[str]
|
||||
rel: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies the sizes of icons for visual media
|
||||
sizes: Var[str]
|
||||
sizes: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies the MIME type of the linked document
|
||||
type: Var[str]
|
||||
type: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Meta(BaseHTML): # Inherits common attributes from BaseHTML
|
||||
@ -65,16 +63,16 @@ class Meta(BaseHTML): # Inherits common attributes from BaseHTML
|
||||
tag = "meta" # The HTML tag for this element is <meta>
|
||||
|
||||
# Specifies the character encoding for the HTML document
|
||||
char_set: Var[str]
|
||||
char_set: Var[Union[str, int, bool]]
|
||||
|
||||
# Defines the content of the metadata
|
||||
content: Var[str]
|
||||
content: Var[Union[str, int, bool]]
|
||||
|
||||
# Provides an HTTP header for the information/value of the content attribute
|
||||
http_equiv: Var[str]
|
||||
http_equiv: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies a name for the metadata
|
||||
name: Var[str]
|
||||
name: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Title(Element):
|
||||
@ -89,7 +87,7 @@ class StyleEl(Element):
|
||||
|
||||
tag = "style"
|
||||
|
||||
media: Var[str]
|
||||
media: Var[Union[str, int, bool]]
|
||||
|
||||
special_props: List[Var] = [Var(_js_expr="suppressHydrationWarning")]
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
# ------------------- DO NOT EDIT ----------------------
|
||||
# This file was generated by `reflex/utils/pyi_generator.py`!
|
||||
# ------------------------------------------------------
|
||||
from typing import Any, Dict, Literal, Optional, Union, overload
|
||||
from typing import Any, Dict, Optional, Union, overload
|
||||
|
||||
from reflex.components.el.element import Element
|
||||
from reflex.event import EventType
|
||||
@ -18,213 +18,32 @@ class Base(BaseHTML):
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
href: Optional[Union[Var[str], str]] = None,
|
||||
target: Optional[Union[Var[str], str]] = None,
|
||||
access_key: Optional[Union[Var[str], str]] = None,
|
||||
href: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
target: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[
|
||||
Literal["characters", "none", "off", "on", "sentences", "words"],
|
||||
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[
|
||||
Literal["inherit", "plaintext-only", False, True],
|
||||
Var[Literal["inherit", "plaintext-only", False, True]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
context_menu: Optional[Union[Var[str], str]] = None,
|
||||
dir: Optional[Union[Var[str], str]] = None,
|
||||
draggable: Optional[Union[Var[bool], bool]] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"],
|
||||
Var[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"]
|
||||
],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
hidden: Optional[Union[Var[bool], bool]] = None,
|
||||
input_mode: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
item_prop: Optional[Union[Var[str], str]] = None,
|
||||
lang: Optional[Union[Var[str], str]] = None,
|
||||
role: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
slot: Optional[Union[Var[str], str]] = None,
|
||||
spell_check: Optional[Union[Var[bool], bool]] = None,
|
||||
tab_index: Optional[Union[Var[int], int]] = None,
|
||||
title: Optional[Union[Var[str], str]] = None,
|
||||
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
@ -287,211 +106,30 @@ class Head(BaseHTML):
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
access_key: Optional[Union[Var[str], str]] = None,
|
||||
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[
|
||||
Literal["characters", "none", "off", "on", "sentences", "words"],
|
||||
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[
|
||||
Literal["inherit", "plaintext-only", False, True],
|
||||
Var[Literal["inherit", "plaintext-only", False, True]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
context_menu: Optional[Union[Var[str], str]] = None,
|
||||
dir: Optional[Union[Var[str], str]] = None,
|
||||
draggable: Optional[Union[Var[bool], bool]] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"],
|
||||
Var[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"]
|
||||
],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
hidden: Optional[Union[Var[bool], bool]] = None,
|
||||
input_mode: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
item_prop: Optional[Union[Var[str], str]] = None,
|
||||
lang: Optional[Union[Var[str], str]] = None,
|
||||
role: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
slot: Optional[Union[Var[str], str]] = None,
|
||||
spell_check: Optional[Union[Var[bool], bool]] = None,
|
||||
tab_index: Optional[Union[Var[int], int]] = None,
|
||||
title: Optional[Union[Var[str], str]] = None,
|
||||
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
@ -555,251 +193,42 @@ class Link(BaseHTML):
|
||||
cls,
|
||||
*children,
|
||||
cross_origin: Optional[
|
||||
Union[
|
||||
Literal["", "anonymous", "use-credentials"],
|
||||
Var[Literal["", "anonymous", "use-credentials"]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
href: Optional[Union[Var[str], str]] = None,
|
||||
href_lang: Optional[Union[Var[str], str]] = None,
|
||||
integrity: Optional[Union[Var[str], str]] = None,
|
||||
media: Optional[Union[Var[str], str]] = None,
|
||||
href: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
href_lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
integrity: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
media: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
referrer_policy: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"",
|
||||
"no-referrer",
|
||||
"no-referrer-when-downgrade",
|
||||
"origin",
|
||||
"origin-when-cross-origin",
|
||||
"same-origin",
|
||||
"strict-origin",
|
||||
"strict-origin-when-cross-origin",
|
||||
"unsafe-url",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"",
|
||||
"no-referrer",
|
||||
"no-referrer-when-downgrade",
|
||||
"origin",
|
||||
"origin-when-cross-origin",
|
||||
"same-origin",
|
||||
"strict-origin",
|
||||
"strict-origin-when-cross-origin",
|
||||
"unsafe-url",
|
||||
]
|
||||
],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
rel: Optional[Union[Var[str], str]] = None,
|
||||
sizes: Optional[Union[Var[str], str]] = None,
|
||||
type: Optional[Union[Var[str], str]] = None,
|
||||
access_key: Optional[Union[Var[str], str]] = None,
|
||||
rel: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
sizes: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
type: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[
|
||||
Literal["characters", "none", "off", "on", "sentences", "words"],
|
||||
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[
|
||||
Literal["inherit", "plaintext-only", False, True],
|
||||
Var[Literal["inherit", "plaintext-only", False, True]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
context_menu: Optional[Union[Var[str], str]] = None,
|
||||
dir: Optional[Union[Var[str], str]] = None,
|
||||
draggable: Optional[Union[Var[bool], bool]] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"],
|
||||
Var[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"]
|
||||
],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
hidden: Optional[Union[Var[bool], bool]] = None,
|
||||
input_mode: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
item_prop: Optional[Union[Var[str], str]] = None,
|
||||
lang: Optional[Union[Var[str], str]] = None,
|
||||
role: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
slot: Optional[Union[Var[str], str]] = None,
|
||||
spell_check: Optional[Union[Var[bool], bool]] = None,
|
||||
tab_index: Optional[Union[Var[int], int]] = None,
|
||||
title: Optional[Union[Var[str], str]] = None,
|
||||
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
@ -871,215 +300,34 @@ class Meta(BaseHTML):
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
char_set: Optional[Union[Var[str], str]] = None,
|
||||
content: Optional[Union[Var[str], str]] = None,
|
||||
http_equiv: Optional[Union[Var[str], str]] = None,
|
||||
name: Optional[Union[Var[str], str]] = None,
|
||||
access_key: Optional[Union[Var[str], str]] = None,
|
||||
char_set: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
content: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
http_equiv: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
name: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[
|
||||
Literal["characters", "none", "off", "on", "sentences", "words"],
|
||||
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[
|
||||
Literal["inherit", "plaintext-only", False, True],
|
||||
Var[Literal["inherit", "plaintext-only", False, True]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
context_menu: Optional[Union[Var[str], str]] = None,
|
||||
dir: Optional[Union[Var[str], str]] = None,
|
||||
draggable: Optional[Union[Var[bool], bool]] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"],
|
||||
Var[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"]
|
||||
],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
hidden: Optional[Union[Var[bool], bool]] = None,
|
||||
input_mode: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
item_prop: Optional[Union[Var[str], str]] = None,
|
||||
lang: Optional[Union[Var[str], str]] = None,
|
||||
role: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
slot: Optional[Union[Var[str], str]] = None,
|
||||
spell_check: Optional[Union[Var[bool], bool]] = None,
|
||||
tab_index: Optional[Union[Var[int], int]] = None,
|
||||
title: Optional[Union[Var[str], str]] = None,
|
||||
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
@ -1192,7 +440,7 @@ class StyleEl(Element):
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
media: Optional[Union[Var[str], str]] = None,
|
||||
media: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
|
@ -1,5 +1,7 @@
|
||||
"""Other classes."""
|
||||
|
||||
from typing import Union
|
||||
|
||||
from reflex.vars.base import Var
|
||||
|
||||
from .base import BaseHTML
|
||||
@ -11,7 +13,7 @@ class Details(BaseHTML):
|
||||
tag = "details"
|
||||
|
||||
# Indicates whether the details will be visible (expanded) to the user
|
||||
open: Var[bool]
|
||||
open: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Dialog(BaseHTML):
|
||||
@ -20,7 +22,7 @@ class Dialog(BaseHTML):
|
||||
tag = "dialog"
|
||||
|
||||
# Indicates whether the dialog is active and can be interacted with
|
||||
open: Var[bool]
|
||||
open: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Summary(BaseHTML):
|
||||
@ -65,7 +67,7 @@ class Html(BaseHTML):
|
||||
tag = "html"
|
||||
|
||||
# Specifies the URL of the document's cache manifest (obsolete in HTML5)
|
||||
manifest: Var[str]
|
||||
manifest: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
details = Details.create
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
||||
"""Scripts classes."""
|
||||
|
||||
from reflex.components.el.elements.inline import ReferrerPolicy
|
||||
from reflex.components.el.elements.media import CrossOrigin
|
||||
from typing import Union
|
||||
|
||||
from reflex.vars.base import Var
|
||||
|
||||
from .base import BaseHTML
|
||||
@ -25,28 +25,31 @@ class Script(BaseHTML):
|
||||
tag = "script"
|
||||
|
||||
# Indicates that the script should be executed asynchronously
|
||||
async_: Var[bool]
|
||||
async_: Var[Union[str, int, bool]]
|
||||
|
||||
# Character encoding of the external script
|
||||
char_set: Var[str]
|
||||
char_set: Var[Union[str, int, bool]]
|
||||
|
||||
# Configures the CORS requests for the script
|
||||
cross_origin: Var[CrossOrigin]
|
||||
cross_origin: Var[Union[str, int, bool]]
|
||||
|
||||
# Indicates that the script should be executed after the page has finished parsing
|
||||
defer: Var[bool]
|
||||
defer: Var[Union[str, int, bool]]
|
||||
|
||||
# Security feature allowing browsers to verify what they fetch
|
||||
integrity: Var[str]
|
||||
integrity: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies the scripting language used in the type attribute
|
||||
language: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies which referrer information to send when fetching the script
|
||||
referrer_policy: Var[ReferrerPolicy]
|
||||
referrer_policy: Var[Union[str, int, bool]]
|
||||
|
||||
# URL of an external script
|
||||
src: Var[str]
|
||||
src: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies the MIME type of the script
|
||||
type: Var[str]
|
||||
type: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
canvas = Canvas.create
|
||||
|
@ -3,7 +3,7 @@
|
||||
# ------------------- DO NOT EDIT ----------------------
|
||||
# This file was generated by `reflex/utils/pyi_generator.py`!
|
||||
# ------------------------------------------------------
|
||||
from typing import Any, Dict, Literal, Optional, Union, overload
|
||||
from typing import Any, Dict, Optional, Union, overload
|
||||
|
||||
from reflex.event import EventType
|
||||
from reflex.style import Style
|
||||
@ -17,211 +17,30 @@ class Canvas(BaseHTML):
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
access_key: Optional[Union[Var[str], str]] = None,
|
||||
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[
|
||||
Literal["characters", "none", "off", "on", "sentences", "words"],
|
||||
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[
|
||||
Literal["inherit", "plaintext-only", False, True],
|
||||
Var[Literal["inherit", "plaintext-only", False, True]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
context_menu: Optional[Union[Var[str], str]] = None,
|
||||
dir: Optional[Union[Var[str], str]] = None,
|
||||
draggable: Optional[Union[Var[bool], bool]] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"],
|
||||
Var[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"]
|
||||
],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
hidden: Optional[Union[Var[bool], bool]] = None,
|
||||
input_mode: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
item_prop: Optional[Union[Var[str], str]] = None,
|
||||
lang: Optional[Union[Var[str], str]] = None,
|
||||
role: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
slot: Optional[Union[Var[str], str]] = None,
|
||||
spell_check: Optional[Union[Var[bool], bool]] = None,
|
||||
tab_index: Optional[Union[Var[int], int]] = None,
|
||||
title: Optional[Union[Var[str], str]] = None,
|
||||
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
@ -284,211 +103,30 @@ class Noscript(BaseHTML):
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
access_key: Optional[Union[Var[str], str]] = None,
|
||||
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[
|
||||
Literal["characters", "none", "off", "on", "sentences", "words"],
|
||||
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[
|
||||
Literal["inherit", "plaintext-only", False, True],
|
||||
Var[Literal["inherit", "plaintext-only", False, True]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
context_menu: Optional[Union[Var[str], str]] = None,
|
||||
dir: Optional[Union[Var[str], str]] = None,
|
||||
draggable: Optional[Union[Var[bool], bool]] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"],
|
||||
Var[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"]
|
||||
],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
hidden: Optional[Union[Var[bool], bool]] = None,
|
||||
input_mode: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
item_prop: Optional[Union[Var[str], str]] = None,
|
||||
lang: Optional[Union[Var[str], str]] = None,
|
||||
role: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
slot: Optional[Union[Var[str], str]] = None,
|
||||
spell_check: Optional[Union[Var[bool], bool]] = None,
|
||||
tab_index: Optional[Union[Var[int], int]] = None,
|
||||
title: Optional[Union[Var[str], str]] = None,
|
||||
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
@ -551,251 +189,43 @@ class Script(BaseHTML):
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
async_: Optional[Union[Var[bool], bool]] = None,
|
||||
char_set: Optional[Union[Var[str], str]] = None,
|
||||
async_: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
char_set: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
cross_origin: Optional[
|
||||
Union[
|
||||
Literal["", "anonymous", "use-credentials"],
|
||||
Var[Literal["", "anonymous", "use-credentials"]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
defer: Optional[Union[Var[bool], bool]] = None,
|
||||
integrity: Optional[Union[Var[str], str]] = None,
|
||||
defer: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
integrity: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
language: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
referrer_policy: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"",
|
||||
"no-referrer",
|
||||
"no-referrer-when-downgrade",
|
||||
"origin",
|
||||
"origin-when-cross-origin",
|
||||
"same-origin",
|
||||
"strict-origin",
|
||||
"strict-origin-when-cross-origin",
|
||||
"unsafe-url",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"",
|
||||
"no-referrer",
|
||||
"no-referrer-when-downgrade",
|
||||
"origin",
|
||||
"origin-when-cross-origin",
|
||||
"same-origin",
|
||||
"strict-origin",
|
||||
"strict-origin-when-cross-origin",
|
||||
"unsafe-url",
|
||||
]
|
||||
],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
src: Optional[Union[Var[str], str]] = None,
|
||||
type: Optional[Union[Var[str], str]] = None,
|
||||
access_key: Optional[Union[Var[str], str]] = None,
|
||||
src: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
type: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[
|
||||
Literal["characters", "none", "off", "on", "sentences", "words"],
|
||||
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[
|
||||
Literal["inherit", "plaintext-only", False, True],
|
||||
Var[Literal["inherit", "plaintext-only", False, True]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
context_menu: Optional[Union[Var[str], str]] = None,
|
||||
dir: Optional[Union[Var[str], str]] = None,
|
||||
draggable: Optional[Union[Var[bool], bool]] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"],
|
||||
Var[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"]
|
||||
],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
hidden: Optional[Union[Var[bool], bool]] = None,
|
||||
input_mode: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
item_prop: Optional[Union[Var[str], str]] = None,
|
||||
lang: Optional[Union[Var[str], str]] = None,
|
||||
role: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
slot: Optional[Union[Var[str], str]] = None,
|
||||
spell_check: Optional[Union[Var[bool], bool]] = None,
|
||||
tab_index: Optional[Union[Var[int], int]] = None,
|
||||
title: Optional[Union[Var[str], str]] = None,
|
||||
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
@ -828,6 +258,7 @@ class Script(BaseHTML):
|
||||
cross_origin: Configures the CORS requests for the script
|
||||
defer: Indicates that the script should be executed after the page has finished parsing
|
||||
integrity: Security feature allowing browsers to verify what they fetch
|
||||
language: Specifies the scripting language used in the type attribute
|
||||
referrer_policy: Specifies which referrer information to send when fetching the script
|
||||
src: URL of an external script
|
||||
type: Specifies the MIME type of the script
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
||||
"""Tables classes."""
|
||||
|
||||
from typing import Literal
|
||||
from typing import Union
|
||||
|
||||
from reflex.vars.base import Var
|
||||
|
||||
@ -12,14 +12,20 @@ class Caption(BaseHTML):
|
||||
|
||||
tag = "caption"
|
||||
|
||||
# Alignment of the caption
|
||||
align: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Col(BaseHTML):
|
||||
"""Display the col element."""
|
||||
|
||||
tag = "col"
|
||||
|
||||
# Alignment of the content within the column
|
||||
align: Var[Union[str, int, bool]]
|
||||
|
||||
# Number of columns the col element spans
|
||||
span: Var[int]
|
||||
span: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Colgroup(BaseHTML):
|
||||
@ -27,8 +33,11 @@ class Colgroup(BaseHTML):
|
||||
|
||||
tag = "colgroup"
|
||||
|
||||
# Alignment of the content within the column group
|
||||
align: Var[Union[str, int, bool]]
|
||||
|
||||
# Number of columns the colgroup element spans
|
||||
span: Var[int]
|
||||
span: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Table(BaseHTML):
|
||||
@ -37,10 +46,10 @@ class Table(BaseHTML):
|
||||
tag = "table"
|
||||
|
||||
# Alignment of the table
|
||||
align: Var[Literal["left", "center", "right"]]
|
||||
align: Var[Union[str, int, bool]]
|
||||
|
||||
# Provides a summary of the table's purpose and structure
|
||||
summary: Var[str]
|
||||
summary: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Tbody(BaseHTML):
|
||||
@ -48,6 +57,9 @@ class Tbody(BaseHTML):
|
||||
|
||||
tag = "tbody"
|
||||
|
||||
# Alignment of the content within the table body
|
||||
align: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Td(BaseHTML):
|
||||
"""Display the td element."""
|
||||
@ -55,16 +67,16 @@ class Td(BaseHTML):
|
||||
tag = "td"
|
||||
|
||||
# Alignment of the content within the table cell
|
||||
align: Var[Literal["left", "center", "right", "justify", "char"]]
|
||||
align: Var[Union[str, int, bool]]
|
||||
|
||||
# Number of columns a cell should span
|
||||
col_span: Var[int]
|
||||
col_span: Var[Union[str, int, bool]]
|
||||
|
||||
# IDs of the headers associated with this cell
|
||||
headers: Var[str]
|
||||
headers: Var[Union[str, int, bool]]
|
||||
|
||||
# Number of rows a cell should span
|
||||
row_span: Var[int]
|
||||
row_span: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Tfoot(BaseHTML):
|
||||
@ -72,6 +84,9 @@ class Tfoot(BaseHTML):
|
||||
|
||||
tag = "tfoot"
|
||||
|
||||
# Alignment of the content within the table footer
|
||||
align: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Th(BaseHTML):
|
||||
"""Display the th element."""
|
||||
@ -79,19 +94,19 @@ class Th(BaseHTML):
|
||||
tag = "th"
|
||||
|
||||
# Alignment of the content within the table header cell
|
||||
align: Var[Literal["left", "center", "right", "justify", "char"]]
|
||||
align: Var[Union[str, int, bool]]
|
||||
|
||||
# Number of columns a header cell should span
|
||||
col_span: Var[int]
|
||||
col_span: Var[Union[str, int, bool]]
|
||||
|
||||
# IDs of the headers associated with this header cell
|
||||
headers: Var[str]
|
||||
headers: Var[Union[str, int, bool]]
|
||||
|
||||
# Number of rows a header cell should span
|
||||
row_span: Var[int]
|
||||
row_span: Var[Union[str, int, bool]]
|
||||
|
||||
# Scope of the header cell (row, col, rowgroup, colgroup)
|
||||
scope: Var[str]
|
||||
scope: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Thead(BaseHTML):
|
||||
@ -99,12 +114,18 @@ class Thead(BaseHTML):
|
||||
|
||||
tag = "thead"
|
||||
|
||||
# Alignment of the content within the table header
|
||||
align: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Tr(BaseHTML):
|
||||
"""Display the tr element."""
|
||||
|
||||
tag = "tr"
|
||||
|
||||
# Alignment of the content within the table row
|
||||
align: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
caption = Caption.create
|
||||
col = Col.create
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
||||
"""Typography classes."""
|
||||
|
||||
from typing import Literal
|
||||
from typing import Union
|
||||
|
||||
from reflex.vars.base import Var
|
||||
|
||||
@ -13,7 +13,7 @@ class Blockquote(BaseHTML):
|
||||
tag = "blockquote"
|
||||
|
||||
# Define the title of a work.
|
||||
cite: Var[str]
|
||||
cite: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Dd(BaseHTML):
|
||||
@ -51,6 +51,9 @@ class Hr(BaseHTML):
|
||||
|
||||
tag = "hr"
|
||||
|
||||
# Used to specify the alignment of text content of The Element. this attribute is used in all elements.
|
||||
align: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Li(BaseHTML):
|
||||
"""Display the li element."""
|
||||
@ -64,7 +67,7 @@ class Menu(BaseHTML):
|
||||
tag = "menu"
|
||||
|
||||
# Specifies that the menu element is a context menu.
|
||||
type: Var[str]
|
||||
type: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Ol(BaseHTML):
|
||||
@ -73,13 +76,13 @@ class Ol(BaseHTML):
|
||||
tag = "ol"
|
||||
|
||||
# Reverses the order of the list.
|
||||
reversed: Var[bool]
|
||||
reversed: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies the start value of the first list item in an ordered list.
|
||||
start: Var[int]
|
||||
start: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies the kind of marker to use in the list (letters or numbers).
|
||||
type: Var[Literal["1", "a", "A", "i", "I"]]
|
||||
type: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class P(BaseHTML):
|
||||
@ -106,10 +109,10 @@ class Ins(BaseHTML):
|
||||
tag = "ins"
|
||||
|
||||
# Specifies the URL of the document that explains the reason why the text was inserted/changed.
|
||||
cite: Var[str]
|
||||
cite: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies the date and time of when the text was inserted/changed.
|
||||
date_time: Var[str]
|
||||
date_time: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
class Del(BaseHTML):
|
||||
@ -118,10 +121,10 @@ class Del(BaseHTML):
|
||||
tag = "del"
|
||||
|
||||
# Specifies the URL of the document that explains the reason why the text was deleted.
|
||||
cite: Var[str]
|
||||
cite: Var[Union[str, int, bool]]
|
||||
|
||||
# Specifies the date and time of when the text was deleted.
|
||||
date_time: Var[str]
|
||||
date_time: Var[Union[str, int, bool]]
|
||||
|
||||
|
||||
blockquote = Blockquote.create
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -4,7 +4,7 @@ from reflex.components.component import Component
|
||||
from reflex.utils import format
|
||||
from reflex.utils.imports import ImportVar
|
||||
from reflex.vars.base import LiteralVar, Var
|
||||
from reflex.vars.sequence import LiteralStringVar, StringVar
|
||||
from reflex.vars.sequence import LiteralStringVar
|
||||
|
||||
|
||||
class LucideIconComponent(Component):
|
||||
@ -40,12 +40,7 @@ class Icon(LucideIconComponent):
|
||||
The created component.
|
||||
"""
|
||||
if children:
|
||||
if len(children) == 1:
|
||||
child = Var.create(children[0]).guess_type()
|
||||
if not isinstance(child, StringVar):
|
||||
raise AttributeError(
|
||||
f"Icon name must be a string, got {children[0]._var_type if isinstance(children[0], Var) else children[0]}"
|
||||
)
|
||||
if len(children) == 1 and isinstance(children[0], str):
|
||||
props["tag"] = children[0]
|
||||
else:
|
||||
raise AttributeError(
|
||||
@ -54,33 +49,22 @@ class Icon(LucideIconComponent):
|
||||
if "tag" not in props:
|
||||
raise AttributeError("Missing 'tag' keyword-argument for Icon")
|
||||
|
||||
tag: str | Var | LiteralVar = Var.create(props.pop("tag"))
|
||||
tag: str | Var | LiteralVar = props.pop("tag")
|
||||
if isinstance(tag, LiteralVar):
|
||||
if isinstance(tag, LiteralStringVar):
|
||||
tag = tag._var_value
|
||||
else:
|
||||
raise TypeError(f"Icon name must be a string, got {type(tag)}")
|
||||
elif isinstance(tag, Var):
|
||||
tag_stringified = tag.guess_type()
|
||||
if not isinstance(tag_stringified, StringVar):
|
||||
raise TypeError(f"Icon name must be a string, got {tag._var_type}")
|
||||
return DynamicIcon.create(name=tag_stringified.replace("_", "-"), **props)
|
||||
return DynamicIcon.create(name=tag, **props)
|
||||
|
||||
if (
|
||||
not isinstance(tag, str)
|
||||
or format.to_snake_case(tag) not in LUCIDE_ICON_LIST
|
||||
):
|
||||
if isinstance(tag, str):
|
||||
icons_sorted = sorted(
|
||||
LUCIDE_ICON_LIST,
|
||||
key=lambda s: format.length_of_largest_common_substring(tag, s),
|
||||
reverse=True,
|
||||
)
|
||||
else:
|
||||
icons_sorted = LUCIDE_ICON_LIST
|
||||
raise ValueError(
|
||||
f"Invalid icon tag: {tag}. Please use one of the following: {', '.join(icons_sorted[0:25])}, ..."
|
||||
"\nSee full list at https://reflex.dev/docs/library/data-display/icon/#icons-list."
|
||||
f"Invalid icon tag: {tag}. Please use one of the following: {', '.join(LUCIDE_ICON_LIST[0:25])}, ..."
|
||||
"\nSee full list at https://lucide.dev/icons."
|
||||
)
|
||||
|
||||
if tag in LUCIDE_ICON_MAPPING_OVERRIDE:
|
||||
|
@ -6,12 +6,13 @@ import dataclasses
|
||||
import textwrap
|
||||
from functools import lru_cache
|
||||
from hashlib import md5
|
||||
from typing import Any, Callable, Dict, Sequence
|
||||
from typing import Any, Callable, Dict, Sequence, Union
|
||||
|
||||
from reflex.components.component import BaseComponent, Component, CustomComponent
|
||||
from reflex.components.tags.tag import Tag
|
||||
from reflex.utils import types
|
||||
from reflex.utils.imports import ImportDict, ImportVar
|
||||
from reflex.vars.base import LiteralVar, Var, VarData
|
||||
from reflex.vars.base import LiteralVar, Var
|
||||
from reflex.vars.function import ARRAY_ISARRAY, ArgsFunctionOperation, DestructuredArg
|
||||
from reflex.vars.number import ternary_operation
|
||||
|
||||
@ -82,13 +83,13 @@ class MarkdownComponentMap:
|
||||
_explicit_return: bool = dataclasses.field(default=False)
|
||||
|
||||
@classmethod
|
||||
def get_component_map_custom_code(cls) -> Var:
|
||||
def get_component_map_custom_code(cls) -> str:
|
||||
"""Get the custom code for the component map.
|
||||
|
||||
Returns:
|
||||
The custom code for the component map.
|
||||
"""
|
||||
return Var("")
|
||||
return ""
|
||||
|
||||
@classmethod
|
||||
def create_map_fn_var(
|
||||
@ -96,7 +97,6 @@ class MarkdownComponentMap:
|
||||
fn_body: Var | None = None,
|
||||
fn_args: Sequence[str] | None = None,
|
||||
explicit_return: bool | None = None,
|
||||
var_data: VarData | None = None,
|
||||
) -> Var:
|
||||
"""Create a function Var for the component map.
|
||||
|
||||
@ -104,7 +104,6 @@ class MarkdownComponentMap:
|
||||
fn_body: The formatted component as a string.
|
||||
fn_args: The function arguments.
|
||||
explicit_return: Whether to use explicit return syntax.
|
||||
var_data: The var data for the function.
|
||||
|
||||
Returns:
|
||||
The function Var for the component map.
|
||||
@ -117,7 +116,6 @@ class MarkdownComponentMap:
|
||||
args_names=(DestructuredArg(fields=tuple(fn_args)),),
|
||||
return_expr=fn_body,
|
||||
explicit_return=explicit_return,
|
||||
_var_data=var_data,
|
||||
)
|
||||
|
||||
@classmethod
|
||||
@ -168,7 +166,7 @@ class Markdown(Component):
|
||||
Returns:
|
||||
The markdown component.
|
||||
"""
|
||||
if len(children) != 1 or not isinstance(children[0], (str, Var)):
|
||||
if len(children) != 1 or not types._isinstance(children[0], Union[str, Var]):
|
||||
raise ValueError(
|
||||
"Markdown component must have exactly one child containing the markdown source."
|
||||
)
|
||||
@ -241,15 +239,6 @@ class Markdown(Component):
|
||||
component(_MOCK_ARG)._get_all_imports()
|
||||
for component in self.component_map.values()
|
||||
],
|
||||
*(
|
||||
[inline_code_var_data.old_school_imports()]
|
||||
if (
|
||||
inline_code_var_data
|
||||
:= self._get_inline_code_fn_var()._get_all_var_data()
|
||||
)
|
||||
is not None
|
||||
else []
|
||||
),
|
||||
]
|
||||
|
||||
def _get_tag_map_fn_var(self, tag: str) -> Var:
|
||||
@ -289,20 +278,12 @@ class Markdown(Component):
|
||||
self._get_map_fn_custom_code_from_children(self.get_component("code"))
|
||||
)
|
||||
|
||||
var_data = VarData.merge(
|
||||
*[
|
||||
code._get_all_var_data()
|
||||
for code in custom_code_list
|
||||
if isinstance(code, Var)
|
||||
]
|
||||
)
|
||||
|
||||
codeblock_custom_code = "\n".join(map(str, custom_code_list))
|
||||
codeblock_custom_code = "\n".join(custom_code_list)
|
||||
|
||||
# Format the code to handle inline and block code.
|
||||
formatted_code = f"""
|
||||
const match = (className || '').match(/language-(?<lang>.*)/);
|
||||
let {_LANGUAGE!s} = match ? match[1] : '';
|
||||
const {_LANGUAGE!s} = match ? match[1] : '';
|
||||
{codeblock_custom_code};
|
||||
return inline ? (
|
||||
{self.format_component("code")}
|
||||
@ -321,7 +302,6 @@ let {_LANGUAGE!s} = match ? match[1] : '';
|
||||
),
|
||||
fn_body=Var(_js_expr=formatted_code),
|
||||
explicit_return=True,
|
||||
var_data=var_data,
|
||||
)
|
||||
|
||||
def get_component(self, tag: str, **props) -> Component:
|
||||
@ -401,7 +381,7 @@ let {_LANGUAGE!s} = match ? match[1] : '';
|
||||
|
||||
def _get_map_fn_custom_code_from_children(
|
||||
self, component: BaseComponent
|
||||
) -> list[str | Var]:
|
||||
) -> list[str]:
|
||||
"""Recursively get markdown custom code from children components.
|
||||
|
||||
Args:
|
||||
@ -410,7 +390,7 @@ let {_LANGUAGE!s} = match ? match[1] : '';
|
||||
Returns:
|
||||
A list of markdown custom code strings.
|
||||
"""
|
||||
custom_code_list: list[str | Var] = []
|
||||
custom_code_list = []
|
||||
if isinstance(component, MarkdownComponentMap):
|
||||
custom_code_list.append(component.get_component_map_custom_code())
|
||||
|
||||
|
@ -11,7 +11,7 @@ from reflex.components.component import Component
|
||||
from reflex.event import EventType
|
||||
from reflex.style import Style
|
||||
from reflex.utils.imports import ImportDict
|
||||
from reflex.vars.base import LiteralVar, Var, VarData
|
||||
from reflex.vars.base import LiteralVar, Var
|
||||
|
||||
_CHILDREN = Var(_js_expr="children", _var_type=str)
|
||||
_PROPS = Var(_js_expr="...props")
|
||||
@ -32,14 +32,13 @@ def get_base_component_map() -> dict[str, Callable]: ...
|
||||
@dataclasses.dataclass()
|
||||
class MarkdownComponentMap:
|
||||
@classmethod
|
||||
def get_component_map_custom_code(cls) -> Var: ...
|
||||
def get_component_map_custom_code(cls) -> str: ...
|
||||
@classmethod
|
||||
def create_map_fn_var(
|
||||
cls,
|
||||
fn_body: Var | None = None,
|
||||
fn_args: Sequence[str] | None = None,
|
||||
explicit_return: bool | None = None,
|
||||
var_data: VarData | None = None,
|
||||
) -> Var: ...
|
||||
@classmethod
|
||||
def get_fn_args(cls) -> Sequence[str]: ...
|
||||
|
@ -1,32 +1,5 @@
|
||||
"""Plotly components."""
|
||||
|
||||
from reflex.components.component import ComponentNamespace
|
||||
from .plotly import Plotly
|
||||
|
||||
from .plotly import (
|
||||
Plotly,
|
||||
PlotlyBasic,
|
||||
PlotlyCartesian,
|
||||
PlotlyFinance,
|
||||
PlotlyGeo,
|
||||
PlotlyGl2d,
|
||||
PlotlyGl3d,
|
||||
PlotlyMapbox,
|
||||
PlotlyStrict,
|
||||
)
|
||||
|
||||
|
||||
class PlotlyNamespace(ComponentNamespace):
|
||||
"""Plotly namespace."""
|
||||
|
||||
__call__ = Plotly.create
|
||||
basic = PlotlyBasic.create
|
||||
cartesian = PlotlyCartesian.create
|
||||
geo = PlotlyGeo.create
|
||||
gl2d = PlotlyGl2d.create
|
||||
gl3d = PlotlyGl3d.create
|
||||
finance = PlotlyFinance.create
|
||||
mapbox = PlotlyMapbox.create
|
||||
strict = PlotlyStrict.create
|
||||
|
||||
|
||||
plotly = PlotlyNamespace()
|
||||
plotly = Plotly.create
|
||||
|
@ -2,13 +2,14 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any, Dict, List, Tuple, TypedDict, TypeVar, Union
|
||||
from typing import Any, Dict, List, Tuple, Union
|
||||
|
||||
from typing_extensions import TypedDict, TypeVar
|
||||
|
||||
from reflex.components.component import Component, NoSSRComponent
|
||||
from reflex.components.core.cond import color_mode_cond
|
||||
from reflex.event import EventHandler, no_args_event_spec
|
||||
from reflex.utils import console
|
||||
from reflex.utils.imports import ImportDict, ImportVar
|
||||
from reflex.vars.base import LiteralVar, Var
|
||||
|
||||
try:
|
||||
@ -277,237 +278,3 @@ const extractPoints = (points) => {
|
||||
# Spread the figure dict over props, nothing to merge.
|
||||
tag.special_props.append(Var(_js_expr=f"{{...{figure!s}}}"))
|
||||
return tag
|
||||
|
||||
|
||||
CREATE_PLOTLY_COMPONENT: ImportDict = {
|
||||
"react-plotly.js": [
|
||||
ImportVar(
|
||||
tag="createPlotlyComponent",
|
||||
is_default=True,
|
||||
package_path="/factory",
|
||||
),
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
def dynamic_plotly_import(name: str, package: str) -> str:
|
||||
"""Create a dynamic import for a plotly component.
|
||||
|
||||
Args:
|
||||
name: The name of the component.
|
||||
package: The package path of the component.
|
||||
|
||||
Returns:
|
||||
The dynamic import for the plotly component.
|
||||
"""
|
||||
return f"""
|
||||
const {name} = dynamic(() => import('{package}').then(mod => createPlotlyComponent(mod)), {{ssr: false}})
|
||||
"""
|
||||
|
||||
|
||||
class PlotlyBasic(Plotly):
|
||||
"""Display a basic plotly graph."""
|
||||
|
||||
tag: str = "BasicPlotlyPlot"
|
||||
|
||||
library = "react-plotly.js@2.6.0"
|
||||
|
||||
lib_dependencies: list[str] = ["plotly.js-basic-dist-min@3.0.0"]
|
||||
|
||||
def add_imports(self) -> ImportDict | list[ImportDict]:
|
||||
"""Add imports for the plotly basic component.
|
||||
|
||||
Returns:
|
||||
The imports for the plotly basic component.
|
||||
"""
|
||||
return CREATE_PLOTLY_COMPONENT
|
||||
|
||||
def _get_dynamic_imports(self) -> str:
|
||||
"""Get the dynamic imports for the plotly basic component.
|
||||
|
||||
Returns:
|
||||
The dynamic imports for the plotly basic component.
|
||||
"""
|
||||
return dynamic_plotly_import(self.tag, "plotly.js-basic-dist-min")
|
||||
|
||||
|
||||
class PlotlyCartesian(Plotly):
|
||||
"""Display a plotly cartesian graph."""
|
||||
|
||||
tag: str = "CartesianPlotlyPlot"
|
||||
|
||||
library = "react-plotly.js@2.6.0"
|
||||
|
||||
lib_dependencies: list[str] = ["plotly.js-cartesian-dist-min@3.0.0"]
|
||||
|
||||
def add_imports(self) -> ImportDict | list[ImportDict]:
|
||||
"""Add imports for the plotly cartesian component.
|
||||
|
||||
Returns:
|
||||
The imports for the plotly cartesian component.
|
||||
"""
|
||||
return CREATE_PLOTLY_COMPONENT
|
||||
|
||||
def _get_dynamic_imports(self) -> str:
|
||||
"""Get the dynamic imports for the plotly cartesian component.
|
||||
|
||||
Returns:
|
||||
The dynamic imports for the plotly cartesian component.
|
||||
"""
|
||||
return dynamic_plotly_import(self.tag, "plotly.js-cartesian-dist-min")
|
||||
|
||||
|
||||
class PlotlyGeo(Plotly):
|
||||
"""Display a plotly geo graph."""
|
||||
|
||||
tag: str = "GeoPlotlyPlot"
|
||||
|
||||
library = "react-plotly.js@2.6.0"
|
||||
|
||||
lib_dependencies: list[str] = ["plotly.js-geo-dist-min@3.0.0"]
|
||||
|
||||
def add_imports(self) -> ImportDict | list[ImportDict]:
|
||||
"""Add imports for the plotly geo component.
|
||||
|
||||
Returns:
|
||||
The imports for the plotly geo component.
|
||||
"""
|
||||
return CREATE_PLOTLY_COMPONENT
|
||||
|
||||
def _get_dynamic_imports(self) -> str:
|
||||
"""Get the dynamic imports for the plotly geo component.
|
||||
|
||||
Returns:
|
||||
The dynamic imports for the plotly geo component.
|
||||
"""
|
||||
return dynamic_plotly_import(self.tag, "plotly.js-geo-dist-min")
|
||||
|
||||
|
||||
class PlotlyGl3d(Plotly):
|
||||
"""Display a plotly 3d graph."""
|
||||
|
||||
tag: str = "Gl3dPlotlyPlot"
|
||||
|
||||
library = "react-plotly.js@2.6.0"
|
||||
|
||||
lib_dependencies: list[str] = ["plotly.js-gl3d-dist-min@3.0.0"]
|
||||
|
||||
def add_imports(self) -> ImportDict | list[ImportDict]:
|
||||
"""Add imports for the plotly 3d component.
|
||||
|
||||
Returns:
|
||||
The imports for the plotly 3d component.
|
||||
"""
|
||||
return CREATE_PLOTLY_COMPONENT
|
||||
|
||||
def _get_dynamic_imports(self) -> str:
|
||||
"""Get the dynamic imports for the plotly 3d component.
|
||||
|
||||
Returns:
|
||||
The dynamic imports for the plotly 3d component.
|
||||
"""
|
||||
return dynamic_plotly_import(self.tag, "plotly.js-gl3d-dist-min")
|
||||
|
||||
|
||||
class PlotlyGl2d(Plotly):
|
||||
"""Display a plotly 2d graph."""
|
||||
|
||||
tag: str = "Gl2dPlotlyPlot"
|
||||
|
||||
library = "react-plotly.js@2.6.0"
|
||||
|
||||
lib_dependencies: list[str] = ["plotly.js-gl2d-dist-min@3.0.0"]
|
||||
|
||||
def add_imports(self) -> ImportDict | list[ImportDict]:
|
||||
"""Add imports for the plotly 2d component.
|
||||
|
||||
Returns:
|
||||
The imports for the plotly 2d component.
|
||||
"""
|
||||
return CREATE_PLOTLY_COMPONENT
|
||||
|
||||
def _get_dynamic_imports(self) -> str:
|
||||
"""Get the dynamic imports for the plotly 2d component.
|
||||
|
||||
Returns:
|
||||
The dynamic imports for the plotly 2d component.
|
||||
"""
|
||||
return dynamic_plotly_import(self.tag, "plotly.js-gl2d-dist-min")
|
||||
|
||||
|
||||
class PlotlyMapbox(Plotly):
|
||||
"""Display a plotly mapbox graph."""
|
||||
|
||||
tag: str = "MapboxPlotlyPlot"
|
||||
|
||||
library = "react-plotly.js@2.6.0"
|
||||
|
||||
lib_dependencies: list[str] = ["plotly.js-mapbox-dist-min@3.0.0"]
|
||||
|
||||
def add_imports(self) -> ImportDict | list[ImportDict]:
|
||||
"""Add imports for the plotly mapbox component.
|
||||
|
||||
Returns:
|
||||
The imports for the plotly mapbox component.
|
||||
"""
|
||||
return CREATE_PLOTLY_COMPONENT
|
||||
|
||||
def _get_dynamic_imports(self) -> str:
|
||||
"""Get the dynamic imports for the plotly mapbox component.
|
||||
|
||||
Returns:
|
||||
The dynamic imports for the plotly mapbox component.
|
||||
"""
|
||||
return dynamic_plotly_import(self.tag, "plotly.js-mapbox-dist-min")
|
||||
|
||||
|
||||
class PlotlyFinance(Plotly):
|
||||
"""Display a plotly finance graph."""
|
||||
|
||||
tag: str = "FinancePlotlyPlot"
|
||||
|
||||
library = "react-plotly.js@2.6.0"
|
||||
|
||||
lib_dependencies: list[str] = ["plotly.js-finance-dist-min@3.0.0"]
|
||||
|
||||
def add_imports(self) -> ImportDict | list[ImportDict]:
|
||||
"""Add imports for the plotly finance component.
|
||||
|
||||
Returns:
|
||||
The imports for the plotly finance component.
|
||||
"""
|
||||
return CREATE_PLOTLY_COMPONENT
|
||||
|
||||
def _get_dynamic_imports(self) -> str:
|
||||
"""Get the dynamic imports for the plotly finance component.
|
||||
|
||||
Returns:
|
||||
The dynamic imports for the plotly finance component.
|
||||
"""
|
||||
return dynamic_plotly_import(self.tag, "plotly.js-finance-dist-min")
|
||||
|
||||
|
||||
class PlotlyStrict(Plotly):
|
||||
"""Display a plotly strict graph."""
|
||||
|
||||
tag: str = "StrictPlotlyPlot"
|
||||
|
||||
library = "react-plotly.js@2.6.0"
|
||||
|
||||
lib_dependencies: list[str] = ["plotly.js-strict-dist-min@3.0.0"]
|
||||
|
||||
def add_imports(self) -> ImportDict | list[ImportDict]:
|
||||
"""Add imports for the plotly strict component.
|
||||
|
||||
Returns:
|
||||
The imports for the plotly strict component.
|
||||
"""
|
||||
return CREATE_PLOTLY_COMPONENT
|
||||
|
||||
def _get_dynamic_imports(self) -> str:
|
||||
"""Get the dynamic imports for the plotly strict component.
|
||||
|
||||
Returns:
|
||||
The dynamic imports for the plotly strict component.
|
||||
"""
|
||||
return dynamic_plotly_import(self.tag, "plotly.js-strict-dist-min")
|
||||
|
@ -3,13 +3,14 @@
|
||||
# ------------------- DO NOT EDIT ----------------------
|
||||
# This file was generated by `reflex/utils/pyi_generator.py`!
|
||||
# ------------------------------------------------------
|
||||
from typing import Any, Dict, List, Optional, TypedDict, TypeVar, Union, overload
|
||||
from typing import Any, Dict, List, Optional, Union, overload
|
||||
|
||||
from typing_extensions import TypedDict, TypeVar
|
||||
|
||||
from reflex.components.component import NoSSRComponent
|
||||
from reflex.event import EventType
|
||||
from reflex.style import Style
|
||||
from reflex.utils import console
|
||||
from reflex.utils.imports import ImportDict
|
||||
from reflex.vars.base import Var
|
||||
|
||||
try:
|
||||
@ -140,767 +141,3 @@ class Plotly(NoSSRComponent):
|
||||
The Plotly component.
|
||||
"""
|
||||
...
|
||||
|
||||
CREATE_PLOTLY_COMPONENT: ImportDict
|
||||
|
||||
def dynamic_plotly_import(name: str, package: str) -> str: ...
|
||||
|
||||
class PlotlyBasic(Plotly):
|
||||
def add_imports(self) -> ImportDict | list[ImportDict]: ...
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
data: Optional[Union[Figure, Var[Figure]]] = None, # type: ignore
|
||||
layout: Optional[Union[Dict, Var[Dict]]] = None,
|
||||
template: Optional[Union[Template, Var[Template]]] = None, # type: ignore
|
||||
config: Optional[Union[Dict, Var[Dict]]] = None,
|
||||
use_resize_handler: Optional[Union[Var[bool], bool]] = 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, Any]]] = 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[Union[EventType[()], EventType[List[Point]]]] = 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[Union[EventType[()], EventType[List[Point]]]] = None,
|
||||
on_mount: Optional[EventType[()]] = None,
|
||||
on_mouse_down: Optional[EventType[()]] = None,
|
||||
on_mouse_enter: Optional[EventType[()]] = None,
|
||||
on_mouse_leave: Optional[EventType[()]] = None,
|
||||
on_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[Union[EventType[()], EventType[List[Point]]]] = None,
|
||||
on_selecting: Optional[Union[EventType[()], EventType[List[Point]]]] = None,
|
||||
on_transition_interrupted: Optional[EventType[()]] = None,
|
||||
on_transitioning: Optional[EventType[()]] = None,
|
||||
on_unhover: Optional[Union[EventType[()], EventType[List[Point]]]] = None,
|
||||
on_unmount: Optional[EventType[()]] = None,
|
||||
**props,
|
||||
) -> "PlotlyBasic":
|
||||
"""Create the Plotly component.
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
data: The figure to display. This can be a plotly figure or a plotly data json.
|
||||
layout: The layout of the graph.
|
||||
template: The template for visual appearance of the graph.
|
||||
config: The config of the graph.
|
||||
use_resize_handler: If true, the graph will resize when the window is resized.
|
||||
on_after_plot: Fired after the plot is redrawn.
|
||||
on_animated: Fired after the plot was animated.
|
||||
on_animating_frame: Fired while animating a single frame (does not currently pass data through).
|
||||
on_animation_interrupted: Fired when an animation is interrupted (to start a new animation for example).
|
||||
on_autosize: Fired when the plot is responsively sized.
|
||||
on_before_hover: Fired whenever mouse moves over a plot.
|
||||
on_button_clicked: Fired when a plotly UI button is clicked.
|
||||
on_click: Fired when the plot is clicked.
|
||||
on_deselect: Fired when a selection is cleared (via double click).
|
||||
on_double_click: Fired when the plot is double clicked.
|
||||
on_hover: Fired when a plot element is hovered over.
|
||||
on_relayout: Fired after the plot is laid out (zoom, pan, etc).
|
||||
on_relayouting: Fired while the plot is being laid out.
|
||||
on_restyle: Fired after the plot style is changed.
|
||||
on_redraw: Fired after the plot is redrawn.
|
||||
on_selected: Fired after selecting plot elements.
|
||||
on_selecting: Fired while dragging a selection.
|
||||
on_transitioning: Fired while an animation is occurring.
|
||||
on_transition_interrupted: Fired when a transition is stopped early.
|
||||
on_unhover: Fired when a hovered element is no longer hovered.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: The properties of the component.
|
||||
|
||||
Returns:
|
||||
The Plotly component.
|
||||
"""
|
||||
...
|
||||
|
||||
class PlotlyCartesian(Plotly):
|
||||
def add_imports(self) -> ImportDict | list[ImportDict]: ...
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
data: Optional[Union[Figure, Var[Figure]]] = None, # type: ignore
|
||||
layout: Optional[Union[Dict, Var[Dict]]] = None,
|
||||
template: Optional[Union[Template, Var[Template]]] = None, # type: ignore
|
||||
config: Optional[Union[Dict, Var[Dict]]] = None,
|
||||
use_resize_handler: Optional[Union[Var[bool], bool]] = 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, Any]]] = 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[Union[EventType[()], EventType[List[Point]]]] = 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[Union[EventType[()], EventType[List[Point]]]] = None,
|
||||
on_mount: Optional[EventType[()]] = None,
|
||||
on_mouse_down: Optional[EventType[()]] = None,
|
||||
on_mouse_enter: Optional[EventType[()]] = None,
|
||||
on_mouse_leave: Optional[EventType[()]] = None,
|
||||
on_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[Union[EventType[()], EventType[List[Point]]]] = None,
|
||||
on_selecting: Optional[Union[EventType[()], EventType[List[Point]]]] = None,
|
||||
on_transition_interrupted: Optional[EventType[()]] = None,
|
||||
on_transitioning: Optional[EventType[()]] = None,
|
||||
on_unhover: Optional[Union[EventType[()], EventType[List[Point]]]] = None,
|
||||
on_unmount: Optional[EventType[()]] = None,
|
||||
**props,
|
||||
) -> "PlotlyCartesian":
|
||||
"""Create the Plotly component.
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
data: The figure to display. This can be a plotly figure or a plotly data json.
|
||||
layout: The layout of the graph.
|
||||
template: The template for visual appearance of the graph.
|
||||
config: The config of the graph.
|
||||
use_resize_handler: If true, the graph will resize when the window is resized.
|
||||
on_after_plot: Fired after the plot is redrawn.
|
||||
on_animated: Fired after the plot was animated.
|
||||
on_animating_frame: Fired while animating a single frame (does not currently pass data through).
|
||||
on_animation_interrupted: Fired when an animation is interrupted (to start a new animation for example).
|
||||
on_autosize: Fired when the plot is responsively sized.
|
||||
on_before_hover: Fired whenever mouse moves over a plot.
|
||||
on_button_clicked: Fired when a plotly UI button is clicked.
|
||||
on_click: Fired when the plot is clicked.
|
||||
on_deselect: Fired when a selection is cleared (via double click).
|
||||
on_double_click: Fired when the plot is double clicked.
|
||||
on_hover: Fired when a plot element is hovered over.
|
||||
on_relayout: Fired after the plot is laid out (zoom, pan, etc).
|
||||
on_relayouting: Fired while the plot is being laid out.
|
||||
on_restyle: Fired after the plot style is changed.
|
||||
on_redraw: Fired after the plot is redrawn.
|
||||
on_selected: Fired after selecting plot elements.
|
||||
on_selecting: Fired while dragging a selection.
|
||||
on_transitioning: Fired while an animation is occurring.
|
||||
on_transition_interrupted: Fired when a transition is stopped early.
|
||||
on_unhover: Fired when a hovered element is no longer hovered.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: The properties of the component.
|
||||
|
||||
Returns:
|
||||
The Plotly component.
|
||||
"""
|
||||
...
|
||||
|
||||
class PlotlyGeo(Plotly):
|
||||
def add_imports(self) -> ImportDict | list[ImportDict]: ...
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
data: Optional[Union[Figure, Var[Figure]]] = None, # type: ignore
|
||||
layout: Optional[Union[Dict, Var[Dict]]] = None,
|
||||
template: Optional[Union[Template, Var[Template]]] = None, # type: ignore
|
||||
config: Optional[Union[Dict, Var[Dict]]] = None,
|
||||
use_resize_handler: Optional[Union[Var[bool], bool]] = 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, Any]]] = 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[Union[EventType[()], EventType[List[Point]]]] = 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[Union[EventType[()], EventType[List[Point]]]] = None,
|
||||
on_mount: Optional[EventType[()]] = None,
|
||||
on_mouse_down: Optional[EventType[()]] = None,
|
||||
on_mouse_enter: Optional[EventType[()]] = None,
|
||||
on_mouse_leave: Optional[EventType[()]] = None,
|
||||
on_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[Union[EventType[()], EventType[List[Point]]]] = None,
|
||||
on_selecting: Optional[Union[EventType[()], EventType[List[Point]]]] = None,
|
||||
on_transition_interrupted: Optional[EventType[()]] = None,
|
||||
on_transitioning: Optional[EventType[()]] = None,
|
||||
on_unhover: Optional[Union[EventType[()], EventType[List[Point]]]] = None,
|
||||
on_unmount: Optional[EventType[()]] = None,
|
||||
**props,
|
||||
) -> "PlotlyGeo":
|
||||
"""Create the Plotly component.
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
data: The figure to display. This can be a plotly figure or a plotly data json.
|
||||
layout: The layout of the graph.
|
||||
template: The template for visual appearance of the graph.
|
||||
config: The config of the graph.
|
||||
use_resize_handler: If true, the graph will resize when the window is resized.
|
||||
on_after_plot: Fired after the plot is redrawn.
|
||||
on_animated: Fired after the plot was animated.
|
||||
on_animating_frame: Fired while animating a single frame (does not currently pass data through).
|
||||
on_animation_interrupted: Fired when an animation is interrupted (to start a new animation for example).
|
||||
on_autosize: Fired when the plot is responsively sized.
|
||||
on_before_hover: Fired whenever mouse moves over a plot.
|
||||
on_button_clicked: Fired when a plotly UI button is clicked.
|
||||
on_click: Fired when the plot is clicked.
|
||||
on_deselect: Fired when a selection is cleared (via double click).
|
||||
on_double_click: Fired when the plot is double clicked.
|
||||
on_hover: Fired when a plot element is hovered over.
|
||||
on_relayout: Fired after the plot is laid out (zoom, pan, etc).
|
||||
on_relayouting: Fired while the plot is being laid out.
|
||||
on_restyle: Fired after the plot style is changed.
|
||||
on_redraw: Fired after the plot is redrawn.
|
||||
on_selected: Fired after selecting plot elements.
|
||||
on_selecting: Fired while dragging a selection.
|
||||
on_transitioning: Fired while an animation is occurring.
|
||||
on_transition_interrupted: Fired when a transition is stopped early.
|
||||
on_unhover: Fired when a hovered element is no longer hovered.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: The properties of the component.
|
||||
|
||||
Returns:
|
||||
The Plotly component.
|
||||
"""
|
||||
...
|
||||
|
||||
class PlotlyGl3d(Plotly):
|
||||
def add_imports(self) -> ImportDict | list[ImportDict]: ...
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
data: Optional[Union[Figure, Var[Figure]]] = None, # type: ignore
|
||||
layout: Optional[Union[Dict, Var[Dict]]] = None,
|
||||
template: Optional[Union[Template, Var[Template]]] = None, # type: ignore
|
||||
config: Optional[Union[Dict, Var[Dict]]] = None,
|
||||
use_resize_handler: Optional[Union[Var[bool], bool]] = 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, Any]]] = 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[Union[EventType[()], EventType[List[Point]]]] = 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[Union[EventType[()], EventType[List[Point]]]] = None,
|
||||
on_mount: Optional[EventType[()]] = None,
|
||||
on_mouse_down: Optional[EventType[()]] = None,
|
||||
on_mouse_enter: Optional[EventType[()]] = None,
|
||||
on_mouse_leave: Optional[EventType[()]] = None,
|
||||
on_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[Union[EventType[()], EventType[List[Point]]]] = None,
|
||||
on_selecting: Optional[Union[EventType[()], EventType[List[Point]]]] = None,
|
||||
on_transition_interrupted: Optional[EventType[()]] = None,
|
||||
on_transitioning: Optional[EventType[()]] = None,
|
||||
on_unhover: Optional[Union[EventType[()], EventType[List[Point]]]] = None,
|
||||
on_unmount: Optional[EventType[()]] = None,
|
||||
**props,
|
||||
) -> "PlotlyGl3d":
|
||||
"""Create the Plotly component.
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
data: The figure to display. This can be a plotly figure or a plotly data json.
|
||||
layout: The layout of the graph.
|
||||
template: The template for visual appearance of the graph.
|
||||
config: The config of the graph.
|
||||
use_resize_handler: If true, the graph will resize when the window is resized.
|
||||
on_after_plot: Fired after the plot is redrawn.
|
||||
on_animated: Fired after the plot was animated.
|
||||
on_animating_frame: Fired while animating a single frame (does not currently pass data through).
|
||||
on_animation_interrupted: Fired when an animation is interrupted (to start a new animation for example).
|
||||
on_autosize: Fired when the plot is responsively sized.
|
||||
on_before_hover: Fired whenever mouse moves over a plot.
|
||||
on_button_clicked: Fired when a plotly UI button is clicked.
|
||||
on_click: Fired when the plot is clicked.
|
||||
on_deselect: Fired when a selection is cleared (via double click).
|
||||
on_double_click: Fired when the plot is double clicked.
|
||||
on_hover: Fired when a plot element is hovered over.
|
||||
on_relayout: Fired after the plot is laid out (zoom, pan, etc).
|
||||
on_relayouting: Fired while the plot is being laid out.
|
||||
on_restyle: Fired after the plot style is changed.
|
||||
on_redraw: Fired after the plot is redrawn.
|
||||
on_selected: Fired after selecting plot elements.
|
||||
on_selecting: Fired while dragging a selection.
|
||||
on_transitioning: Fired while an animation is occurring.
|
||||
on_transition_interrupted: Fired when a transition is stopped early.
|
||||
on_unhover: Fired when a hovered element is no longer hovered.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: The properties of the component.
|
||||
|
||||
Returns:
|
||||
The Plotly component.
|
||||
"""
|
||||
...
|
||||
|
||||
class PlotlyGl2d(Plotly):
|
||||
def add_imports(self) -> ImportDict | list[ImportDict]: ...
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
data: Optional[Union[Figure, Var[Figure]]] = None, # type: ignore
|
||||
layout: Optional[Union[Dict, Var[Dict]]] = None,
|
||||
template: Optional[Union[Template, Var[Template]]] = None, # type: ignore
|
||||
config: Optional[Union[Dict, Var[Dict]]] = None,
|
||||
use_resize_handler: Optional[Union[Var[bool], bool]] = 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, Any]]] = 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[Union[EventType[()], EventType[List[Point]]]] = 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[Union[EventType[()], EventType[List[Point]]]] = None,
|
||||
on_mount: Optional[EventType[()]] = None,
|
||||
on_mouse_down: Optional[EventType[()]] = None,
|
||||
on_mouse_enter: Optional[EventType[()]] = None,
|
||||
on_mouse_leave: Optional[EventType[()]] = None,
|
||||
on_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[Union[EventType[()], EventType[List[Point]]]] = None,
|
||||
on_selecting: Optional[Union[EventType[()], EventType[List[Point]]]] = None,
|
||||
on_transition_interrupted: Optional[EventType[()]] = None,
|
||||
on_transitioning: Optional[EventType[()]] = None,
|
||||
on_unhover: Optional[Union[EventType[()], EventType[List[Point]]]] = None,
|
||||
on_unmount: Optional[EventType[()]] = None,
|
||||
**props,
|
||||
) -> "PlotlyGl2d":
|
||||
"""Create the Plotly component.
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
data: The figure to display. This can be a plotly figure or a plotly data json.
|
||||
layout: The layout of the graph.
|
||||
template: The template for visual appearance of the graph.
|
||||
config: The config of the graph.
|
||||
use_resize_handler: If true, the graph will resize when the window is resized.
|
||||
on_after_plot: Fired after the plot is redrawn.
|
||||
on_animated: Fired after the plot was animated.
|
||||
on_animating_frame: Fired while animating a single frame (does not currently pass data through).
|
||||
on_animation_interrupted: Fired when an animation is interrupted (to start a new animation for example).
|
||||
on_autosize: Fired when the plot is responsively sized.
|
||||
on_before_hover: Fired whenever mouse moves over a plot.
|
||||
on_button_clicked: Fired when a plotly UI button is clicked.
|
||||
on_click: Fired when the plot is clicked.
|
||||
on_deselect: Fired when a selection is cleared (via double click).
|
||||
on_double_click: Fired when the plot is double clicked.
|
||||
on_hover: Fired when a plot element is hovered over.
|
||||
on_relayout: Fired after the plot is laid out (zoom, pan, etc).
|
||||
on_relayouting: Fired while the plot is being laid out.
|
||||
on_restyle: Fired after the plot style is changed.
|
||||
on_redraw: Fired after the plot is redrawn.
|
||||
on_selected: Fired after selecting plot elements.
|
||||
on_selecting: Fired while dragging a selection.
|
||||
on_transitioning: Fired while an animation is occurring.
|
||||
on_transition_interrupted: Fired when a transition is stopped early.
|
||||
on_unhover: Fired when a hovered element is no longer hovered.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: The properties of the component.
|
||||
|
||||
Returns:
|
||||
The Plotly component.
|
||||
"""
|
||||
...
|
||||
|
||||
class PlotlyMapbox(Plotly):
|
||||
def add_imports(self) -> ImportDict | list[ImportDict]: ...
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
data: Optional[Union[Figure, Var[Figure]]] = None, # type: ignore
|
||||
layout: Optional[Union[Dict, Var[Dict]]] = None,
|
||||
template: Optional[Union[Template, Var[Template]]] = None, # type: ignore
|
||||
config: Optional[Union[Dict, Var[Dict]]] = None,
|
||||
use_resize_handler: Optional[Union[Var[bool], bool]] = 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, Any]]] = 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[Union[EventType[()], EventType[List[Point]]]] = 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[Union[EventType[()], EventType[List[Point]]]] = None,
|
||||
on_mount: Optional[EventType[()]] = None,
|
||||
on_mouse_down: Optional[EventType[()]] = None,
|
||||
on_mouse_enter: Optional[EventType[()]] = None,
|
||||
on_mouse_leave: Optional[EventType[()]] = None,
|
||||
on_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[Union[EventType[()], EventType[List[Point]]]] = None,
|
||||
on_selecting: Optional[Union[EventType[()], EventType[List[Point]]]] = None,
|
||||
on_transition_interrupted: Optional[EventType[()]] = None,
|
||||
on_transitioning: Optional[EventType[()]] = None,
|
||||
on_unhover: Optional[Union[EventType[()], EventType[List[Point]]]] = None,
|
||||
on_unmount: Optional[EventType[()]] = None,
|
||||
**props,
|
||||
) -> "PlotlyMapbox":
|
||||
"""Create the Plotly component.
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
data: The figure to display. This can be a plotly figure or a plotly data json.
|
||||
layout: The layout of the graph.
|
||||
template: The template for visual appearance of the graph.
|
||||
config: The config of the graph.
|
||||
use_resize_handler: If true, the graph will resize when the window is resized.
|
||||
on_after_plot: Fired after the plot is redrawn.
|
||||
on_animated: Fired after the plot was animated.
|
||||
on_animating_frame: Fired while animating a single frame (does not currently pass data through).
|
||||
on_animation_interrupted: Fired when an animation is interrupted (to start a new animation for example).
|
||||
on_autosize: Fired when the plot is responsively sized.
|
||||
on_before_hover: Fired whenever mouse moves over a plot.
|
||||
on_button_clicked: Fired when a plotly UI button is clicked.
|
||||
on_click: Fired when the plot is clicked.
|
||||
on_deselect: Fired when a selection is cleared (via double click).
|
||||
on_double_click: Fired when the plot is double clicked.
|
||||
on_hover: Fired when a plot element is hovered over.
|
||||
on_relayout: Fired after the plot is laid out (zoom, pan, etc).
|
||||
on_relayouting: Fired while the plot is being laid out.
|
||||
on_restyle: Fired after the plot style is changed.
|
||||
on_redraw: Fired after the plot is redrawn.
|
||||
on_selected: Fired after selecting plot elements.
|
||||
on_selecting: Fired while dragging a selection.
|
||||
on_transitioning: Fired while an animation is occurring.
|
||||
on_transition_interrupted: Fired when a transition is stopped early.
|
||||
on_unhover: Fired when a hovered element is no longer hovered.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: The properties of the component.
|
||||
|
||||
Returns:
|
||||
The Plotly component.
|
||||
"""
|
||||
...
|
||||
|
||||
class PlotlyFinance(Plotly):
|
||||
def add_imports(self) -> ImportDict | list[ImportDict]: ...
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
data: Optional[Union[Figure, Var[Figure]]] = None, # type: ignore
|
||||
layout: Optional[Union[Dict, Var[Dict]]] = None,
|
||||
template: Optional[Union[Template, Var[Template]]] = None, # type: ignore
|
||||
config: Optional[Union[Dict, Var[Dict]]] = None,
|
||||
use_resize_handler: Optional[Union[Var[bool], bool]] = 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, Any]]] = 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[Union[EventType[()], EventType[List[Point]]]] = 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[Union[EventType[()], EventType[List[Point]]]] = None,
|
||||
on_mount: Optional[EventType[()]] = None,
|
||||
on_mouse_down: Optional[EventType[()]] = None,
|
||||
on_mouse_enter: Optional[EventType[()]] = None,
|
||||
on_mouse_leave: Optional[EventType[()]] = None,
|
||||
on_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[Union[EventType[()], EventType[List[Point]]]] = None,
|
||||
on_selecting: Optional[Union[EventType[()], EventType[List[Point]]]] = None,
|
||||
on_transition_interrupted: Optional[EventType[()]] = None,
|
||||
on_transitioning: Optional[EventType[()]] = None,
|
||||
on_unhover: Optional[Union[EventType[()], EventType[List[Point]]]] = None,
|
||||
on_unmount: Optional[EventType[()]] = None,
|
||||
**props,
|
||||
) -> "PlotlyFinance":
|
||||
"""Create the Plotly component.
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
data: The figure to display. This can be a plotly figure or a plotly data json.
|
||||
layout: The layout of the graph.
|
||||
template: The template for visual appearance of the graph.
|
||||
config: The config of the graph.
|
||||
use_resize_handler: If true, the graph will resize when the window is resized.
|
||||
on_after_plot: Fired after the plot is redrawn.
|
||||
on_animated: Fired after the plot was animated.
|
||||
on_animating_frame: Fired while animating a single frame (does not currently pass data through).
|
||||
on_animation_interrupted: Fired when an animation is interrupted (to start a new animation for example).
|
||||
on_autosize: Fired when the plot is responsively sized.
|
||||
on_before_hover: Fired whenever mouse moves over a plot.
|
||||
on_button_clicked: Fired when a plotly UI button is clicked.
|
||||
on_click: Fired when the plot is clicked.
|
||||
on_deselect: Fired when a selection is cleared (via double click).
|
||||
on_double_click: Fired when the plot is double clicked.
|
||||
on_hover: Fired when a plot element is hovered over.
|
||||
on_relayout: Fired after the plot is laid out (zoom, pan, etc).
|
||||
on_relayouting: Fired while the plot is being laid out.
|
||||
on_restyle: Fired after the plot style is changed.
|
||||
on_redraw: Fired after the plot is redrawn.
|
||||
on_selected: Fired after selecting plot elements.
|
||||
on_selecting: Fired while dragging a selection.
|
||||
on_transitioning: Fired while an animation is occurring.
|
||||
on_transition_interrupted: Fired when a transition is stopped early.
|
||||
on_unhover: Fired when a hovered element is no longer hovered.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: The properties of the component.
|
||||
|
||||
Returns:
|
||||
The Plotly component.
|
||||
"""
|
||||
...
|
||||
|
||||
class PlotlyStrict(Plotly):
|
||||
def add_imports(self) -> ImportDict | list[ImportDict]: ...
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
data: Optional[Union[Figure, Var[Figure]]] = None, # type: ignore
|
||||
layout: Optional[Union[Dict, Var[Dict]]] = None,
|
||||
template: Optional[Union[Template, Var[Template]]] = None, # type: ignore
|
||||
config: Optional[Union[Dict, Var[Dict]]] = None,
|
||||
use_resize_handler: Optional[Union[Var[bool], bool]] = 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, Any]]] = 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[Union[EventType[()], EventType[List[Point]]]] = 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[Union[EventType[()], EventType[List[Point]]]] = None,
|
||||
on_mount: Optional[EventType[()]] = None,
|
||||
on_mouse_down: Optional[EventType[()]] = None,
|
||||
on_mouse_enter: Optional[EventType[()]] = None,
|
||||
on_mouse_leave: Optional[EventType[()]] = None,
|
||||
on_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[Union[EventType[()], EventType[List[Point]]]] = None,
|
||||
on_selecting: Optional[Union[EventType[()], EventType[List[Point]]]] = None,
|
||||
on_transition_interrupted: Optional[EventType[()]] = None,
|
||||
on_transitioning: Optional[EventType[()]] = None,
|
||||
on_unhover: Optional[Union[EventType[()], EventType[List[Point]]]] = None,
|
||||
on_unmount: Optional[EventType[()]] = None,
|
||||
**props,
|
||||
) -> "PlotlyStrict":
|
||||
"""Create the Plotly component.
|
||||
|
||||
Args:
|
||||
*children: The children of the component.
|
||||
data: The figure to display. This can be a plotly figure or a plotly data json.
|
||||
layout: The layout of the graph.
|
||||
template: The template for visual appearance of the graph.
|
||||
config: The config of the graph.
|
||||
use_resize_handler: If true, the graph will resize when the window is resized.
|
||||
on_after_plot: Fired after the plot is redrawn.
|
||||
on_animated: Fired after the plot was animated.
|
||||
on_animating_frame: Fired while animating a single frame (does not currently pass data through).
|
||||
on_animation_interrupted: Fired when an animation is interrupted (to start a new animation for example).
|
||||
on_autosize: Fired when the plot is responsively sized.
|
||||
on_before_hover: Fired whenever mouse moves over a plot.
|
||||
on_button_clicked: Fired when a plotly UI button is clicked.
|
||||
on_click: Fired when the plot is clicked.
|
||||
on_deselect: Fired when a selection is cleared (via double click).
|
||||
on_double_click: Fired when the plot is double clicked.
|
||||
on_hover: Fired when a plot element is hovered over.
|
||||
on_relayout: Fired after the plot is laid out (zoom, pan, etc).
|
||||
on_relayouting: Fired while the plot is being laid out.
|
||||
on_restyle: Fired after the plot style is changed.
|
||||
on_redraw: Fired after the plot is redrawn.
|
||||
on_selected: Fired after selecting plot elements.
|
||||
on_selecting: Fired while dragging a selection.
|
||||
on_transitioning: Fired while an animation is occurring.
|
||||
on_transition_interrupted: Fired when a transition is stopped early.
|
||||
on_unhover: Fired when a hovered element is no longer hovered.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: The properties of the component.
|
||||
|
||||
Returns:
|
||||
The Plotly component.
|
||||
"""
|
||||
...
|
||||
|
@ -69,222 +69,45 @@ class FormRoot(FormComponent, HTMLForm):
|
||||
cls,
|
||||
*children,
|
||||
as_child: Optional[Union[Var[bool], bool]] = None,
|
||||
accept: Optional[Union[Var[str], str]] = None,
|
||||
accept_charset: Optional[Union[Var[str], str]] = None,
|
||||
action: Optional[Union[Var[str], str]] = None,
|
||||
auto_complete: Optional[Union[Var[str], str]] = None,
|
||||
enc_type: Optional[Union[Var[str], str]] = None,
|
||||
method: Optional[Union[Var[str], str]] = None,
|
||||
name: Optional[Union[Var[str], str]] = None,
|
||||
no_validate: Optional[Union[Var[bool], bool]] = None,
|
||||
target: Optional[Union[Var[str], str]] = None,
|
||||
accept: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
accept_charset: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
action: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
auto_complete: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
enc_type: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
method: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
name: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
no_validate: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
target: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
reset_on_submit: Optional[Union[Var[bool], bool]] = None,
|
||||
handle_submit_unique_name: Optional[Union[Var[str], str]] = None,
|
||||
access_key: Optional[Union[Var[str], str]] = None,
|
||||
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[
|
||||
Literal["characters", "none", "off", "on", "sentences", "words"],
|
||||
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[
|
||||
Literal["inherit", "plaintext-only", False, True],
|
||||
Var[Literal["inherit", "plaintext-only", False, True]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
context_menu: Optional[Union[Var[str], str]] = None,
|
||||
dir: Optional[Union[Var[str], str]] = None,
|
||||
draggable: Optional[Union[Var[bool], bool]] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"],
|
||||
Var[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"]
|
||||
],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
hidden: Optional[Union[Var[bool], bool]] = None,
|
||||
input_mode: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
item_prop: Optional[Union[Var[str], str]] = None,
|
||||
lang: Optional[Union[Var[str], str]] = None,
|
||||
role: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
slot: Optional[Union[Var[str], str]] = None,
|
||||
spell_check: Optional[Union[Var[bool], bool]] = None,
|
||||
tab_index: Optional[Union[Var[int], int]] = None,
|
||||
title: Optional[Union[Var[str], str]] = None,
|
||||
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
@ -718,222 +541,45 @@ class Form(FormRoot):
|
||||
cls,
|
||||
*children,
|
||||
as_child: Optional[Union[Var[bool], bool]] = None,
|
||||
accept: Optional[Union[Var[str], str]] = None,
|
||||
accept_charset: Optional[Union[Var[str], str]] = None,
|
||||
action: Optional[Union[Var[str], str]] = None,
|
||||
auto_complete: Optional[Union[Var[str], str]] = None,
|
||||
enc_type: Optional[Union[Var[str], str]] = None,
|
||||
method: Optional[Union[Var[str], str]] = None,
|
||||
name: Optional[Union[Var[str], str]] = None,
|
||||
no_validate: Optional[Union[Var[bool], bool]] = None,
|
||||
target: Optional[Union[Var[str], str]] = None,
|
||||
accept: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
accept_charset: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
action: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
auto_complete: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
enc_type: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
method: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
name: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
no_validate: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
target: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
reset_on_submit: Optional[Union[Var[bool], bool]] = None,
|
||||
handle_submit_unique_name: Optional[Union[Var[str], str]] = None,
|
||||
access_key: Optional[Union[Var[str], str]] = None,
|
||||
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[
|
||||
Literal["characters", "none", "off", "on", "sentences", "words"],
|
||||
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[
|
||||
Literal["inherit", "plaintext-only", False, True],
|
||||
Var[Literal["inherit", "plaintext-only", False, True]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
context_menu: Optional[Union[Var[str], str]] = None,
|
||||
dir: Optional[Union[Var[str], str]] = None,
|
||||
draggable: Optional[Union[Var[bool], bool]] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"],
|
||||
Var[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"]
|
||||
],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
hidden: Optional[Union[Var[bool], bool]] = None,
|
||||
input_mode: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
item_prop: Optional[Union[Var[str], str]] = None,
|
||||
lang: Optional[Union[Var[str], str]] = None,
|
||||
role: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
slot: Optional[Union[Var[str], str]] = None,
|
||||
spell_check: Optional[Union[Var[bool], bool]] = None,
|
||||
tab_index: Optional[Union[Var[int], int]] = None,
|
||||
title: Optional[Union[Var[str], str]] = None,
|
||||
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
@ -1024,222 +670,45 @@ class FormNamespace(ComponentNamespace):
|
||||
def __call__(
|
||||
*children,
|
||||
as_child: Optional[Union[Var[bool], bool]] = None,
|
||||
accept: Optional[Union[Var[str], str]] = None,
|
||||
accept_charset: Optional[Union[Var[str], str]] = None,
|
||||
action: Optional[Union[Var[str], str]] = None,
|
||||
auto_complete: Optional[Union[Var[str], str]] = None,
|
||||
enc_type: Optional[Union[Var[str], str]] = None,
|
||||
method: Optional[Union[Var[str], str]] = None,
|
||||
name: Optional[Union[Var[str], str]] = None,
|
||||
no_validate: Optional[Union[Var[bool], bool]] = None,
|
||||
target: Optional[Union[Var[str], str]] = None,
|
||||
accept: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
accept_charset: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
action: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
auto_complete: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
enc_type: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
method: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
name: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
no_validate: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
target: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
reset_on_submit: Optional[Union[Var[bool], bool]] = None,
|
||||
handle_submit_unique_name: Optional[Union[Var[str], str]] = None,
|
||||
access_key: Optional[Union[Var[str], str]] = None,
|
||||
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[
|
||||
Literal["characters", "none", "off", "on", "sentences", "words"],
|
||||
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[
|
||||
Literal["inherit", "plaintext-only", False, True],
|
||||
Var[Literal["inherit", "plaintext-only", False, True]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
context_menu: Optional[Union[Var[str], str]] = None,
|
||||
dir: Optional[Union[Var[str], str]] = None,
|
||||
draggable: Optional[Union[Var[bool], bool]] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"],
|
||||
Var[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"]
|
||||
],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
hidden: Optional[Union[Var[bool], bool]] = None,
|
||||
input_mode: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
item_prop: Optional[Union[Var[str], str]] = None,
|
||||
lang: Optional[Union[Var[str], str]] = None,
|
||||
role: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
slot: Optional[Union[Var[str], str]] = None,
|
||||
spell_check: Optional[Union[Var[bool], bool]] = None,
|
||||
tab_index: Optional[Union[Var[int], int]] = None,
|
||||
title: Optional[Union[Var[str], str]] = None,
|
||||
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
|
@ -144,7 +144,7 @@ class ColorModeIconButton(IconButton):
|
||||
|
||||
if allow_system:
|
||||
|
||||
def color_mode_item(_color_mode: Literal["light", "dark", "system"]):
|
||||
def color_mode_item(_color_mode: str):
|
||||
return dropdown_menu.item(
|
||||
_color_mode.title(), on_click=set_color_mode(_color_mode)
|
||||
)
|
||||
|
@ -172,227 +172,45 @@ class ColorModeIconButton(IconButton):
|
||||
Var[Literal["full", "large", "medium", "none", "small"]],
|
||||
]
|
||||
] = None,
|
||||
auto_focus: Optional[Union[Var[bool], bool]] = None,
|
||||
auto_focus: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
disabled: Optional[Union[Var[bool], bool]] = None,
|
||||
form: Optional[Union[Var[str], str]] = None,
|
||||
form_action: Optional[Union[Var[str], str]] = None,
|
||||
form_enc_type: Optional[Union[Var[str], str]] = None,
|
||||
form_method: Optional[Union[Var[str], str]] = None,
|
||||
form_no_validate: Optional[Union[Var[bool], bool]] = None,
|
||||
form_target: Optional[Union[Var[str], str]] = None,
|
||||
name: Optional[Union[Var[str], str]] = None,
|
||||
type: Optional[
|
||||
Union[
|
||||
Literal["button", "reset", "submit"],
|
||||
Var[Literal["button", "reset", "submit"]],
|
||||
]
|
||||
form: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
form_action: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
form_enc_type: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
value: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None,
|
||||
access_key: Optional[Union[Var[str], str]] = None,
|
||||
form_method: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
form_no_validate: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
form_target: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
name: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
type: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
value: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[
|
||||
Literal["characters", "none", "off", "on", "sentences", "words"],
|
||||
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[
|
||||
Literal["inherit", "plaintext-only", False, True],
|
||||
Var[Literal["inherit", "plaintext-only", False, True]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
context_menu: Optional[Union[Var[str], str]] = None,
|
||||
dir: Optional[Union[Var[str], str]] = None,
|
||||
draggable: Optional[Union[Var[bool], bool]] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"],
|
||||
Var[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"]
|
||||
],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
hidden: Optional[Union[Var[bool], bool]] = None,
|
||||
input_mode: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
item_prop: Optional[Union[Var[str], str]] = None,
|
||||
lang: Optional[Union[Var[str], str]] = None,
|
||||
role: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
slot: Optional[Union[Var[str], str]] = None,
|
||||
spell_check: Optional[Union[Var[bool], bool]] = None,
|
||||
tab_index: Optional[Union[Var[int], int]] = None,
|
||||
title: Optional[Union[Var[str], str]] = None,
|
||||
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
loading: Optional[Union[Var[bool], bool]] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
|
@ -130,211 +130,30 @@ class AlertDialogContent(elements.Div, RadixThemesComponent):
|
||||
]
|
||||
] = None,
|
||||
force_mount: Optional[Union[Var[bool], bool]] = None,
|
||||
access_key: Optional[Union[Var[str], str]] = None,
|
||||
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[
|
||||
Literal["characters", "none", "off", "on", "sentences", "words"],
|
||||
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[
|
||||
Literal["inherit", "plaintext-only", False, True],
|
||||
Var[Literal["inherit", "plaintext-only", False, True]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
context_menu: Optional[Union[Var[str], str]] = None,
|
||||
dir: Optional[Union[Var[str], str]] = None,
|
||||
draggable: Optional[Union[Var[bool], bool]] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"],
|
||||
Var[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"]
|
||||
],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
hidden: Optional[Union[Var[bool], bool]] = None,
|
||||
input_mode: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
item_prop: Optional[Union[Var[str], str]] = None,
|
||||
lang: Optional[Union[Var[str], str]] = None,
|
||||
role: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
slot: Optional[Union[Var[str], str]] = None,
|
||||
spell_check: Optional[Union[Var[bool], bool]] = None,
|
||||
tab_index: Optional[Union[Var[int], int]] = None,
|
||||
title: Optional[Union[Var[str], str]] = None,
|
||||
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
|
@ -105,211 +105,30 @@ class Badge(elements.Span, RadixThemesComponent):
|
||||
Var[Literal["full", "large", "medium", "none", "small"]],
|
||||
]
|
||||
] = None,
|
||||
access_key: Optional[Union[Var[str], str]] = None,
|
||||
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[
|
||||
Literal["characters", "none", "off", "on", "sentences", "words"],
|
||||
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[
|
||||
Literal["inherit", "plaintext-only", False, True],
|
||||
Var[Literal["inherit", "plaintext-only", False, True]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
context_menu: Optional[Union[Var[str], str]] = None,
|
||||
dir: Optional[Union[Var[str], str]] = None,
|
||||
draggable: Optional[Union[Var[bool], bool]] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"],
|
||||
Var[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"]
|
||||
],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
hidden: Optional[Union[Var[bool], bool]] = None,
|
||||
input_mode: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
item_prop: Optional[Union[Var[str], str]] = None,
|
||||
lang: Optional[Union[Var[str], str]] = None,
|
||||
role: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
slot: Optional[Union[Var[str], str]] = None,
|
||||
spell_check: Optional[Union[Var[bool], bool]] = None,
|
||||
tab_index: Optional[Union[Var[int], int]] = None,
|
||||
title: Optional[Union[Var[str], str]] = None,
|
||||
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
|
@ -109,227 +109,45 @@ class Button(elements.Button, RadixLoadingProp, RadixThemesComponent):
|
||||
Var[Literal["full", "large", "medium", "none", "small"]],
|
||||
]
|
||||
] = None,
|
||||
auto_focus: Optional[Union[Var[bool], bool]] = None,
|
||||
auto_focus: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
disabled: Optional[Union[Var[bool], bool]] = None,
|
||||
form: Optional[Union[Var[str], str]] = None,
|
||||
form_action: Optional[Union[Var[str], str]] = None,
|
||||
form_enc_type: Optional[Union[Var[str], str]] = None,
|
||||
form_method: Optional[Union[Var[str], str]] = None,
|
||||
form_no_validate: Optional[Union[Var[bool], bool]] = None,
|
||||
form_target: Optional[Union[Var[str], str]] = None,
|
||||
name: Optional[Union[Var[str], str]] = None,
|
||||
type: Optional[
|
||||
Union[
|
||||
Literal["button", "reset", "submit"],
|
||||
Var[Literal["button", "reset", "submit"]],
|
||||
]
|
||||
form: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
form_action: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
form_enc_type: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
value: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None,
|
||||
access_key: Optional[Union[Var[str], str]] = None,
|
||||
form_method: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
form_no_validate: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
form_target: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
name: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
type: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
value: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[
|
||||
Literal["characters", "none", "off", "on", "sentences", "words"],
|
||||
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[
|
||||
Literal["inherit", "plaintext-only", False, True],
|
||||
Var[Literal["inherit", "plaintext-only", False, True]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
context_menu: Optional[Union[Var[str], str]] = None,
|
||||
dir: Optional[Union[Var[str], str]] = None,
|
||||
draggable: Optional[Union[Var[bool], bool]] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"],
|
||||
Var[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"]
|
||||
],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
hidden: Optional[Union[Var[bool], bool]] = None,
|
||||
input_mode: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
item_prop: Optional[Union[Var[str], str]] = None,
|
||||
lang: Optional[Union[Var[str], str]] = None,
|
||||
role: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
slot: Optional[Union[Var[str], str]] = None,
|
||||
spell_check: Optional[Union[Var[bool], bool]] = None,
|
||||
tab_index: Optional[Union[Var[int], int]] = None,
|
||||
title: Optional[Union[Var[str], str]] = None,
|
||||
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
loading: Optional[Union[Var[bool], bool]] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -38,211 +38,30 @@ class Card(elements.Div, RadixThemesComponent):
|
||||
Var[Literal["classic", "ghost", "surface"]],
|
||||
]
|
||||
] = None,
|
||||
access_key: Optional[Union[Var[str], str]] = None,
|
||||
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[
|
||||
Literal["characters", "none", "off", "on", "sentences", "words"],
|
||||
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[
|
||||
Literal["inherit", "plaintext-only", False, True],
|
||||
Var[Literal["inherit", "plaintext-only", False, True]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
context_menu: Optional[Union[Var[str], str]] = None,
|
||||
dir: Optional[Union[Var[str], str]] = None,
|
||||
draggable: Optional[Union[Var[bool], bool]] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"],
|
||||
Var[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"]
|
||||
],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
hidden: Optional[Union[Var[bool], bool]] = None,
|
||||
input_mode: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
item_prop: Optional[Union[Var[str], str]] = None,
|
||||
lang: Optional[Union[Var[str], str]] = None,
|
||||
role: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
slot: Optional[Union[Var[str], str]] = None,
|
||||
spell_check: Optional[Union[Var[bool], bool]] = None,
|
||||
tab_index: Optional[Union[Var[int], int]] = None,
|
||||
title: Optional[Union[Var[str], str]] = None,
|
||||
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
|
@ -10,7 +10,6 @@ from reflex.vars.base import Var
|
||||
|
||||
from ..base import LiteralAccentColor, RadixThemesComponent
|
||||
from .checkbox import Checkbox
|
||||
from .radio_group import HighLevelRadioGroup
|
||||
|
||||
LiteralDirType = Literal["ltr", "rtl"]
|
||||
|
||||
@ -227,11 +226,7 @@ class ContextMenuItem(RadixThemesComponent):
|
||||
# Optional text used for typeahead purposes. By default the typeahead behavior will use the content of the item. Use this when the content is complex, or you have non-textual content inside.
|
||||
text_value: Var[str]
|
||||
|
||||
_valid_parents: List[str] = [
|
||||
"ContextMenuContent",
|
||||
"ContextMenuSubContent",
|
||||
"ContextMenuGroup",
|
||||
]
|
||||
_valid_parents: List[str] = ["ContextMenuContent", "ContextMenuSubContent"]
|
||||
|
||||
# Fired when the item is selected.
|
||||
on_select: EventHandler[no_args_event_spec]
|
||||
@ -252,75 +247,6 @@ class ContextMenuCheckbox(Checkbox):
|
||||
shortcut: Var[str]
|
||||
|
||||
|
||||
class ContextMenuLabel(RadixThemesComponent):
|
||||
"""The component that contains the label."""
|
||||
|
||||
tag = "ContextMenu.Label"
|
||||
|
||||
# Change the default rendered element for the one passed as a child, merging their props and behavior. Defaults to False.
|
||||
as_child: Var[bool]
|
||||
|
||||
|
||||
class ContextMenuGroup(RadixThemesComponent):
|
||||
"""The component that contains the group."""
|
||||
|
||||
tag = "ContextMenu.Group"
|
||||
|
||||
# Change the default rendered element for the one passed as a child, merging their props and behavior. Defaults to False.
|
||||
as_child: Var[bool]
|
||||
|
||||
_valid_parents: List[str] = ["ContextMenuContent", "ContextMenuSubContent"]
|
||||
|
||||
|
||||
class ContextMenuRadioGroup(RadixThemesComponent):
|
||||
"""The component that contains context menu radio items."""
|
||||
|
||||
tag = "ContextMenu.RadioGroup"
|
||||
|
||||
# Change the default rendered element for the one passed as a child, merging their props and behavior. Defaults to False.
|
||||
as_child: Var[bool]
|
||||
|
||||
# The value of the selected item in the group.
|
||||
value: Var[str]
|
||||
|
||||
# Props to rename
|
||||
_rename_props = {"onChange": "onValueChange"}
|
||||
|
||||
# Fired when the value of the radio group changes.
|
||||
on_change: EventHandler[passthrough_event_spec(str)]
|
||||
|
||||
_valid_parents: List[str] = [
|
||||
"ContextMenuRadioItem",
|
||||
"ContextMenuSubContent",
|
||||
"ContextMenuContent",
|
||||
"ContextMenuSub",
|
||||
]
|
||||
|
||||
|
||||
class ContextMenuRadioItem(HighLevelRadioGroup):
|
||||
"""The component that contains context menu radio items."""
|
||||
|
||||
tag = "ContextMenu.RadioItem"
|
||||
|
||||
# Override theme color for Dropdown Menu Content
|
||||
color_scheme: Var[LiteralAccentColor]
|
||||
|
||||
# Change the default rendered element for the one passed as a child, merging their props and behavior. Defaults to False.
|
||||
as_child: Var[bool]
|
||||
|
||||
# The unique value of the item.
|
||||
value: Var[str]
|
||||
|
||||
# When true, prevents the user from interacting with the item.
|
||||
disabled: Var[bool]
|
||||
|
||||
# Event handler called when the user selects an item (via mouse or keyboard). Calling event.preventDefault in this handler will prevent the context menu from closing when selecting that item.
|
||||
on_select: EventHandler[no_args_event_spec]
|
||||
|
||||
# Optional text used for typeahead purposes. By default the typeahead behavior will use the .textContent of the item. Use this when the content is complex, or you have non-textual content inside.
|
||||
text_value: Var[str]
|
||||
|
||||
|
||||
class ContextMenu(ComponentNamespace):
|
||||
"""Menu representing a set of actions, displayed at the origin of a pointer right-click or long-press."""
|
||||
|
||||
@ -333,10 +259,6 @@ class ContextMenu(ComponentNamespace):
|
||||
item = staticmethod(ContextMenuItem.create)
|
||||
separator = staticmethod(ContextMenuSeparator.create)
|
||||
checkbox = staticmethod(ContextMenuCheckbox.create)
|
||||
label = staticmethod(ContextMenuLabel.create)
|
||||
group = staticmethod(ContextMenuGroup.create)
|
||||
radio_group = staticmethod(ContextMenuRadioGroup.create)
|
||||
radio = staticmethod(ContextMenuRadioItem.create)
|
||||
|
||||
|
||||
context_menu = ContextMenu()
|
||||
|
@ -3,7 +3,7 @@
|
||||
# ------------------- DO NOT EDIT ----------------------
|
||||
# This file was generated by `reflex/utils/pyi_generator.py`!
|
||||
# ------------------------------------------------------
|
||||
from typing import Any, Dict, List, 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
|
||||
@ -13,7 +13,6 @@ from reflex.vars.base import Var
|
||||
|
||||
from ..base import RadixThemesComponent
|
||||
from .checkbox import Checkbox
|
||||
from .radio_group import HighLevelRadioGroup
|
||||
|
||||
LiteralDirType = Literal["ltr", "rtl"]
|
||||
LiteralSizeType = Literal["1", "2"]
|
||||
@ -821,320 +820,6 @@ class ContextMenuCheckbox(Checkbox):
|
||||
"""
|
||||
...
|
||||
|
||||
class ContextMenuLabel(RadixThemesComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
as_child: Optional[Union[Var[bool], bool]] = 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, Any]]] = None,
|
||||
on_blur: Optional[EventType[()]] = None,
|
||||
on_click: Optional[EventType[()]] = None,
|
||||
on_context_menu: Optional[EventType[()]] = None,
|
||||
on_double_click: Optional[EventType[()]] = None,
|
||||
on_focus: Optional[EventType[()]] = None,
|
||||
on_mount: Optional[EventType[()]] = None,
|
||||
on_mouse_down: Optional[EventType[()]] = None,
|
||||
on_mouse_enter: Optional[EventType[()]] = None,
|
||||
on_mouse_leave: Optional[EventType[()]] = None,
|
||||
on_mouse_move: Optional[EventType[()]] = None,
|
||||
on_mouse_out: Optional[EventType[()]] = None,
|
||||
on_mouse_over: Optional[EventType[()]] = None,
|
||||
on_mouse_up: Optional[EventType[()]] = None,
|
||||
on_scroll: Optional[EventType[()]] = None,
|
||||
on_unmount: Optional[EventType[()]] = None,
|
||||
**props,
|
||||
) -> "ContextMenuLabel":
|
||||
"""Create a new component instance.
|
||||
|
||||
Will prepend "RadixThemes" to the component tag to avoid conflicts with
|
||||
other UI libraries for common names, like Text and Button.
|
||||
|
||||
Args:
|
||||
*children: Child components.
|
||||
as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. Defaults to False.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: Component properties.
|
||||
|
||||
Returns:
|
||||
A new component instance.
|
||||
"""
|
||||
...
|
||||
|
||||
class ContextMenuGroup(RadixThemesComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
as_child: Optional[Union[Var[bool], bool]] = 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, Any]]] = None,
|
||||
on_blur: Optional[EventType[()]] = None,
|
||||
on_click: Optional[EventType[()]] = None,
|
||||
on_context_menu: Optional[EventType[()]] = None,
|
||||
on_double_click: Optional[EventType[()]] = None,
|
||||
on_focus: Optional[EventType[()]] = None,
|
||||
on_mount: Optional[EventType[()]] = None,
|
||||
on_mouse_down: Optional[EventType[()]] = None,
|
||||
on_mouse_enter: Optional[EventType[()]] = None,
|
||||
on_mouse_leave: Optional[EventType[()]] = None,
|
||||
on_mouse_move: Optional[EventType[()]] = None,
|
||||
on_mouse_out: Optional[EventType[()]] = None,
|
||||
on_mouse_over: Optional[EventType[()]] = None,
|
||||
on_mouse_up: Optional[EventType[()]] = None,
|
||||
on_scroll: Optional[EventType[()]] = None,
|
||||
on_unmount: Optional[EventType[()]] = None,
|
||||
**props,
|
||||
) -> "ContextMenuGroup":
|
||||
"""Create a new component instance.
|
||||
|
||||
Will prepend "RadixThemes" to the component tag to avoid conflicts with
|
||||
other UI libraries for common names, like Text and Button.
|
||||
|
||||
Args:
|
||||
*children: Child components.
|
||||
as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. Defaults to False.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: Component properties.
|
||||
|
||||
Returns:
|
||||
A new component instance.
|
||||
"""
|
||||
...
|
||||
|
||||
class ContextMenuRadioGroup(RadixThemesComponent):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
as_child: Optional[Union[Var[bool], bool]] = None,
|
||||
value: Optional[Union[Var[str], 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, Any]]] = None,
|
||||
on_blur: Optional[EventType[()]] = None,
|
||||
on_change: Optional[Union[EventType[()], 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,
|
||||
) -> "ContextMenuRadioGroup":
|
||||
"""Create a new component instance.
|
||||
|
||||
Will prepend "RadixThemes" to the component tag to avoid conflicts with
|
||||
other UI libraries for common names, like Text and Button.
|
||||
|
||||
Args:
|
||||
*children: Child components.
|
||||
as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. Defaults to False.
|
||||
value: The value of the selected item in the group.
|
||||
on_change: Fired when the value of the radio group changes.
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: Component properties.
|
||||
|
||||
Returns:
|
||||
A new component instance.
|
||||
"""
|
||||
...
|
||||
|
||||
class ContextMenuRadioItem(HighLevelRadioGroup):
|
||||
@overload
|
||||
@classmethod
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
color_scheme: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"amber",
|
||||
"blue",
|
||||
"bronze",
|
||||
"brown",
|
||||
"crimson",
|
||||
"cyan",
|
||||
"gold",
|
||||
"grass",
|
||||
"gray",
|
||||
"green",
|
||||
"indigo",
|
||||
"iris",
|
||||
"jade",
|
||||
"lime",
|
||||
"mint",
|
||||
"orange",
|
||||
"pink",
|
||||
"plum",
|
||||
"purple",
|
||||
"red",
|
||||
"ruby",
|
||||
"sky",
|
||||
"teal",
|
||||
"tomato",
|
||||
"violet",
|
||||
"yellow",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"amber",
|
||||
"blue",
|
||||
"bronze",
|
||||
"brown",
|
||||
"crimson",
|
||||
"cyan",
|
||||
"gold",
|
||||
"grass",
|
||||
"gray",
|
||||
"green",
|
||||
"indigo",
|
||||
"iris",
|
||||
"jade",
|
||||
"lime",
|
||||
"mint",
|
||||
"orange",
|
||||
"pink",
|
||||
"plum",
|
||||
"purple",
|
||||
"red",
|
||||
"ruby",
|
||||
"sky",
|
||||
"teal",
|
||||
"tomato",
|
||||
"violet",
|
||||
"yellow",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
as_child: Optional[Union[Var[bool], bool]] = None,
|
||||
value: Optional[Union[Var[str], str]] = None,
|
||||
disabled: Optional[Union[Var[bool], bool]] = None,
|
||||
text_value: Optional[Union[Var[str], str]] = None,
|
||||
items: Optional[Union[List[str], Var[List[str]]]] = None,
|
||||
direction: Optional[
|
||||
Union[
|
||||
Literal["column", "column-reverse", "row", "row-reverse"],
|
||||
Var[Literal["column", "column-reverse", "row", "row-reverse"]],
|
||||
]
|
||||
] = None,
|
||||
spacing: Optional[
|
||||
Union[
|
||||
Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
|
||||
Var[Literal["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]],
|
||||
]
|
||||
] = None,
|
||||
size: Optional[
|
||||
Union[Literal["1", "2", "3"], Var[Literal["1", "2", "3"]]]
|
||||
] = None,
|
||||
variant: Optional[
|
||||
Union[
|
||||
Literal["classic", "soft", "surface"],
|
||||
Var[Literal["classic", "soft", "surface"]],
|
||||
]
|
||||
] = None,
|
||||
high_contrast: Optional[Union[Var[bool], bool]] = None,
|
||||
default_value: Optional[Union[Var[str], str]] = None,
|
||||
name: Optional[Union[Var[str], str]] = None,
|
||||
required: Optional[Union[Var[bool], bool]] = 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, Any]]] = None,
|
||||
on_blur: Optional[EventType[()]] = None,
|
||||
on_click: Optional[EventType[()]] = None,
|
||||
on_context_menu: Optional[EventType[()]] = None,
|
||||
on_double_click: Optional[EventType[()]] = None,
|
||||
on_focus: Optional[EventType[()]] = None,
|
||||
on_mount: Optional[EventType[()]] = None,
|
||||
on_mouse_down: Optional[EventType[()]] = None,
|
||||
on_mouse_enter: Optional[EventType[()]] = None,
|
||||
on_mouse_leave: Optional[EventType[()]] = None,
|
||||
on_mouse_move: Optional[EventType[()]] = None,
|
||||
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,
|
||||
) -> "ContextMenuRadioItem":
|
||||
"""Create a radio group component.
|
||||
|
||||
Args:
|
||||
items: The items of the radio group.
|
||||
color_scheme: The color of the radio group
|
||||
as_child: Change the default rendered element for the one passed as a child, merging their props and behavior. Defaults to False.
|
||||
value: The controlled value of the radio item to check. Should be used in conjunction with on_change.
|
||||
disabled: Whether the radio group is disabled
|
||||
on_select: Event handler called when the user selects an item (via mouse or keyboard). Calling event.preventDefault in this handler will prevent the context menu from closing when selecting that item.
|
||||
text_value: Optional text used for typeahead purposes. By default the typeahead behavior will use the .textContent of the item. Use this when the content is complex, or you have non-textual content inside.
|
||||
items: The items of the radio group.
|
||||
direction: The direction of the radio group.
|
||||
spacing: The gap between the items of the radio group.
|
||||
size: The size of the radio group.
|
||||
variant: The variant of the radio group
|
||||
high_contrast: Whether to render the radio group with higher contrast color against background
|
||||
default_value: The initial value of checked radio item. Should be used in conjunction with on_change.
|
||||
name: The name of the group. Submitted with its owning form as part of a name/value pair.
|
||||
required: Whether the radio group is required
|
||||
style: The style of the component.
|
||||
key: A unique key for the component.
|
||||
id: The id for the component.
|
||||
class_name: The class name for the component.
|
||||
autofocus: Whether the component should take the focus once the page is loaded
|
||||
custom_attrs: custom attribute
|
||||
**props: Additional properties to apply to the accordion item.
|
||||
|
||||
Returns:
|
||||
The created radio group component.
|
||||
|
||||
Raises:
|
||||
TypeError: If the type of items is invalid.
|
||||
"""
|
||||
...
|
||||
|
||||
class ContextMenu(ComponentNamespace):
|
||||
root = staticmethod(ContextMenuRoot.create)
|
||||
trigger = staticmethod(ContextMenuTrigger.create)
|
||||
@ -1145,9 +830,5 @@ class ContextMenu(ComponentNamespace):
|
||||
item = staticmethod(ContextMenuItem.create)
|
||||
separator = staticmethod(ContextMenuSeparator.create)
|
||||
checkbox = staticmethod(ContextMenuCheckbox.create)
|
||||
label = staticmethod(ContextMenuLabel.create)
|
||||
group = staticmethod(ContextMenuGroup.create)
|
||||
radio_group = staticmethod(ContextMenuRadioGroup.create)
|
||||
radio = staticmethod(ContextMenuRadioItem.create)
|
||||
|
||||
context_menu = ContextMenu()
|
||||
|
@ -176,211 +176,30 @@ class DialogContent(elements.Div, RadixThemesComponent):
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
access_key: Optional[Union[Var[str], str]] = None,
|
||||
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[
|
||||
Literal["characters", "none", "off", "on", "sentences", "words"],
|
||||
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[
|
||||
Literal["inherit", "plaintext-only", False, True],
|
||||
Var[Literal["inherit", "plaintext-only", False, True]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
context_menu: Optional[Union[Var[str], str]] = None,
|
||||
dir: Optional[Union[Var[str], str]] = None,
|
||||
draggable: Optional[Union[Var[bool], bool]] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"],
|
||||
Var[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"]
|
||||
],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
hidden: Optional[Union[Var[bool], bool]] = None,
|
||||
input_mode: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
item_prop: Optional[Union[Var[str], str]] = None,
|
||||
lang: Optional[Union[Var[str], str]] = None,
|
||||
role: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
slot: Optional[Union[Var[str], str]] = None,
|
||||
spell_check: Optional[Union[Var[bool], bool]] = None,
|
||||
tab_index: Optional[Union[Var[int], int]] = None,
|
||||
title: Optional[Union[Var[str], str]] = None,
|
||||
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
|
@ -163,211 +163,30 @@ class HoverCardContent(elements.Div, RadixThemesComponent):
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
access_key: Optional[Union[Var[str], str]] = None,
|
||||
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[
|
||||
Literal["characters", "none", "off", "on", "sentences", "words"],
|
||||
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[
|
||||
Literal["inherit", "plaintext-only", False, True],
|
||||
Var[Literal["inherit", "plaintext-only", False, True]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
context_menu: Optional[Union[Var[str], str]] = None,
|
||||
dir: Optional[Union[Var[str], str]] = None,
|
||||
draggable: Optional[Union[Var[bool], bool]] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"],
|
||||
Var[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"]
|
||||
],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
hidden: Optional[Union[Var[bool], bool]] = None,
|
||||
input_mode: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
item_prop: Optional[Union[Var[str], str]] = None,
|
||||
lang: Optional[Union[Var[str], str]] = None,
|
||||
role: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
slot: Optional[Union[Var[str], str]] = None,
|
||||
spell_check: Optional[Union[Var[bool], bool]] = None,
|
||||
tab_index: Optional[Union[Var[int], int]] = None,
|
||||
title: Optional[Union[Var[str], str]] = None,
|
||||
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
|
@ -110,227 +110,45 @@ class IconButton(elements.Button, RadixLoadingProp, RadixThemesComponent):
|
||||
Var[Literal["full", "large", "medium", "none", "small"]],
|
||||
]
|
||||
] = None,
|
||||
auto_focus: Optional[Union[Var[bool], bool]] = None,
|
||||
auto_focus: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
disabled: Optional[Union[Var[bool], bool]] = None,
|
||||
form: Optional[Union[Var[str], str]] = None,
|
||||
form_action: Optional[Union[Var[str], str]] = None,
|
||||
form_enc_type: Optional[Union[Var[str], str]] = None,
|
||||
form_method: Optional[Union[Var[str], str]] = None,
|
||||
form_no_validate: Optional[Union[Var[bool], bool]] = None,
|
||||
form_target: Optional[Union[Var[str], str]] = None,
|
||||
name: Optional[Union[Var[str], str]] = None,
|
||||
type: Optional[
|
||||
Union[
|
||||
Literal["button", "reset", "submit"],
|
||||
Var[Literal["button", "reset", "submit"]],
|
||||
]
|
||||
form: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
form_action: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
form_enc_type: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
value: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None,
|
||||
access_key: Optional[Union[Var[str], str]] = None,
|
||||
form_method: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
form_no_validate: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
form_target: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
name: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
type: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
value: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[
|
||||
Literal["characters", "none", "off", "on", "sentences", "words"],
|
||||
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[
|
||||
Literal["inherit", "plaintext-only", False, True],
|
||||
Var[Literal["inherit", "plaintext-only", False, True]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
context_menu: Optional[Union[Var[str], str]] = None,
|
||||
dir: Optional[Union[Var[str], str]] = None,
|
||||
draggable: Optional[Union[Var[bool], bool]] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"],
|
||||
Var[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"]
|
||||
],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
hidden: Optional[Union[Var[bool], bool]] = None,
|
||||
input_mode: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
item_prop: Optional[Union[Var[str], str]] = None,
|
||||
lang: Optional[Union[Var[str], str]] = None,
|
||||
role: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
slot: Optional[Union[Var[str], str]] = None,
|
||||
spell_check: Optional[Union[Var[bool], bool]] = None,
|
||||
tab_index: Optional[Union[Var[int], int]] = None,
|
||||
title: Optional[Union[Var[str], str]] = None,
|
||||
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
loading: Optional[Union[Var[bool], bool]] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
|
@ -103,211 +103,30 @@ class Inset(elements.Div, RadixThemesComponent):
|
||||
str,
|
||||
]
|
||||
] = None,
|
||||
access_key: Optional[Union[Var[str], str]] = None,
|
||||
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[
|
||||
Literal["characters", "none", "off", "on", "sentences", "words"],
|
||||
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[
|
||||
Literal["inherit", "plaintext-only", False, True],
|
||||
Var[Literal["inherit", "plaintext-only", False, True]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
context_menu: Optional[Union[Var[str], str]] = None,
|
||||
dir: Optional[Union[Var[str], str]] = None,
|
||||
draggable: Optional[Union[Var[bool], bool]] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"],
|
||||
Var[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"]
|
||||
],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
hidden: Optional[Union[Var[bool], bool]] = None,
|
||||
input_mode: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
item_prop: Optional[Union[Var[str], str]] = None,
|
||||
lang: Optional[Union[Var[str], str]] = None,
|
||||
role: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
slot: Optional[Union[Var[str], str]] = None,
|
||||
spell_check: Optional[Union[Var[bool], bool]] = None,
|
||||
tab_index: Optional[Union[Var[int], int]] = None,
|
||||
title: Optional[Union[Var[str], str]] = None,
|
||||
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
|
@ -156,211 +156,30 @@ class PopoverContent(elements.Div, RadixThemesComponent):
|
||||
Union[Literal["always", "partial"], Var[Literal["always", "partial"]]]
|
||||
] = None,
|
||||
hide_when_detached: Optional[Union[Var[bool], bool]] = None,
|
||||
access_key: Optional[Union[Var[str], str]] = None,
|
||||
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[
|
||||
Literal["characters", "none", "off", "on", "sentences", "words"],
|
||||
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[
|
||||
Literal["inherit", "plaintext-only", False, True],
|
||||
Var[Literal["inherit", "plaintext-only", False, True]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
context_menu: Optional[Union[Var[str], str]] = None,
|
||||
dir: Optional[Union[Var[str], str]] = None,
|
||||
draggable: Optional[Union[Var[bool], bool]] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"],
|
||||
Var[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"]
|
||||
],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
hidden: Optional[Union[Var[bool], bool]] = None,
|
||||
input_mode: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
item_prop: Optional[Union[Var[str], str]] = None,
|
||||
lang: Optional[Union[Var[str], str]] = None,
|
||||
role: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
slot: Optional[Union[Var[str], str]] = None,
|
||||
spell_check: Optional[Union[Var[bool], bool]] = None,
|
||||
tab_index: Optional[Union[Var[int], int]] = None,
|
||||
title: Optional[Union[Var[str], str]] = None,
|
||||
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
||||
"""Interactive components provided by @radix-ui/themes."""
|
||||
|
||||
from typing import Literal
|
||||
from typing import Literal, Union
|
||||
|
||||
from reflex.components.component import Component
|
||||
from reflex.components.core.breakpoints import Responsive
|
||||
@ -51,7 +51,7 @@ class TextArea(RadixThemesComponent, elements.Textarea):
|
||||
disabled: Var[bool]
|
||||
|
||||
# Associates the textarea with a form (by id)
|
||||
form: Var[str]
|
||||
form: Var[Union[str, int, bool]]
|
||||
|
||||
# Maximum number of characters allowed in the textarea
|
||||
max_length: Var[int]
|
||||
|
@ -126,7 +126,7 @@ class TextArea(RadixThemesComponent, elements.Textarea):
|
||||
default_value: Optional[Union[Var[str], str]] = None,
|
||||
dirname: Optional[Union[Var[str], str]] = None,
|
||||
disabled: Optional[Union[Var[bool], bool]] = None,
|
||||
form: Optional[Union[Var[str], str]] = None,
|
||||
form: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
max_length: Optional[Union[Var[int], int]] = None,
|
||||
min_length: Optional[Union[Var[int], int]] = None,
|
||||
name: Optional[Union[Var[str], str]] = None,
|
||||
@ -137,213 +137,32 @@ class TextArea(RadixThemesComponent, elements.Textarea):
|
||||
value: Optional[Union[Var[str], str]] = None,
|
||||
wrap: Optional[Union[Var[str], str]] = None,
|
||||
auto_height: Optional[Union[Var[bool], bool]] = None,
|
||||
cols: Optional[Union[Var[int], int]] = None,
|
||||
cols: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
enter_key_submit: Optional[Union[Var[bool], bool]] = None,
|
||||
access_key: Optional[Union[Var[str], str]] = None,
|
||||
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[
|
||||
Literal["characters", "none", "off", "on", "sentences", "words"],
|
||||
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[
|
||||
Literal["inherit", "plaintext-only", False, True],
|
||||
Var[Literal["inherit", "plaintext-only", False, True]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
context_menu: Optional[Union[Var[str], str]] = None,
|
||||
dir: Optional[Union[Var[str], str]] = None,
|
||||
draggable: Optional[Union[Var[bool], bool]] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"],
|
||||
Var[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"]
|
||||
],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
hidden: Optional[Union[Var[bool], bool]] = None,
|
||||
input_mode: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
item_prop: Optional[Union[Var[str], str]] = None,
|
||||
lang: Optional[Union[Var[str], str]] = None,
|
||||
role: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
slot: Optional[Union[Var[str], str]] = None,
|
||||
spell_check: Optional[Union[Var[bool], bool]] = None,
|
||||
tab_index: Optional[Union[Var[int], int]] = None,
|
||||
title: Optional[Union[Var[str], str]] = None,
|
||||
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
|
@ -70,7 +70,7 @@ class TextFieldRoot(elements.Input, RadixThemesComponent):
|
||||
value: Var[Union[str, int, float]]
|
||||
|
||||
# References a datalist for suggested options
|
||||
list: Var[str]
|
||||
list: Var[Union[str, int, bool]]
|
||||
|
||||
# Fired when the value of the textarea changes.
|
||||
on_change: EventHandler[input_event]
|
||||
|
@ -119,235 +119,55 @@ class TextFieldRoot(elements.Input, RadixThemesComponent):
|
||||
required: Optional[Union[Var[bool], bool]] = None,
|
||||
type: Optional[Union[Var[str], str]] = None,
|
||||
value: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None,
|
||||
list: Optional[Union[Var[str], str]] = None,
|
||||
accept: Optional[Union[Var[str], str]] = None,
|
||||
alt: Optional[Union[Var[str], str]] = None,
|
||||
auto_focus: Optional[Union[Var[bool], bool]] = None,
|
||||
capture: Optional[
|
||||
Union[
|
||||
Literal["environment", "user", False, True],
|
||||
Var[Literal["environment", "user", False, True]],
|
||||
]
|
||||
] = None,
|
||||
checked: Optional[Union[Var[bool], bool]] = None,
|
||||
list: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
accept: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
alt: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
auto_focus: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
capture: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
checked: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
default_checked: Optional[Union[Var[bool], bool]] = None,
|
||||
form: Optional[Union[Var[str], str]] = None,
|
||||
form_action: Optional[Union[Var[str], str]] = None,
|
||||
form_enc_type: Optional[Union[Var[str], str]] = None,
|
||||
form_method: Optional[Union[Var[str], str]] = None,
|
||||
form_no_validate: Optional[Union[Var[bool], bool]] = None,
|
||||
form_target: Optional[Union[Var[str], str]] = None,
|
||||
max: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None,
|
||||
min: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None,
|
||||
multiple: Optional[Union[Var[bool], bool]] = None,
|
||||
pattern: Optional[Union[Var[str], str]] = None,
|
||||
src: Optional[Union[Var[str], str]] = None,
|
||||
step: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None,
|
||||
access_key: Optional[Union[Var[str], str]] = None,
|
||||
dirname: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
form: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
form_action: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
form_enc_type: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
form_method: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
form_no_validate: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
form_target: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
max: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
min: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
multiple: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
pattern: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
src: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
step: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
use_map: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[
|
||||
Literal["characters", "none", "off", "on", "sentences", "words"],
|
||||
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[
|
||||
Literal["inherit", "plaintext-only", False, True],
|
||||
Var[Literal["inherit", "plaintext-only", False, True]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
context_menu: Optional[Union[Var[str], str]] = None,
|
||||
dir: Optional[Union[Var[str], str]] = None,
|
||||
draggable: Optional[Union[Var[bool], bool]] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"],
|
||||
Var[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"]
|
||||
],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
hidden: Optional[Union[Var[bool], bool]] = None,
|
||||
input_mode: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
item_prop: Optional[Union[Var[str], str]] = None,
|
||||
lang: Optional[Union[Var[str], str]] = None,
|
||||
role: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
slot: Optional[Union[Var[str], str]] = None,
|
||||
spell_check: Optional[Union[Var[bool], bool]] = None,
|
||||
tab_index: Optional[Union[Var[int], int]] = None,
|
||||
title: Optional[Union[Var[str], str]] = None,
|
||||
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
@ -409,6 +229,7 @@ class TextFieldRoot(elements.Input, RadixThemesComponent):
|
||||
capture: Captures media from the user (camera or microphone)
|
||||
checked: Indicates whether the input is checked (for checkboxes and radio buttons)
|
||||
default_checked: The initial value (for checkboxes and radio buttons)
|
||||
dirname: Name part of the input to submit in 'dir' and 'name' pair when form is submitted
|
||||
form: Associates the input with a form (by id)
|
||||
form_action: URL to send the form data to (for type="submit" buttons)
|
||||
form_enc_type: How the form data should be encoded when submitting to the server (for type="submit" buttons)
|
||||
@ -421,6 +242,7 @@ class TextFieldRoot(elements.Input, RadixThemesComponent):
|
||||
pattern: Regex pattern the input's value must match to be valid
|
||||
src: URL for image inputs
|
||||
step: Specifies the legal number intervals for an input
|
||||
use_map: Name of the image map used with the input
|
||||
access_key: Provides a hint for generating a keyboard shortcut for the current element.
|
||||
auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
||||
content_editable: Indicates whether the element's content is editable.
|
||||
@ -664,235 +486,55 @@ class TextField(ComponentNamespace):
|
||||
required: Optional[Union[Var[bool], bool]] = None,
|
||||
type: Optional[Union[Var[str], str]] = None,
|
||||
value: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None,
|
||||
list: Optional[Union[Var[str], str]] = None,
|
||||
accept: Optional[Union[Var[str], str]] = None,
|
||||
alt: Optional[Union[Var[str], str]] = None,
|
||||
auto_focus: Optional[Union[Var[bool], bool]] = None,
|
||||
capture: Optional[
|
||||
Union[
|
||||
Literal["environment", "user", False, True],
|
||||
Var[Literal["environment", "user", False, True]],
|
||||
]
|
||||
] = None,
|
||||
checked: Optional[Union[Var[bool], bool]] = None,
|
||||
list: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
accept: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
alt: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
auto_focus: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
capture: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
checked: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
default_checked: Optional[Union[Var[bool], bool]] = None,
|
||||
form: Optional[Union[Var[str], str]] = None,
|
||||
form_action: Optional[Union[Var[str], str]] = None,
|
||||
form_enc_type: Optional[Union[Var[str], str]] = None,
|
||||
form_method: Optional[Union[Var[str], str]] = None,
|
||||
form_no_validate: Optional[Union[Var[bool], bool]] = None,
|
||||
form_target: Optional[Union[Var[str], str]] = None,
|
||||
max: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None,
|
||||
min: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None,
|
||||
multiple: Optional[Union[Var[bool], bool]] = None,
|
||||
pattern: Optional[Union[Var[str], str]] = None,
|
||||
src: Optional[Union[Var[str], str]] = None,
|
||||
step: Optional[Union[Var[Union[float, int, str]], float, int, str]] = None,
|
||||
access_key: Optional[Union[Var[str], str]] = None,
|
||||
dirname: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
form: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
form_action: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
form_enc_type: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
form_method: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
form_no_validate: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
form_target: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
max: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
min: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
multiple: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
pattern: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
src: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
step: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
use_map: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[
|
||||
Literal["characters", "none", "off", "on", "sentences", "words"],
|
||||
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[
|
||||
Literal["inherit", "plaintext-only", False, True],
|
||||
Var[Literal["inherit", "plaintext-only", False, True]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
context_menu: Optional[Union[Var[str], str]] = None,
|
||||
dir: Optional[Union[Var[str], str]] = None,
|
||||
draggable: Optional[Union[Var[bool], bool]] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"],
|
||||
Var[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"]
|
||||
],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
hidden: Optional[Union[Var[bool], bool]] = None,
|
||||
input_mode: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
item_prop: Optional[Union[Var[str], str]] = None,
|
||||
lang: Optional[Union[Var[str], str]] = None,
|
||||
role: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
slot: Optional[Union[Var[str], str]] = None,
|
||||
spell_check: Optional[Union[Var[bool], bool]] = None,
|
||||
tab_index: Optional[Union[Var[int], int]] = None,
|
||||
title: Optional[Union[Var[str], str]] = None,
|
||||
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
@ -954,6 +596,7 @@ class TextField(ComponentNamespace):
|
||||
capture: Captures media from the user (camera or microphone)
|
||||
checked: Indicates whether the input is checked (for checkboxes and radio buttons)
|
||||
default_checked: The initial value (for checkboxes and radio buttons)
|
||||
dirname: Name part of the input to submit in 'dir' and 'name' pair when form is submitted
|
||||
form: Associates the input with a form (by id)
|
||||
form_action: URL to send the form data to (for type="submit" buttons)
|
||||
form_enc_type: How the form data should be encoded when submitting to the server (for type="submit" buttons)
|
||||
@ -966,6 +609,7 @@ class TextField(ComponentNamespace):
|
||||
pattern: Regex pattern the input's value must match to be valid
|
||||
src: URL for image inputs
|
||||
step: Specifies the legal number intervals for an input
|
||||
use_map: Name of the image map used with the input
|
||||
access_key: Provides a hint for generating a keyboard shortcut for the current element.
|
||||
auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
||||
content_editable: Indicates whether the element's content is editable.
|
||||
|
@ -3,7 +3,7 @@
|
||||
# ------------------- DO NOT EDIT ----------------------
|
||||
# This file was generated by `reflex/utils/pyi_generator.py`!
|
||||
# ------------------------------------------------------
|
||||
from typing import Any, Dict, Literal, Optional, Union, overload
|
||||
from typing import Any, Dict, Optional, Union, overload
|
||||
|
||||
from reflex.components.el import elements
|
||||
from reflex.event import EventType
|
||||
@ -18,211 +18,30 @@ class Box(elements.Div, RadixThemesComponent):
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
access_key: Optional[Union[Var[str], str]] = None,
|
||||
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[
|
||||
Literal["characters", "none", "off", "on", "sentences", "words"],
|
||||
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[
|
||||
Literal["inherit", "plaintext-only", False, True],
|
||||
Var[Literal["inherit", "plaintext-only", False, True]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
context_menu: Optional[Union[Var[str], str]] = None,
|
||||
dir: Optional[Union[Var[str], str]] = None,
|
||||
draggable: Optional[Union[Var[bool], bool]] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"],
|
||||
Var[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"]
|
||||
],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
hidden: Optional[Union[Var[bool], bool]] = None,
|
||||
input_mode: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
item_prop: Optional[Union[Var[str], str]] = None,
|
||||
lang: Optional[Union[Var[str], str]] = None,
|
||||
role: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
slot: Optional[Union[Var[str], str]] = None,
|
||||
spell_check: Optional[Union[Var[bool], bool]] = None,
|
||||
tab_index: Optional[Union[Var[int], int]] = None,
|
||||
title: Optional[Union[Var[str], str]] = None,
|
||||
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
|
@ -95,211 +95,30 @@ class Center(Flex):
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
access_key: Optional[Union[Var[str], str]] = None,
|
||||
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[
|
||||
Literal["characters", "none", "off", "on", "sentences", "words"],
|
||||
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[
|
||||
Literal["inherit", "plaintext-only", False, True],
|
||||
Var[Literal["inherit", "plaintext-only", False, True]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
context_menu: Optional[Union[Var[str], str]] = None,
|
||||
dir: Optional[Union[Var[str], str]] = None,
|
||||
draggable: Optional[Union[Var[bool], bool]] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"],
|
||||
Var[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"]
|
||||
],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
hidden: Optional[Union[Var[bool], bool]] = None,
|
||||
input_mode: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
item_prop: Optional[Union[Var[str], str]] = None,
|
||||
lang: Optional[Union[Var[str], str]] = None,
|
||||
role: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
slot: Optional[Union[Var[str], str]] = None,
|
||||
spell_check: Optional[Union[Var[bool], bool]] = None,
|
||||
tab_index: Optional[Union[Var[int], int]] = None,
|
||||
title: Optional[Union[Var[str], str]] = None,
|
||||
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
|
@ -35,211 +35,30 @@ class Container(elements.Div, RadixThemesComponent):
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
access_key: Optional[Union[Var[str], str]] = None,
|
||||
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[
|
||||
Literal["characters", "none", "off", "on", "sentences", "words"],
|
||||
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[
|
||||
Literal["inherit", "plaintext-only", False, True],
|
||||
Var[Literal["inherit", "plaintext-only", False, True]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
context_menu: Optional[Union[Var[str], str]] = None,
|
||||
dir: Optional[Union[Var[str], str]] = None,
|
||||
draggable: Optional[Union[Var[bool], bool]] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"],
|
||||
Var[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"]
|
||||
],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
hidden: Optional[Union[Var[bool], bool]] = None,
|
||||
input_mode: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
item_prop: Optional[Union[Var[str], str]] = None,
|
||||
lang: Optional[Union[Var[str], str]] = None,
|
||||
role: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
slot: Optional[Union[Var[str], str]] = None,
|
||||
spell_check: Optional[Union[Var[bool], bool]] = None,
|
||||
tab_index: Optional[Union[Var[int], int]] = None,
|
||||
title: Optional[Union[Var[str], str]] = None,
|
||||
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
|
@ -98,211 +98,30 @@ class Flex(elements.Div, RadixThemesComponent):
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
access_key: Optional[Union[Var[str], str]] = None,
|
||||
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[
|
||||
Literal["characters", "none", "off", "on", "sentences", "words"],
|
||||
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[
|
||||
Literal["inherit", "plaintext-only", False, True],
|
||||
Var[Literal["inherit", "plaintext-only", False, True]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
context_menu: Optional[Union[Var[str], str]] = None,
|
||||
dir: Optional[Union[Var[str], str]] = None,
|
||||
draggable: Optional[Union[Var[bool], bool]] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"],
|
||||
Var[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"]
|
||||
],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
hidden: Optional[Union[Var[bool], bool]] = None,
|
||||
input_mode: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
item_prop: Optional[Union[Var[str], str]] = None,
|
||||
lang: Optional[Union[Var[str], str]] = None,
|
||||
role: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
slot: Optional[Union[Var[str], str]] = None,
|
||||
spell_check: Optional[Union[Var[bool], bool]] = None,
|
||||
tab_index: Optional[Union[Var[int], int]] = None,
|
||||
title: Optional[Union[Var[str], str]] = None,
|
||||
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
|
@ -127,211 +127,30 @@ class Grid(elements.Div, RadixThemesComponent):
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
access_key: Optional[Union[Var[str], str]] = None,
|
||||
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[
|
||||
Literal["characters", "none", "off", "on", "sentences", "words"],
|
||||
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[
|
||||
Literal["inherit", "plaintext-only", False, True],
|
||||
Var[Literal["inherit", "plaintext-only", False, True]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
context_menu: Optional[Union[Var[str], str]] = None,
|
||||
dir: Optional[Union[Var[str], str]] = None,
|
||||
draggable: Optional[Union[Var[bool], bool]] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"],
|
||||
Var[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"]
|
||||
],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
hidden: Optional[Union[Var[bool], bool]] = None,
|
||||
input_mode: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
item_prop: Optional[Union[Var[str], str]] = None,
|
||||
lang: Optional[Union[Var[str], str]] = None,
|
||||
role: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
slot: Optional[Union[Var[str], str]] = None,
|
||||
spell_check: Optional[Union[Var[bool], bool]] = None,
|
||||
tab_index: Optional[Union[Var[int], int]] = None,
|
||||
title: Optional[Union[Var[str], str]] = None,
|
||||
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
|
@ -172,211 +172,30 @@ class UnorderedList(BaseList, Ul):
|
||||
]
|
||||
] = None,
|
||||
items: Optional[Union[Iterable, Var[Iterable]]] = None,
|
||||
access_key: Optional[Union[Var[str], str]] = None,
|
||||
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[
|
||||
Literal["characters", "none", "off", "on", "sentences", "words"],
|
||||
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[
|
||||
Literal["inherit", "plaintext-only", False, True],
|
||||
Var[Literal["inherit", "plaintext-only", False, True]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
context_menu: Optional[Union[Var[str], str]] = None,
|
||||
dir: Optional[Union[Var[str], str]] = None,
|
||||
draggable: Optional[Union[Var[bool], bool]] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"],
|
||||
Var[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"]
|
||||
],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
hidden: Optional[Union[Var[bool], bool]] = None,
|
||||
input_mode: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
item_prop: Optional[Union[Var[str], str]] = None,
|
||||
lang: Optional[Union[Var[str], str]] = None,
|
||||
role: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
slot: Optional[Union[Var[str], str]] = None,
|
||||
spell_check: Optional[Union[Var[bool], bool]] = None,
|
||||
tab_index: Optional[Union[Var[int], int]] = None,
|
||||
title: Optional[Union[Var[str], str]] = None,
|
||||
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
@ -484,218 +303,33 @@ class OrderedList(BaseList, Ol):
|
||||
]
|
||||
] = None,
|
||||
items: Optional[Union[Iterable, Var[Iterable]]] = None,
|
||||
reversed: Optional[Union[Var[bool], bool]] = None,
|
||||
start: Optional[Union[Var[int], int]] = None,
|
||||
type: Optional[
|
||||
Union[
|
||||
Literal["1", "A", "I", "a", "i"], Var[Literal["1", "A", "I", "a", "i"]]
|
||||
]
|
||||
] = None,
|
||||
access_key: Optional[Union[Var[str], str]] = None,
|
||||
reversed: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
start: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
type: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[
|
||||
Literal["characters", "none", "off", "on", "sentences", "words"],
|
||||
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[
|
||||
Literal["inherit", "plaintext-only", False, True],
|
||||
Var[Literal["inherit", "plaintext-only", False, True]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
context_menu: Optional[Union[Var[str], str]] = None,
|
||||
dir: Optional[Union[Var[str], str]] = None,
|
||||
draggable: Optional[Union[Var[bool], bool]] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"],
|
||||
Var[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"]
|
||||
],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
hidden: Optional[Union[Var[bool], bool]] = None,
|
||||
input_mode: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
item_prop: Optional[Union[Var[str], str]] = None,
|
||||
lang: Optional[Union[Var[str], str]] = None,
|
||||
role: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
slot: Optional[Union[Var[str], str]] = None,
|
||||
spell_check: Optional[Union[Var[bool], bool]] = None,
|
||||
tab_index: Optional[Union[Var[int], int]] = None,
|
||||
title: Optional[Union[Var[str], str]] = None,
|
||||
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
@ -763,211 +397,30 @@ class ListItem(Li, MarkdownComponentMap):
|
||||
def create( # type: ignore
|
||||
cls,
|
||||
*children,
|
||||
access_key: Optional[Union[Var[str], str]] = None,
|
||||
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[
|
||||
Literal["characters", "none", "off", "on", "sentences", "words"],
|
||||
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[
|
||||
Literal["inherit", "plaintext-only", False, True],
|
||||
Var[Literal["inherit", "plaintext-only", False, True]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
context_menu: Optional[Union[Var[str], str]] = None,
|
||||
dir: Optional[Union[Var[str], str]] = None,
|
||||
draggable: Optional[Union[Var[bool], bool]] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"],
|
||||
Var[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"]
|
||||
],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
hidden: Optional[Union[Var[bool], bool]] = None,
|
||||
input_mode: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
item_prop: Optional[Union[Var[str], str]] = None,
|
||||
lang: Optional[Union[Var[str], str]] = None,
|
||||
role: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
slot: Optional[Union[Var[str], str]] = None,
|
||||
spell_check: Optional[Union[Var[bool], bool]] = None,
|
||||
tab_index: Optional[Union[Var[int], int]] = None,
|
||||
title: Optional[Union[Var[str], str]] = None,
|
||||
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
|
@ -32,211 +32,30 @@ class Section(elements.Section, RadixThemesComponent):
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
access_key: Optional[Union[Var[str], str]] = None,
|
||||
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[
|
||||
Literal["characters", "none", "off", "on", "sentences", "words"],
|
||||
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[
|
||||
Literal["inherit", "plaintext-only", False, True],
|
||||
Var[Literal["inherit", "plaintext-only", False, True]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
context_menu: Optional[Union[Var[str], str]] = None,
|
||||
dir: Optional[Union[Var[str], str]] = None,
|
||||
draggable: Optional[Union[Var[bool], bool]] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"],
|
||||
Var[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"]
|
||||
],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
hidden: Optional[Union[Var[bool], bool]] = None,
|
||||
input_mode: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
item_prop: Optional[Union[Var[str], str]] = None,
|
||||
lang: Optional[Union[Var[str], str]] = None,
|
||||
role: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
slot: Optional[Union[Var[str], str]] = None,
|
||||
spell_check: Optional[Union[Var[bool], bool]] = None,
|
||||
tab_index: Optional[Union[Var[int], int]] = None,
|
||||
title: Optional[Union[Var[str], str]] = None,
|
||||
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
|
@ -95,211 +95,30 @@ class Spacer(Flex):
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
access_key: Optional[Union[Var[str], str]] = None,
|
||||
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[
|
||||
Literal["characters", "none", "off", "on", "sentences", "words"],
|
||||
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[
|
||||
Literal["inherit", "plaintext-only", False, True],
|
||||
Var[Literal["inherit", "plaintext-only", False, True]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
context_menu: Optional[Union[Var[str], str]] = None,
|
||||
dir: Optional[Union[Var[str], str]] = None,
|
||||
draggable: Optional[Union[Var[bool], bool]] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"],
|
||||
Var[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"]
|
||||
],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
hidden: Optional[Union[Var[bool], bool]] = None,
|
||||
input_mode: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
item_prop: Optional[Union[Var[str], str]] = None,
|
||||
lang: Optional[Union[Var[str], str]] = None,
|
||||
role: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
slot: Optional[Union[Var[str], str]] = None,
|
||||
spell_check: Optional[Union[Var[bool], bool]] = None,
|
||||
tab_index: Optional[Union[Var[int], int]] = None,
|
||||
title: Optional[Union[Var[str], str]] = None,
|
||||
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
|
@ -72,211 +72,30 @@ class Stack(Flex):
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
access_key: Optional[Union[Var[str], str]] = None,
|
||||
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[
|
||||
Literal["characters", "none", "off", "on", "sentences", "words"],
|
||||
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[
|
||||
Literal["inherit", "plaintext-only", False, True],
|
||||
Var[Literal["inherit", "plaintext-only", False, True]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
context_menu: Optional[Union[Var[str], str]] = None,
|
||||
dir: Optional[Union[Var[str], str]] = None,
|
||||
draggable: Optional[Union[Var[bool], bool]] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"],
|
||||
Var[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"]
|
||||
],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
hidden: Optional[Union[Var[bool], bool]] = None,
|
||||
input_mode: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
item_prop: Optional[Union[Var[str], str]] = None,
|
||||
lang: Optional[Union[Var[str], str]] = None,
|
||||
role: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
slot: Optional[Union[Var[str], str]] = None,
|
||||
spell_check: Optional[Union[Var[bool], bool]] = None,
|
||||
tab_index: Optional[Union[Var[int], int]] = None,
|
||||
title: Optional[Union[Var[str], str]] = None,
|
||||
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
@ -388,211 +207,30 @@ class VStack(Stack):
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
access_key: Optional[Union[Var[str], str]] = None,
|
||||
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[
|
||||
Literal["characters", "none", "off", "on", "sentences", "words"],
|
||||
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[
|
||||
Literal["inherit", "plaintext-only", False, True],
|
||||
Var[Literal["inherit", "plaintext-only", False, True]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
context_menu: Optional[Union[Var[str], str]] = None,
|
||||
dir: Optional[Union[Var[str], str]] = None,
|
||||
draggable: Optional[Union[Var[bool], bool]] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"],
|
||||
Var[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"]
|
||||
],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
hidden: Optional[Union[Var[bool], bool]] = None,
|
||||
input_mode: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
item_prop: Optional[Union[Var[str], str]] = None,
|
||||
lang: Optional[Union[Var[str], str]] = None,
|
||||
role: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
slot: Optional[Union[Var[str], str]] = None,
|
||||
spell_check: Optional[Union[Var[bool], bool]] = None,
|
||||
tab_index: Optional[Union[Var[int], int]] = None,
|
||||
title: Optional[Union[Var[str], str]] = None,
|
||||
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
@ -704,211 +342,30 @@ class HStack(Stack):
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
access_key: Optional[Union[Var[str], str]] = None,
|
||||
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[
|
||||
Literal["characters", "none", "off", "on", "sentences", "words"],
|
||||
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[
|
||||
Literal["inherit", "plaintext-only", False, True],
|
||||
Var[Literal["inherit", "plaintext-only", False, True]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
context_menu: Optional[Union[Var[str], str]] = None,
|
||||
dir: Optional[Union[Var[str], str]] = None,
|
||||
draggable: Optional[Union[Var[bool], bool]] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"],
|
||||
Var[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"]
|
||||
],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
hidden: Optional[Union[Var[bool], bool]] = None,
|
||||
input_mode: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
item_prop: Optional[Union[Var[str], str]] = None,
|
||||
lang: Optional[Union[Var[str], str]] = None,
|
||||
role: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
slot: Optional[Union[Var[str], str]] = None,
|
||||
spell_check: Optional[Union[Var[bool], bool]] = None,
|
||||
tab_index: Optional[Union[Var[int], int]] = None,
|
||||
title: Optional[Union[Var[str], str]] = None,
|
||||
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
|
@ -108,212 +108,31 @@ class Blockquote(elements.Blockquote, RadixThemesComponent):
|
||||
]
|
||||
] = None,
|
||||
high_contrast: Optional[Union[Var[bool], bool]] = None,
|
||||
cite: Optional[Union[Var[str], str]] = None,
|
||||
access_key: Optional[Union[Var[str], str]] = None,
|
||||
cite: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[
|
||||
Literal["characters", "none", "off", "on", "sentences", "words"],
|
||||
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[
|
||||
Literal["inherit", "plaintext-only", False, True],
|
||||
Var[Literal["inherit", "plaintext-only", False, True]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
context_menu: Optional[Union[Var[str], str]] = None,
|
||||
dir: Optional[Union[Var[str], str]] = None,
|
||||
draggable: Optional[Union[Var[bool], bool]] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"],
|
||||
Var[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"]
|
||||
],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
hidden: Optional[Union[Var[bool], bool]] = None,
|
||||
input_mode: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
item_prop: Optional[Union[Var[str], str]] = None,
|
||||
lang: Optional[Union[Var[str], str]] = None,
|
||||
role: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
slot: Optional[Union[Var[str], str]] = None,
|
||||
spell_check: Optional[Union[Var[bool], bool]] = None,
|
||||
tab_index: Optional[Union[Var[int], int]] = None,
|
||||
title: Optional[Union[Var[str], str]] = None,
|
||||
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
|
@ -115,211 +115,30 @@ class Code(elements.Code, RadixThemesComponent, MarkdownComponentMap):
|
||||
]
|
||||
] = None,
|
||||
high_contrast: Optional[Union[Var[bool], bool]] = None,
|
||||
access_key: Optional[Union[Var[str], str]] = None,
|
||||
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[
|
||||
Literal["characters", "none", "off", "on", "sentences", "words"],
|
||||
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[
|
||||
Literal["inherit", "plaintext-only", False, True],
|
||||
Var[Literal["inherit", "plaintext-only", False, True]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
context_menu: Optional[Union[Var[str], str]] = None,
|
||||
dir: Optional[Union[Var[str], str]] = None,
|
||||
draggable: Optional[Union[Var[bool], bool]] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"],
|
||||
Var[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"]
|
||||
],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
hidden: Optional[Union[Var[bool], bool]] = None,
|
||||
input_mode: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
item_prop: Optional[Union[Var[str], str]] = None,
|
||||
lang: Optional[Union[Var[str], str]] = None,
|
||||
role: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
slot: Optional[Union[Var[str], str]] = None,
|
||||
spell_check: Optional[Union[Var[bool], bool]] = None,
|
||||
tab_index: Optional[Union[Var[int], int]] = None,
|
||||
title: Optional[Union[Var[str], str]] = None,
|
||||
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
|
@ -135,211 +135,30 @@ class Heading(elements.H1, RadixThemesComponent, MarkdownComponentMap):
|
||||
]
|
||||
] = None,
|
||||
high_contrast: Optional[Union[Var[bool], bool]] = None,
|
||||
access_key: Optional[Union[Var[str], str]] = None,
|
||||
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[
|
||||
Literal["characters", "none", "off", "on", "sentences", "words"],
|
||||
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[
|
||||
Literal["inherit", "plaintext-only", False, True],
|
||||
Var[Literal["inherit", "plaintext-only", False, True]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
context_menu: Optional[Union[Var[str], str]] = None,
|
||||
dir: Optional[Union[Var[str], str]] = None,
|
||||
draggable: Optional[Union[Var[bool], bool]] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"],
|
||||
Var[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"]
|
||||
],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
hidden: Optional[Union[Var[bool], bool]] = None,
|
||||
input_mode: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
item_prop: Optional[Union[Var[str], str]] = None,
|
||||
lang: Optional[Union[Var[str], str]] = None,
|
||||
role: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
slot: Optional[Union[Var[str], str]] = None,
|
||||
spell_check: Optional[Union[Var[bool], bool]] = None,
|
||||
tab_index: Optional[Union[Var[int], int]] = None,
|
||||
title: Optional[Union[Var[str], str]] = None,
|
||||
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
|
@ -136,252 +136,41 @@ class Link(RadixThemesComponent, A, MemoizationLeaf, MarkdownComponentMap):
|
||||
] = None,
|
||||
high_contrast: Optional[Union[Var[bool], bool]] = None,
|
||||
is_external: Optional[Union[Var[bool], bool]] = None,
|
||||
download: Optional[Union[Var[Union[bool, str]], bool, str]] = None,
|
||||
href: Optional[Union[Var[str], str]] = None,
|
||||
href_lang: Optional[Union[Var[str], str]] = None,
|
||||
media: Optional[Union[Var[str], str]] = None,
|
||||
ping: Optional[Union[Var[str], str]] = None,
|
||||
download: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
href: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
href_lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
media: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
ping: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
referrer_policy: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"",
|
||||
"no-referrer",
|
||||
"no-referrer-when-downgrade",
|
||||
"origin",
|
||||
"origin-when-cross-origin",
|
||||
"same-origin",
|
||||
"strict-origin",
|
||||
"strict-origin-when-cross-origin",
|
||||
"unsafe-url",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"",
|
||||
"no-referrer",
|
||||
"no-referrer-when-downgrade",
|
||||
"origin",
|
||||
"origin-when-cross-origin",
|
||||
"same-origin",
|
||||
"strict-origin",
|
||||
"strict-origin-when-cross-origin",
|
||||
"unsafe-url",
|
||||
]
|
||||
],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
rel: Optional[Union[Var[str], str]] = None,
|
||||
target: Optional[
|
||||
Union[
|
||||
Literal["_blank", "_parent", "_self", "_top"],
|
||||
Var[Union[Literal["_blank", "_parent", "_self", "_top"], str]],
|
||||
str,
|
||||
]
|
||||
] = None,
|
||||
access_key: Optional[Union[Var[str], str]] = None,
|
||||
rel: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
shape: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
target: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
access_key: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
auto_capitalize: Optional[
|
||||
Union[
|
||||
Literal["characters", "none", "off", "on", "sentences", "words"],
|
||||
Var[Literal["characters", "none", "off", "on", "sentences", "words"]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
content_editable: Optional[
|
||||
Union[
|
||||
Literal["inherit", "plaintext-only", False, True],
|
||||
Var[Literal["inherit", "plaintext-only", False, True]],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
context_menu: Optional[Union[Var[str], str]] = None,
|
||||
dir: Optional[Union[Var[str], str]] = None,
|
||||
draggable: Optional[Union[Var[bool], bool]] = None,
|
||||
context_menu: Optional[
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
dir: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
draggable: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
enter_key_hint: Optional[
|
||||
Union[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"],
|
||||
Var[
|
||||
Literal["done", "enter", "go", "next", "previous", "search", "send"]
|
||||
],
|
||||
]
|
||||
Union[Var[Union[bool, int, str]], bool, int, str]
|
||||
] = None,
|
||||
hidden: Optional[Union[Var[bool], bool]] = None,
|
||||
input_mode: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"decimal",
|
||||
"email",
|
||||
"none",
|
||||
"numeric",
|
||||
"search",
|
||||
"tel",
|
||||
"text",
|
||||
"url",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
item_prop: Optional[Union[Var[str], str]] = None,
|
||||
lang: Optional[Union[Var[str], str]] = None,
|
||||
role: Optional[
|
||||
Union[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
],
|
||||
Var[
|
||||
Literal[
|
||||
"alert",
|
||||
"alertdialog",
|
||||
"application",
|
||||
"article",
|
||||
"banner",
|
||||
"button",
|
||||
"cell",
|
||||
"checkbox",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complementary",
|
||||
"contentinfo",
|
||||
"definition",
|
||||
"dialog",
|
||||
"directory",
|
||||
"document",
|
||||
"feed",
|
||||
"figure",
|
||||
"form",
|
||||
"grid",
|
||||
"gridcell",
|
||||
"group",
|
||||
"heading",
|
||||
"img",
|
||||
"link",
|
||||
"list",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"log",
|
||||
"main",
|
||||
"marquee",
|
||||
"math",
|
||||
"menu",
|
||||
"menubar",
|
||||
"menuitem",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"navigation",
|
||||
"none",
|
||||
"note",
|
||||
"option",
|
||||
"presentation",
|
||||
"progressbar",
|
||||
"radio",
|
||||
"radiogroup",
|
||||
"region",
|
||||
"row",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"scrollbar",
|
||||
"search",
|
||||
"searchbox",
|
||||
"separator",
|
||||
"slider",
|
||||
"spinbutton",
|
||||
"status",
|
||||
"switch",
|
||||
"tab",
|
||||
"table",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"term",
|
||||
"textbox",
|
||||
"timer",
|
||||
"toolbar",
|
||||
"tooltip",
|
||||
"tree",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
]
|
||||
],
|
||||
]
|
||||
] = None,
|
||||
slot: Optional[Union[Var[str], str]] = None,
|
||||
spell_check: Optional[Union[Var[bool], bool]] = None,
|
||||
tab_index: Optional[Union[Var[int], int]] = None,
|
||||
title: Optional[Union[Var[str], str]] = None,
|
||||
hidden: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
input_mode: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
item_prop: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
lang: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
role: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
slot: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
spell_check: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
tab_index: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
title: Optional[Union[Var[Union[bool, int, str]], bool, int, str]] = None,
|
||||
style: Optional[Style] = None,
|
||||
key: Optional[Any] = None,
|
||||
id: Optional[Any] = None,
|
||||
@ -424,6 +213,7 @@ class Link(RadixThemesComponent, A, MemoizationLeaf, MarkdownComponentMap):
|
||||
ping: Specifies which referrer is sent when fetching the resource
|
||||
referrer_policy: Specifies the relationship between the current document and the linked document
|
||||
rel: Specifies the relationship between the linked document and the current document
|
||||
shape: Specifies the shape of the area
|
||||
target: Specifies where to open the linked document
|
||||
access_key: Provides a hint for generating a keyboard shortcut for the current element.
|
||||
auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import TypedDict
|
||||
from typing_extensions import TypedDict
|
||||
|
||||
from reflex.components.component import NoSSRComponent
|
||||
from reflex.event import EventHandler, no_args_event_spec, passthrough_event_spec
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user