diff --git a/.github/workflows/pdoc.yml b/.github/workflows/pdoc.yml new file mode 100644 index 0000000..36f961f --- /dev/null +++ b/.github/workflows/pdoc.yml @@ -0,0 +1,47 @@ +name: docs site + +# build the documentation whenever there are new commits on main +on: + push: + branches: + - main +# security: restrict permissions for CI jobs. +permissions: + contents: read + +jobs: + # Build the documentation and upload the static HTML files as an artifact. + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + - uses: actions/setup-python@v5 + with: + python-version: '3.10' + + # ADJUST THIS: install all dependencies (including pdoc) + - run: pip install -r requirements-dev.lock + # ADJUST THIS: build your documentation into docs/. + # We use a custom build script for pdoc itself, ideally you just run `pdoc -o docs/ ...` here. + - run: PDOC_GENERATING=1 pdoc -t doc/pdoc-template/ html_compose -o pdoc + + - uses: actions/upload-pages-artifact@v3 + with: + path: pdoc/ + + # Deploy the artifact to GitHub pages. + # This is a separate job so that only actions/deploy-pages has the necessary permissions. + deploy: + needs: build + runs-on: ubuntu-latest + permissions: + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - id: deployment + uses: actions/deploy-pages@v4 diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml new file mode 100644 index 0000000..6b8333d --- /dev/null +++ b/.github/workflows/run-tests.yml @@ -0,0 +1,38 @@ +name: run-tests + +on: + push: + branches: + - main + pull_request: + +jobs: + lint-and-test: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.10' # Adjust version as needed + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements-dev.lock + + - name: Run linter + run: | + ruff check + + + - name: Run type checker + run: | + mypy src/html_compose/ + + - name: Run tests + run: | + pytest diff --git a/.gitignore b/.gitignore index 8950e2f..6246a8b 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,9 @@ wheels/ # venv .venv +# html docs +pdoc/ + # spec read/generation tools/reference tools/spec_reference.json \ No newline at end of file diff --git a/README.md b/README.md index 15eae95..1b330d4 100644 --- a/README.md +++ b/README.md @@ -133,7 +133,7 @@ a([tab] action=live.ShellCommand( ["sass", "--update", "static/sass:static/css"] ), - no_reload=True, # Nobody reads -these- files so we don't need to reload the server + reload=False, # Nobody reads -these- files so we don't need to reload the server ), live.WatchCond( path_glob="./static/css/", @@ -216,8 +216,8 @@ Updates pertaining to those changes should be shipped into the actual module und # Dependencies -- PalletsProjects [markupsafe](https://github.com/pallets/markupsafe/) for text escaping -- `beautifulsoup4` to optionally beautify HTML +- PalletsProjects [markupsafe](https://github.com/pallets/markupsafe/) for text escaping. Its "fast" implementation saves significant cycles in the sanitization process. +- Optional: `beautifulsoup4` to beautify HTML # Development tools ⚙️ diff --git a/changelog.txt b/changelog.txt index 0bdc326..9ea5df6 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,11 @@ +# 0.9.0 +This is primarly a documentation/automation patch. + +* Docs: build with pdoc. Automate with Github runner. +* Improve and add more documentation +* elements: move from elements.py to elements/name_element.py i.e. a_element.py +* Export BaseAttribute directly from module + # 0.8.1 * WatchCond: Flip condition no_reload param -> reload param, with correct docstring diff --git a/doc/ideas/02_base_element.md b/doc/ideas/02_base_element.md index 68d7308..bd3f639 100644 --- a/doc/ideas/02_base_element.md +++ b/doc/ideas/02_base_element.md @@ -1,4 +1,4 @@ -# Idea +# Base Element The base element has tricks built into it so that you can write HTML faster. diff --git a/doc/ideas/03_code_generator.md b/doc/ideas/03_code_generator.md index bc09b9a..5874a5d 100644 --- a/doc/ideas/03_code_generator.md +++ b/doc/ideas/03_code_generator.md @@ -1,5 +1,5 @@ -# Idea -What if your editor had built in hinting around HTML properties? +# Code Generator +Idea: What if your editor had built in hinting around HTML properties? ## Implementation We take information from the HTML spec living document and MDN. @@ -14,7 +14,7 @@ the `tools` directory contains: * `tools/generated/*_attrs.py` is the intermediate directory so runs do not write to source control directory, but you can see when a new change has happened. -## Extension of this idea: + \ No newline at end of file diff --git a/doc/ideas/04_attrs.md b/doc/ideas/04_attrs.md index c2bf45a..5b58574 100644 --- a/doc/ideas/04_attrs.md +++ b/doc/ideas/04_attrs.md @@ -1,4 +1,4 @@ -# Idea +# Attributes There are multiple ways to define attributes for an html element i.e. ```python diff --git a/doc/ideas/05_livereload.md b/doc/ideas/05_livereload.md index 66d9277..cbfbd43 100644 --- a/doc/ideas/05_livereload.md +++ b/doc/ideas/05_livereload.md @@ -1,11 +1,11 @@ -# Idea +# Live Reload If it takes multiple steps to make a change, I'm going to make a change slowly. If I have to do nothing to notice my change immediately, I'm going to make changes quickly. The idea is to iterate rapidly, so we provide a generic tool to help you do just that. -## Live Reload + Live reload is an optional feature of html-compose to aid in rapid development. Browser based livereload is provided by @@ -58,8 +58,8 @@ live.server( live.WatchCond( "node-app/**/*.js", action=live.ShellCommand("./build.sh"), - # no_reload means not to try to reload the daemon - no_reload=True, + # no reload means not to try to reload the daemon or browser + reload=False, ), live.WatchCond( # Trigger reload when the bro diff --git a/doc/pdoc-template/custom.css b/doc/pdoc-template/custom.css new file mode 100644 index 0000000..c697c0f --- /dev/null +++ b/doc/pdoc-template/custom.css @@ -0,0 +1,314 @@ +* { + font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; +} + +.pdoc .il { + color: #ae81ff +} + + +nav.pdoc a.pdoc-button.module-list-button { + display: none; +} + +.pdoc .modulename a:hover { + color: #ff79c6; +} + +.pdoc .classattr { + color: #FFF; +} + + +/* Docstrings */ + +.pdoc p { + font-weight: 300; +} + +.pdoc li.code { + color: #d63384; +} + + +/* Submodules and API Doc. */ + +.pdoc h2 { + color: #FFF; + font-weight: 0; + margin: .3em 0; + padding: .2em 0; + content: "Module Content"; +} + +/* header */ +.pdoc h5 { + color: white; + font-style: italic; +} + +/* Module name */ + +.pdoc .modulename { + color: #FFF; + font-weight: 0; +} + +/* Adds "var varname" to class variables. */ + +nav.pdoc a.variable::before { + content: "var "; + color: #9d9d9d; + font-style: italic; +} + + +/* Before the function name. This adds "func 'Funcname'". */ + +nav.pdoc .function::before { + content: "func "; + color: #9d9d9d; + font-style: italic; +} + +nav.pdoc .function::after { + content: ""; + color: #9d9d9d; +} + + +/* Before the class name. This adds "class 'className'". */ + +nav.pdoc .class::before { + content: "class "; + font-style: italic; +} + +nav.pdoc .class::after { + content: ""; +} + +nav.pdoc a.class { + color: #8be9fd; +} + +nav.pdoc a.class:hover { + color: #fff; +} + +nav.pdoc a::before { + content: "module "; + font-style: italic; + color: #9d9d9d; +} + +nav.pdoc a.function { + color: #4dec75; +} + +nav.pdoc a.variable { + color: white; +} + +/* nav modules */ +nav.pdoc li a { + color: #bd93f9; +} + +/* Assigned values */ +.pdoc span.default_value { + color: #e6db74; +} + +.pdoc span.def { + font-weight: normal; + color: #ff79c6; +} + +/* +Attributes +---------- +*/ +.pdoc h6#attributes { + color: #FFF; + font-size: 25px; +} + +/* +Example +------- +*/ + +.pdoc h6#example { + color: #FFF; + font-size: 29px; +} + +/* +Notes +----- +*/ + +.pdoc h6#notes { + font-size: 27px; + color: orange; +} + + +/* +Returns +------- +*/ + +.pdoc h6#returns { + font-size: 27px; + color: white; +} + + +/* +Parameters +---------- +*/ + +.pdoc h6#parameters { + font-size: 27px; + color: white; +} + + +/* +Raises +------ +*/ + +.pdoc h6#raises { + font-size: 27px; + color: #FF6666; +} + + +/* False, True */ + +.pdoc .kc { + color: #bd93f9; +} + +.pdoc li { + color: white; +} + + +/* Decorator module */ + +.pdoc .nd { + color: #50fa7b; +} + +.pdoc b, +strong { + color: #d63384; + font-weight: normal; +} + + +/* colors for .. warning:: and .. note:: */ + +.pdoc em { + color: orange; + font-size: 23px; +} + + +/* Decorator color */ + +.pdoc div.decorator { + color: #50fa7b; +} + + +/* Class names colors */ + +.pdoc span.name { + color: #8be9fd; +} + + +/* Inherited class name color */ + +.pdoc span.base { + color: #8be9fd; +} + + +/* Before inherited members colors, i.e., "builtins.Exception" */ + +.pdoc .inherited dt, +.pdoc .inherited dt::before { + color: #8be9fd; +} + + +/* After inherited members colors, i.e., "Exception" */ + +.pdoc .inherited dd, +.pdoc .inherited dd { + color: #FFF; +} + +/* Commas that separates parameters "," color */ +.pdoc .inherited dd:not(:last-child)::after { + color: #fff; +} + +/* Commas that separates parameters "," color */ + +.pdoc .inherited dd:not(:last-child)::after { + color: #FFF; +} + +/* Contents, Submodules, API Documentations */ +/* This also can be separated */ +.pdoc h1, +.pdoc h2, +.pdoc h3 { + font-weight: 300; + margin: 0.3em 0; + padding: 0.2em 0; + color: white; +} + +/* Top left nav button */ +nav.pdoc .module-list-button { + display: inline-flex; + align-items: center; + margin-bottom: 1rem; + color: white; + border-color: white; +} + +nav.pdoc .module-list-button:hover { + border-color: white; + color: white; +} + + +.pdoc pdoc-alert pdoc-alert-warning .p { + color: black; +} + +.pdoc-code { + color: white; +} + +.pdoc .pdoc-alert-warning { + color: black; + background-color: #d5a142; + border-color: black; +} + +.pdoc .pdoc-alert-note { + color: black; + background-color: #6aa3f9; + border-color: black; +} \ No newline at end of file diff --git a/doc/pdoc-template/module.html.jinja2 b/doc/pdoc-template/module.html.jinja2 new file mode 100644 index 0000000..b9ceb4f --- /dev/null +++ b/doc/pdoc-template/module.html.jinja2 @@ -0,0 +1,4 @@ +{# +We want to extend the default template instead of defining everything ourselves. +#} +{% extends "default/module.html.jinja2" %} diff --git a/doc/pdoc-template/syntax-highlighting.css b/doc/pdoc-template/syntax-highlighting.css new file mode 100644 index 0000000..2413213 --- /dev/null +++ b/doc/pdoc-template/syntax-highlighting.css @@ -0,0 +1,424 @@ +pre { + line-height: 125%; +} + +td.linenos pre { + color: #ff5555; + background-color: #282a36; + padding-left: 5px; + padding-right: 5px; +} + +span.linenos { + color: #ff5555; + background-color: #282a36; + padding-left: 5px; + padding-right: 5px; +} + +td.linenos pre.special { + color: #ff5555; + background-color: #ffffc0; + padding-left: 5px; + padding-right: 5px; +} + +span.linenos.special { + color: #ff5555; + background-color: #ffffc0; + padding-left: 5px; + padding-right: 5px; +} + +/* This is for the source code docs */ + +.pdoc-code .hll { + background-color: #282a36; +} + +.pdoc-code { + background: #282a36; + color: #ff5555; +} + +/* Comment */ + +.pdoc-code .c { + color: #6a7aaa; +} + +/* Error */ +.pdoc-code .err { + color: #ff5555; + background-color: #1e0010; +} + +/* Keyword */ +.pdoc-code .k { + color: #ff79c6; +} + +/* Literal */ +.pdoc-code .l { + color: #ae81ff; +} + +/* Name */ +.pdoc-code .n { + color: #f8f8f2; +} + +/* Operator */ +.pdoc-code .o { + color: #ff79c6; +} + +/* Punctuation */ +.pdoc-code .p { + color: #f8f8f2; +} + +/* Comment.Hashbang */ +.pdoc-code .ch { + color: #6a7aaa; +} + +/* Comment.Multiline */ +.pdoc-code .cm { + color: #6a7aaa; +} + +/* Comment.Preproc */ +.pdoc-code .cp { + color: #6a7aaa; +} + +/* Comment.PreprocFile */ +.pdoc-code .cpf { + color: #6a7aaa; +} + +/* Comment.Single */ +.pdoc-code .c1 { + color: #6a7aaa; +} + +/* Comment.Special */ +.pdoc-code .cs { + color: #6a7aaa; +} + +/* Generic.Deleted */ +.pdoc-code .gd { + color: #6a7aaa; +} + +/* Generic.Emph */ +.pdoc-code .ge { + font-style: italic; +} + +/* Generic.Inserted */ +.pdoc-code .gi { + color: #a6e22e; +} + +/* Generic.Output */ +.pdoc-code .go { + color: #ff79c6; +} + +/* Generic.Prompt */ +.pdoc-code .gp { + color: #f92672; + font-weight: bold; +} + +/* Generic.Strong */ +.pdoc-code .gs { + font-weight: bold; +} + +/* Generic.Subheading */ +.pdoc-code .gu { + color: #75715e; +} + +/* Keyword.Constant */ +.pdoc-code .kc { + color: #ff79c6; +} + +/* Keyword.Declaration */ +.pdoc-code .kd { + color: #bd93f9; +} + +/* Keyword.Namespace */ +.pdoc-code .kn { + color: #ff79c6; +} + +/* Keyword.Pseudo */ +.pdoc-code .kp { + color: #bd93f9; +} + +/* Keyword.Reserved */ + +.pdoc-code .kr { + color: #ff79c6; +} + +/* Keyword.Type */ + +.pdoc-code .kt { + color: #ff79c6; +} + +/* Literal.Date */ + +.pdoc-code .ld { + color: #e6db74; +} + +/* Literal.Number */ + +.pdoc-code .m { + color: #ae81ff; +} + +/* Literal.String */ + +.pdoc-code .s { + color: #e6db74; +} + +/* Name.Attribute */ + +.pdoc-code .na { + color: #a6e22e; +} + +/* Name.Builtin */ + +.pdoc-code .nb { + color: #8be9fd; +} + +/* Name.Class */ + +.pdoc-code .nc { + color: #8be9fd; +} + +/* Name.Constant */ + +.pdoc-code .no { + color: #ff79c6; +} + +/* Name.Decorator */ + +.pdoc-code .nd { + color: #8be9fd; +} + +/* Name.Entity */ + +.pdoc-code .ni { + color: #ff79c6; +} + +/* Name.Exception */ + +.pdoc-code .ne { + color: #8be9fd; +} + +/* Name.Function */ + +.pdoc-code .nf { + color: #50fa7b; +} + +/* Name.Label */ + +.pdoc-code .nl { + color: #f8f8f2; +} + +/* Name.Namespace */ + +.pdoc-code .nn { + color: #f8f8f2; +} + +/* Name.Other */ + +.pdoc-code .nx { + color: #a6e22e; +} + +/* Name.Property */ + +.pdoc-code .py { + color: #f8f8f2; +} + +/* Name.Tag */ + +.pdoc-code .nt { + color: #f92672; +} + +/* Name.Variable */ + +.pdoc-code .nv { + color: #f8f8f2; +} + +/* Operator.Word */ + +.pdoc-code .ow { + color: #ff79c6; +} + +/* Text.Whitespace */ + +.pdoc-code .w { + color: #f8f8f2; +} + +/* Literal.Number.Bin */ + +.pdoc-code .mb { + color: #ae81ff; +} + +/* Literal.Number.Float */ + +.pdoc-code .mf { + color: #ae81ff; +} + +/* Literal.Number.Hex */ +.pdoc-code .mh { + color: #ae81ff; +} + +/* Literal.Number.Integer */ +.pdoc-code .mi { + color: #ae81ff; +} + +/* Literal.Number.Oct */ +.pdoc-code .mo { + color: #ae81ff; +} + +/* Literal.String.Affix */ +.pdoc-code .sa { + color: #ff79c6; +} + +/* Literal.String.Backtick */ +.pdoc-code .sb { + color: #e6db74; +} + +/* Literal.String.Char */ +.pdoc-code .sc { + color: #e6db74; +} + +/* Literal.String.Delimiter */ +.pdoc-code .dl { + color: #e6db74; +} + +/* Literal.String.Doc */ +.pdoc-code .sd { + color: #6272a4; +} + +/* Literal.String.Double */ +.pdoc-code .s2 { + color: #e6db74; +} + +/* Literal.String.Escape */ +.pdoc-code .se { + color: #ae81ff; +} + +/* Literal.String.Heredoc */ +.pdoc-code .sh { + color: #e6db74; +} + +/* Literal.String.Interpol. AKA f-strings */ +.pdoc-code .si { + color: #bd93f9; +} + +/* Literal.String.Other */ +.pdoc-code .sx { + color: #e6db74; +} + +/* Literal.String.Regex */ +.pdoc-code .sr { + color: #e6db74; +} + +/* Literal.String.Single */ +.pdoc-code .s1 { + color: #e6db74; +} + +/* Literal.String.Symbol */ + +.pdoc-code .ss { + color: #e6db74; +} + +/* Name.Builtin.Pseudo */ +.pdoc-code .bp { + color: #bd93f9; +} + +/* Name.Function.Magic */ +.pdoc-code .fm { + color: #bd93f9; +} + +/* Name.Variable.Class */ +.pdoc-code .vc { + color: #bd93f9; +} + +/* Name.Variable.Global */ +.pdoc-code .vg { + color: #f8f8f2; +} + +/* Name.Variable.Instance */ +.pdoc-code .vi { + color: #ffffff; +} + +/* Name.Variable.Magic */ +.pdoc-code .vm { + color: #bd93f9; +} + +/* Literal.Number.Integer.Long */ +.pdoc-code .il { + color: #ae81ff; +} + +/* Decorator module i.e., @typing.? */ +.pdoc-code .nd { + color: #50fa7b; +} \ No newline at end of file diff --git a/doc/pdoc-template/theme.css b/doc/pdoc-template/theme.css new file mode 100644 index 0000000..3e53c73 --- /dev/null +++ b/doc/pdoc-template/theme.css @@ -0,0 +1,14 @@ + +:root { + --pdoc-background: #272935; +} +.pdoc { + --text: white; + --muted: #9d9d9d; + --link: #bd93f9; + --link-hover: white; + --active: #555; + --code: #232627; + --accent: #232627; + --accent2: #FFF; +} diff --git a/pyproject.toml b/pyproject.toml index f07c73b..569e9b8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "html-compose" -version = "0.8.1" +version = "0.9.0" description = "Composable HTML generation in python" authors = [ { name = "jealouscloud", email = "github@noaha.org" } @@ -68,6 +68,8 @@ dev-dependencies = [ "ipython>=8.33.0", "watchfiles>=1.0.4", "websockets>=15.0.1", + "pdoc>=15.0.4", + "ruff>=0.12.3", ] [project.scripts] "html-convert" = "html_compose.cli:html_convert" diff --git a/requirements-dev.lock b/requirements-dev.lock index 26ba317..fa8add0 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -37,8 +37,12 @@ iniconfig==2.0.0 ipython==8.33.0 jedi==0.19.2 # via ipython +jinja2==3.1.6 + # via pdoc markupsafe==2.1.5 # via html-compose + # via jinja2 + # via pdoc matplotlib-inline==0.1.7 # via ipython mypy==1.15.0 @@ -50,6 +54,7 @@ packaging==24.1 # via pytest parso==0.8.4 # via jedi +pdoc==15.0.4 pexpect==4.9.0 # via ipython pluggy==1.5.0 @@ -62,9 +67,11 @@ pure-eval==0.2.3 # via stack-data pygments==2.19.1 # via ipython + # via pdoc pyright==1.1.396 pytest==8.3.3 requests==2.32.3 +ruff==0.12.3 sniffio==1.3.1 # via anyio soupsieve==2.6 diff --git a/src/html_compose/__init__.py b/src/html_compose/__init__.py index 6802c31..e0b323f 100644 --- a/src/html_compose/__init__.py +++ b/src/html_compose/__init__.py @@ -1,3 +1,81 @@ +""" + +`html-compose` is a library for natural HTML composition directly in Python. + +## Quick Start Guide + +For user comfort, the `[]` syntax provides a natural way to define child +elements, making the code look more like the HTML structure it represents and +less like a list of procedures. + +Behind the scenes, this is just the `BaseElement.append(...)` method. + +Text is always escaped, so XSS directly in the HTML is not possible. +Via this mechanism, javascript within HTML attributes is always escaped. + +Just don't pass user input into javascript attributes. + +If you want to insert unsafe text, use the `unsafe_text(...)` function. + +You can import elements directly from this module or .elements i.e. +* `from html_compose import a, div, span` or +* `from html_compose.elements import a, div, span` or +* `import html_compose.elements as e` + +If you think HTML frame boilerplate is no fun, so you can use the `HTML5Document` function +to generate a complete HTML5 document with a title, language, and body content. + +```python +from html_compose import HTML5Document, p, script, link + +doc = HTML5Document( + "Site Title", + lang="en", + head=[ + script(src="/public/bundle.js"), + link(rel="stylesheet", href="/public/style.css"), + ], + body=[p["Hello, world!"]], +) +``` + +Custom elements can be created with `CustomElement.create` / `create_element`. + +```python +from html_compose.custom_element import CustomElement +foo = CustomElement.create("foo") +foo["Hello world"].render() # Hello world + +from html_compose import create_element +bar = create_element("bar") +bar()["Hello world"].render() # Hello world +``` + +## Type hints +Type hints are given wherever possible, so you can use your IDE to +complete element names and attributes. + +Read more about these in the [element documentation](html_compose/elements). + +## Command-line Interface +An `html-compose` command-line interface is available which can be used to +convert native HTML into html-compose syntax. +This is useful when starting from a tutorial or template. + +``` +$ html-compose convert {filename or empty for stdin} +``` + +## Core Ideas +We are going to dive into the technicals and core ideas of the library. + +.. include:: ../../doc/ideas/01_iterator.md +.. include:: ../../doc/ideas/02_base_element.md +.. include:: ../../doc/ideas/03_code_generator.md +.. include:: ../../doc/ideas/04_attrs.md +.. include:: ../../doc/ideas/05_livereload.md +""" + from typing import Union from markupsafe import Markup, escape @@ -53,6 +131,7 @@ def doctype(dtype: str = "html"): return unsafe_text(f"") +from .base_attribute import BaseAttribute from .base_element import BaseElement from .custom_element import CustomElement diff --git a/src/html_compose/base_element.py b/src/html_compose/base_element.py index 487bcef..263e184 100644 --- a/src/html_compose/base_element.py +++ b/src/html_compose/base_element.py @@ -61,7 +61,7 @@ def __init__( Initialize an HTML element Args: - name (str): The name of the element. + tag (str): The tag of the element. void_element (bool): Indicates if the element is a void element. Defaults to False. attrs: A list of attributes for the element. It can also be a dictionary of key,value strings. diff --git a/src/html_compose/custom_element.py b/src/html_compose/custom_element.py index df16df4..dcee2c2 100644 --- a/src/html_compose/custom_element.py +++ b/src/html_compose/custom_element.py @@ -21,13 +21,21 @@ def __init__( """ Initialize a custom HTML element - Args: - attrs: A list of attributes for the element. - It can also be a dictionary of key,value strings. - Defaults to None. - id (str): The ID of the element. Defaults to None. - class_: The class of the element. Defaults to None. - children: A list of child elements. Defaults to None. + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `children` : + A list of child elements. Defaults to None. + """ tag = self.__class__.tag if tag == "UNSET": diff --git a/src/html_compose/document.py b/src/html_compose/document.py index 7e30427..e5150ae 100644 --- a/src/html_compose/document.py +++ b/src/html_compose/document.py @@ -16,6 +16,17 @@ def HTML5Document( Return an HTML5 document with the given title and content. It also defines meta viewport for mobile support. + tldr: + ``` + doctype("html") + html(lang=lang)[ + head[ + meta(name="viewport", content="width=device-width, initial-scale=1.0") + title(title) + ] + body[body]] + ``` + When using livereload, an environment variable is set which adds livereload-js to the head of the document. diff --git a/src/html_compose/elements.py b/src/html_compose/elements.py deleted file mode 100644 index 04a3b81..0000000 --- a/src/html_compose/elements.py +++ /dev/null @@ -1,27939 +0,0 @@ -from typing import Union, Literal, Optional - -from .attributes import ( - GlobalAttrs, - AnchorAttrs, - AreaAttrs, - AudioAttrs, - BaseAttrs, - BlockquoteAttrs, - BodyAttrs, - ButtonAttrs, - CanvasAttrs, - ColAttrs, - ColgroupAttrs, - DataAttrs, - DelAttrs, - DetailsAttrs, - DialogAttrs, - EmbedAttrs, - FieldsetAttrs, - FormAttrs, - IframeAttrs, - ImgAttrs, - InputAttrs, - InsAttrs, - LabelAttrs, - LiAttrs, - LinkAttrs, - MapAttrs, - MetaAttrs, - MeterAttrs, - ObjectAttrs, - OlAttrs, - OptgroupAttrs, - OptionAttrs, - OutputAttrs, - ProgressAttrs, - QAttrs, - ScriptAttrs, - SelectAttrs, - SlotAttrs, - SourceAttrs, - StyleAttrs, - TdAttrs, - TemplateAttrs, - TextareaAttrs, - ThAttrs, - TimeAttrs, - TrackAttrs, - VideoAttrs, -) -from .base_attribute import BaseAttribute -from .base_element import BaseElement - -# This file is generated by tools/generate_elements.py - - -class a(BaseElement): - """ - The 'a' element. - Description: Hyperlink - Categories: flow phrasing* interactive palpable - Parents: phrasing - Children: transparent* - Interface: HTMLAnchorElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a - """ # fmt: skip - - tag = "a" - categories = ["flow", "phrasing*", "interactive", "palpable"] - - class hint(GlobalAttrs, AnchorAttrs): - """ - Type hints for "a" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - download: Optional[str] = None, - href: Optional[str] = None, - hreflang: Optional[str] = None, - ping: Optional[Union[str, list]] = None, - referrerpolicy: Optional[str] = None, - rel: Optional[Union[str, list]] = None, - target: Optional[str] = None, - type: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'a' (Hyperlink) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `download` : - Whether to download the resource instead of navigating to it, and its filename if so - `href` : - Address of the hyperlink - - Valid URL potentially surrounded by spaces - `hreflang` : - Language of the linked resource - - Valid BCP 47 language tag - `ping` : - URLs to ping - `referrerpolicy` : - Referrer policy for fetches initiated by the element - - Referrer policy - `rel` : - Relationship between the location in the document containing the hyperlink and the destination resource - `target` : - Navigable for hyperlink navigation - - Valid navigable target name or keyword - `type` : - Hint for the type of the referenced resource - - Valid MIME type string - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "a", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (download is None or download is False): - self._process_attr("download", download) - if not (href is None or href is False): - self._process_attr("href", href) - if not (hreflang is None or hreflang is False): - self._process_attr("hreflang", hreflang) - if not (ping is None or ping is False): - self._process_attr("ping", ping) - if not (referrerpolicy is None or referrerpolicy is False): - self._process_attr("referrerpolicy", referrerpolicy) - if not (rel is None or rel is False): - self._process_attr("rel", rel) - if not (target is None or target is False): - self._process_attr("target", target) - if not (type is None or type is False): - self._process_attr("type", type) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class abbr(BaseElement): - """ - The 'abbr' element. - Description: Abbreviation - Categories: flow phrasing palpable - Parents: phrasing - Children: phrasing - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/abbr - """ # fmt: skip - - tag = "abbr" - categories = ["flow", "phrasing", "palpable"] - - class hint(GlobalAttrs): - """ - Type hints for "abbr" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'abbr' (Abbreviation) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/abbr - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "abbr", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class address(BaseElement): - """ - The 'address' element. - Description: Contact information for a page or article element - Categories: flow palpable - Parents: flow - Children: flow* - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/address - """ # fmt: skip - - tag = "address" - categories = ["flow", "palpable"] - - class hint(GlobalAttrs): - """ - Type hints for "address" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'address' (Contact information for a page or article element) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/address - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "address", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class area(BaseElement): - """ - The 'area' element. - Description: Hyperlink or dead area on an image map - Categories: flow phrasing - Parents: phrasing* - Children: empty - Interface: HTMLAreaElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/area - """ # fmt: skip - - tag = "area" - categories = ["flow", "phrasing"] - - class hint(GlobalAttrs, AreaAttrs): - """ - Type hints for "area" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - alt: Optional[str] = None, - coords: Optional[str] = None, - download: Optional[str] = None, - href: Optional[str] = None, - ping: Optional[Union[str, list]] = None, - referrerpolicy: Optional[str] = None, - rel: Optional[Union[str, list]] = None, - shape: Optional[ - Union[str, Literal["circle", "default", "poly", "rect"]] - ] = None, - target: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'area' (Hyperlink or dead area on an image map) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/area - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `alt` : - Replacement text for use when images are not available - `coords` : - Coordinates for the shape to be created in an image map - - Valid list of floating-point numbers* - `download` : - Whether to download the resource instead of navigating to it, and its filename if so - `href` : - Address of the hyperlink - - Valid URL potentially surrounded by spaces - `ping` : - URLs to ping - `referrerpolicy` : - Referrer policy for fetches initiated by the element - - Referrer policy - `rel` : - Relationship between the location in the document containing the hyperlink and the destination resource - `shape` : - The kind of shape to be created in an image map - `target` : - Navigable for hyperlink navigation - - Valid navigable target name or keyword - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "area", void_element=True, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (alt is None or alt is False): - self._process_attr("alt", alt) - if not (coords is None or coords is False): - self._process_attr("coords", coords) - if not (download is None or download is False): - self._process_attr("download", download) - if not (href is None or href is False): - self._process_attr("href", href) - if not (ping is None or ping is False): - self._process_attr("ping", ping) - if not (referrerpolicy is None or referrerpolicy is False): - self._process_attr("referrerpolicy", referrerpolicy) - if not (rel is None or rel is False): - self._process_attr("rel", rel) - if not (shape is None or shape is False): - self._process_attr("shape", shape) - if not (target is None or target is False): - self._process_attr("target", target) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class article(BaseElement): - """ - The 'article' element. - Description: Self-contained syndicatable or reusable composition - Categories: flow sectioning palpable - Parents: flow - Children: flow - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/article - """ # fmt: skip - - tag = "article" - categories = ["flow", "sectioning", "palpable"] - - class hint(GlobalAttrs): - """ - Type hints for "article" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'article' (Self-contained syndicatable or reusable composition) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/article - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "article", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class aside(BaseElement): - """ - The 'aside' element. - Description: Sidebar for tangentially related content - Categories: flow sectioning palpable - Parents: flow - Children: flow - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/aside - """ # fmt: skip - - tag = "aside" - categories = ["flow", "sectioning", "palpable"] - - class hint(GlobalAttrs): - """ - Type hints for "aside" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'aside' (Sidebar for tangentially related content) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/aside - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "aside", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class audio(BaseElement): - """ - The 'audio' element. - Description: Audio player - Categories: flow phrasing embedded interactive palpable* - Parents: phrasing - Children: source* track* transparent* - Interface: HTMLAudioElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio - """ # fmt: skip - - tag = "audio" - categories = ["flow", "phrasing", "embedded", "interactive", "palpable*"] - - class hint(GlobalAttrs, AudioAttrs): - """ - Type hints for "audio" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - autoplay: Optional[Union[str, bool]] = None, - controls: Optional[Union[str, bool]] = None, - crossorigin: Optional[ - Union[str, Literal["anonymous", "use-credentials"]] - ] = None, - loop: Optional[Union[str, bool]] = None, - muted: Optional[Union[str, bool]] = None, - preload: Optional[ - Union[str, Literal["none", "metadata", "auto"]] - ] = None, - src: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'audio' (Audio player) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `autoplay` : - Hint that the media resource can be started automatically when the page is loaded - `controls` : - Show user agent controls - `crossorigin` : - How the element handles crossorigin requests - `loop` : - Whether to loop the media resource - `muted` : - Whether to mute the media resource by default - `preload` : - Hints how much buffering the media resource will likely need - `src` : - Address of the resource - - Valid non-empty URL potentially surrounded by spaces - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "audio", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (autoplay is None or autoplay is False): - self._process_attr("autoplay", autoplay) - if not (controls is None or controls is False): - self._process_attr("controls", controls) - if not (crossorigin is None or crossorigin is False): - self._process_attr("crossorigin", crossorigin) - if not (loop is None or loop is False): - self._process_attr("loop", loop) - if not (muted is None or muted is False): - self._process_attr("muted", muted) - if not (preload is None or preload is False): - self._process_attr("preload", preload) - if not (src is None or src is False): - self._process_attr("src", src) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class b(BaseElement): - """ - The 'b' element. - Description: Keywords - Categories: flow phrasing palpable - Parents: phrasing - Children: phrasing - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/b - """ # fmt: skip - - tag = "b" - categories = ["flow", "phrasing", "palpable"] - - class hint(GlobalAttrs): - """ - Type hints for "b" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'b' (Keywords) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/b - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "b", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class base(BaseElement): - """ - The 'base' element. - Description: Base URL and default target navigable for hyperlinks and forms - Categories: metadata - Parents: head - Children: empty - Interface: HTMLBaseElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base - """ # fmt: skip - - tag = "base" - categories = ["metadata"] - - class hint(GlobalAttrs, BaseAttrs): - """ - Type hints for "base" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - href: Optional[str] = None, - target: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'base' (Base URL and default target navigable for hyperlinks and forms) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `href` : - Document base URL - - Valid URL potentially surrounded by spaces - `target` : - Default navigable for hyperlink navigation and form submission - - Valid navigable target name or keyword - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "base", void_element=True, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (href is None or href is False): - self._process_attr("href", href) - if not (target is None or target is False): - self._process_attr("target", target) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class bdi(BaseElement): - """ - The 'bdi' element. - Description: Text directionality isolation - Categories: flow phrasing palpable - Parents: phrasing - Children: phrasing - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/bdi - """ # fmt: skip - - tag = "bdi" - categories = ["flow", "phrasing", "palpable"] - - class hint(GlobalAttrs): - """ - Type hints for "bdi" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'bdi' (Text directionality isolation) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/bdi - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "bdi", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class bdo(BaseElement): - """ - The 'bdo' element. - Description: Text directionality formatting - Categories: flow phrasing palpable - Parents: phrasing - Children: phrasing - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/bdo - """ # fmt: skip - - tag = "bdo" - categories = ["flow", "phrasing", "palpable"] - - class hint(GlobalAttrs): - """ - Type hints for "bdo" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'bdo' (Text directionality formatting) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/bdo - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "bdo", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class blockquote(BaseElement): - """ - The 'blockquote' element. - Description: A section quoted from another source - Categories: flow palpable - Parents: flow - Children: flow - Interface: HTMLQuoteElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/blockquote - """ # fmt: skip - - tag = "blockquote" - categories = ["flow", "palpable"] - - class hint(GlobalAttrs, BlockquoteAttrs): - """ - Type hints for "blockquote" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - cite: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'blockquote' (A section quoted from another source) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/blockquote - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `cite` : - Link to the source of the quotation or more information about the edit - - Valid URL potentially surrounded by spaces - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "blockquote", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (cite is None or cite is False): - self._process_attr("cite", cite) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class body(BaseElement): - """ - The 'body' element. - Description: Document body - Categories: none - Parents: html - Children: flow - Interface: HTMLBodyElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/body - """ # fmt: skip - - tag = "body" - categories = ["none"] - - class hint(GlobalAttrs, BodyAttrs): - """ - Type hints for "body" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'body' (Document body) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/body - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "body", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class br(BaseElement): - """ - The 'br' element. - Description: Line break, e.g. in poem or postal address - Categories: flow phrasing - Parents: phrasing - Children: empty - Interface: HTMLBRElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/br - """ # fmt: skip - - tag = "br" - categories = ["flow", "phrasing"] - - class hint(GlobalAttrs): - """ - Type hints for "br" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'br' (Line break, e.g. in poem or postal address) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/br - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "br", void_element=True, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class button(BaseElement): - """ - The 'button' element. - Description: Button control - Categories: flow phrasing interactive listed labelable submittable form-associated palpable - Parents: phrasing - Children: phrasing* - Interface: HTMLButtonElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button - """ # fmt: skip - - tag = "button" - categories = [ - "flow", - "phrasing", - "interactive", - "listed", - "labelable", - "submittable", - "form-associated", - "palpable", - ] - - class hint(GlobalAttrs, ButtonAttrs): - """ - Type hints for "button" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - disabled: Optional[Union[str, bool]] = None, - form: Optional[str] = None, - formaction: Optional[str] = None, - formenctype: Optional[ - Union[ - str, - Literal[ - "application/x-www-form-urlencoded", - "multipart/form-data", - "text/plain", - ], - ] - ] = None, - formmethod: Optional[ - Union[str, Literal["GET", "POST", "dialog"]] - ] = None, - formnovalidate: Optional[Union[str, bool]] = None, - formtarget: Optional[str] = None, - name: Optional[str] = None, - popovertarget: Optional[str] = None, - popovertargetaction: Optional[ - Union[str, Literal["toggle", "show", "hide"]] - ] = None, - type: Optional[Union[str, Literal["submit", "reset", "button"]]] = None, - value: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'button' (Button control) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `disabled` : - Whether the form control is disabled - `form` : - Associates the element with a form element - - ID* - `formaction` : - URL to use for form submission - - Valid non-empty URL potentially surrounded by spaces - `formenctype` : - Entry list encoding type to use for form submission - `formmethod` : - Variant to use for form submission - `formnovalidate` : - Bypass form control validation for form submission - `formtarget` : - Navigable for form submission - - Valid navigable target name or keyword - `name` : - Name of the element to use for form submission and in the form.elements API - `popovertarget` : - Targets a popover element to toggle, show, or hide - - ID* - `popovertargetaction` : - Indicates whether a targeted popover element is to be toggled, shown, or hidden - `type` : - Type of button - `value` : - Value to be used for form submission - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "button", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (disabled is None or disabled is False): - self._process_attr("disabled", disabled) - if not (form is None or form is False): - self._process_attr("form", form) - if not (formaction is None or formaction is False): - self._process_attr("formaction", formaction) - if not (formenctype is None or formenctype is False): - self._process_attr("formenctype", formenctype) - if not (formmethod is None or formmethod is False): - self._process_attr("formmethod", formmethod) - if not (formnovalidate is None or formnovalidate is False): - self._process_attr("formnovalidate", formnovalidate) - if not (formtarget is None or formtarget is False): - self._process_attr("formtarget", formtarget) - if not (name is None or name is False): - self._process_attr("name", name) - if not (popovertarget is None or popovertarget is False): - self._process_attr("popovertarget", popovertarget) - if not (popovertargetaction is None or popovertargetaction is False): - self._process_attr("popovertargetaction", popovertargetaction) - if not (type is None or type is False): - self._process_attr("type", type) - if not (value is None or value is False): - self._process_attr("value", value) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class canvas(BaseElement): - """ - The 'canvas' element. - Description: Scriptable bitmap canvas - Categories: flow phrasing embedded palpable - Parents: phrasing - Children: transparent - Interface: HTMLCanvasElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas - """ # fmt: skip - - tag = "canvas" - categories = ["flow", "phrasing", "embedded", "palpable"] - - class hint(GlobalAttrs, CanvasAttrs): - """ - Type hints for "canvas" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - height: Optional[Union[str, int]] = None, - width: Optional[Union[str, int]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'canvas' (Scriptable bitmap canvas) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `height` : - Vertical dimension - `width` : - Horizontal dimension - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "canvas", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (height is None or height is False): - self._process_attr("height", height) - if not (width is None or width is False): - self._process_attr("width", width) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class caption(BaseElement): - """ - The 'caption' element. - Description: Table caption - Categories: none - Parents: table - Children: flow* - Interface: HTMLTableCaptionElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/caption - """ # fmt: skip - - tag = "caption" - categories = ["none"] - - class hint(GlobalAttrs): - """ - Type hints for "caption" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'caption' (Table caption) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/caption - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "caption", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class cite(BaseElement): - """ - The 'cite' element. - Description: Title of a work - Categories: flow phrasing palpable - Parents: phrasing - Children: phrasing - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/cite - """ # fmt: skip - - tag = "cite" - categories = ["flow", "phrasing", "palpable"] - - class hint(GlobalAttrs): - """ - Type hints for "cite" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'cite' (Title of a work) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/cite - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "cite", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class code(BaseElement): - """ - The 'code' element. - Description: Computer code - Categories: flow phrasing palpable - Parents: phrasing - Children: phrasing - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/code - """ # fmt: skip - - tag = "code" - categories = ["flow", "phrasing", "palpable"] - - class hint(GlobalAttrs): - """ - Type hints for "code" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'code' (Computer code) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/code - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "code", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class col(BaseElement): - """ - The 'col' element. - Description: Table column - Categories: none - Parents: colgroup - Children: empty - Interface: HTMLTableColElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col - """ # fmt: skip - - tag = "col" - categories = ["none"] - - class hint(GlobalAttrs, ColAttrs): - """ - Type hints for "col" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - span: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'col' (Table column) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `span` : - Number of columns spanned by the element - - Valid non-negative integer greater than zero - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "col", void_element=True, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (span is None or span is False): - self._process_attr("span", span) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class colgroup(BaseElement): - """ - The 'colgroup' element. - Description: Group of columns in a table - Categories: none - Parents: table - Children: col* template* - Interface: HTMLTableColElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/colgroup - """ # fmt: skip - - tag = "colgroup" - categories = ["none"] - - class hint(GlobalAttrs, ColgroupAttrs): - """ - Type hints for "colgroup" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - span: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'colgroup' (Group of columns in a table) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/colgroup - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `span` : - Number of columns spanned by the element - - Valid non-negative integer greater than zero - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "colgroup", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (span is None or span is False): - self._process_attr("span", span) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class data(BaseElement): - """ - The 'data' element. - Description: Machine-readable equivalent - Categories: flow phrasing palpable - Parents: phrasing - Children: phrasing - Interface: HTMLDataElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/data - """ # fmt: skip - - tag = "data" - categories = ["flow", "phrasing", "palpable"] - - class hint(GlobalAttrs, DataAttrs): - """ - Type hints for "data" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - value: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'data' (Machine-readable equivalent) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/data - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `value` : - Machine-readable value - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "data", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (value is None or value is False): - self._process_attr("value", value) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class datalist(BaseElement): - """ - The 'datalist' element. - Description: Container for options for combo box control - Categories: flow phrasing - Parents: phrasing - Children: phrasing* option* script-supporting elements* - Interface: HTMLDataListElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/datalist - """ # fmt: skip - - tag = "datalist" - categories = ["flow", "phrasing"] - - class hint(GlobalAttrs): - """ - Type hints for "datalist" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'datalist' (Container for options for combo box control) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/datalist - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "datalist", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class dd(BaseElement): - """ - The 'dd' element. - Description: Content for corresponding dt element(s) - Categories: none - Parents: dl div* - Children: flow - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dd - """ # fmt: skip - - tag = "dd" - categories = ["none"] - - class hint(GlobalAttrs): - """ - Type hints for "dd" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'dd' (Content for corresponding dt element(s)) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dd - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "dd", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class del_(BaseElement): - """ - The 'del' element. - Description: A removal from the document - Categories: flow phrasing* palpable - Parents: phrasing - Children: transparent - Interface: HTMLModElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/del - """ # fmt: skip - - tag = "del" - categories = ["flow", "phrasing*", "palpable"] - - class hint(GlobalAttrs, DelAttrs): - """ - Type hints for "del" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - cite: Optional[str] = None, - datetime: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'del' (A removal from the document) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/del - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `cite` : - Link to the source of the quotation or more information about the edit - - Valid URL potentially surrounded by spaces - `datetime` : - Date and (optionally) time of the change - - Valid date string with optional time - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "del", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (cite is None or cite is False): - self._process_attr("cite", cite) - if not (datetime is None or datetime is False): - self._process_attr("datetime", datetime) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class details(BaseElement): - """ - The 'details' element. - Description: Disclosure control for hiding details - Categories: flow interactive palpable - Parents: flow - Children: summary* flow - Interface: HTMLDetailsElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details - """ # fmt: skip - - tag = "details" - categories = ["flow", "interactive", "palpable"] - - class hint(GlobalAttrs, DetailsAttrs): - """ - Type hints for "details" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - name: Optional[str] = None, - open: Optional[Union[str, bool]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'details' (Disclosure control for hiding details) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `name` : - Name of group of mutually-exclusive details elements - `open` : - Whether the details are visible - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "details", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (name is None or name is False): - self._process_attr("name", name) - if not (open is None or open is False): - self._process_attr("open", open) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class dfn(BaseElement): - """ - The 'dfn' element. - Description: Defining instance - Categories: flow phrasing palpable - Parents: phrasing - Children: phrasing* - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dfn - """ # fmt: skip - - tag = "dfn" - categories = ["flow", "phrasing", "palpable"] - - class hint(GlobalAttrs): - """ - Type hints for "dfn" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'dfn' (Defining instance) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dfn - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "dfn", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class dialog(BaseElement): - """ - The 'dialog' element. - Description: Dialog box or window - Categories: flow - Parents: flow - Children: flow - Interface: HTMLDialogElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog - """ # fmt: skip - - tag = "dialog" - categories = ["flow"] - - class hint(GlobalAttrs, DialogAttrs): - """ - Type hints for "dialog" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - open: Optional[Union[str, bool]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'dialog' (Dialog box or window) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `open` : - Whether the dialog box is showing - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "dialog", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (open is None or open is False): - self._process_attr("open", open) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class div(BaseElement): - """ - The 'div' element. - Description: Generic flow container, or container for name-value groups in dl elements - Categories: flow palpable - Parents: flow dl - Children: flow - Interface: HTMLDivElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/div - """ # fmt: skip - - tag = "div" - categories = ["flow", "palpable"] - - class hint(GlobalAttrs): - """ - Type hints for "div" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'div' (Generic flow container, or container for name-value groups in dl elements) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/div - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "div", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class dl(BaseElement): - """ - The 'dl' element. - Description: Association list consisting of zero or more name-value groups - Categories: flow palpable - Parents: flow - Children: dt* dd* div* script-supporting elements - Interface: HTMLDListElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dl - """ # fmt: skip - - tag = "dl" - categories = ["flow", "palpable"] - - class hint(GlobalAttrs): - """ - Type hints for "dl" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'dl' (Association list consisting of zero or more name-value groups) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dl - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "dl", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class dt(BaseElement): - """ - The 'dt' element. - Description: Legend for corresponding dd element(s) - Categories: none - Parents: dl div* - Children: flow* - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dt - """ # fmt: skip - - tag = "dt" - categories = ["none"] - - class hint(GlobalAttrs): - """ - Type hints for "dt" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'dt' (Legend for corresponding dd element(s)) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dt - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "dt", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class em(BaseElement): - """ - The 'em' element. - Description: Stress emphasis - Categories: flow phrasing palpable - Parents: phrasing - Children: phrasing - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/em - """ # fmt: skip - - tag = "em" - categories = ["flow", "phrasing", "palpable"] - - class hint(GlobalAttrs): - """ - Type hints for "em" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'em' (Stress emphasis) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/em - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "em", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class embed(BaseElement): - """ - The 'embed' element. - Description: Plugin - Categories: flow phrasing embedded interactive palpable - Parents: phrasing - Children: empty - Interface: HTMLEmbedElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/embed - """ # fmt: skip - - tag = "embed" - categories = ["flow", "phrasing", "embedded", "interactive", "palpable"] - - class hint(GlobalAttrs, EmbedAttrs): - """ - Type hints for "embed" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - height: Optional[Union[str, int]] = None, - src: Optional[str] = None, - type: Optional[str] = None, - width: Optional[Union[str, int]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'embed' (Plugin) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/embed - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `height` : - Vertical dimension - `src` : - Address of the resource - - Valid non-empty URL potentially surrounded by spaces - `type` : - Type of embedded resource - - Valid MIME type string - `width` : - Horizontal dimension - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "embed", void_element=True, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (height is None or height is False): - self._process_attr("height", height) - if not (src is None or src is False): - self._process_attr("src", src) - if not (type is None or type is False): - self._process_attr("type", type) - if not (width is None or width is False): - self._process_attr("width", width) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class fieldset(BaseElement): - """ - The 'fieldset' element. - Description: Group of form controls - Categories: flow listed form-associated palpable - Parents: flow - Children: legend* flow - Interface: HTMLFieldSetElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fieldset - """ # fmt: skip - - tag = "fieldset" - categories = ["flow", "listed", "form-associated", "palpable"] - - class hint(GlobalAttrs, FieldsetAttrs): - """ - Type hints for "fieldset" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - disabled: Optional[Union[str, bool]] = None, - form: Optional[str] = None, - name: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'fieldset' (Group of form controls) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fieldset - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `disabled` : - Whether the descendant form controls, except any inside legend, are disabled - `form` : - Associates the element with a form element - - ID* - `name` : - Name of the element to use for form submission and in the form.elements API - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "fieldset", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (disabled is None or disabled is False): - self._process_attr("disabled", disabled) - if not (form is None or form is False): - self._process_attr("form", form) - if not (name is None or name is False): - self._process_attr("name", name) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class figcaption(BaseElement): - """ - The 'figcaption' element. - Description: Caption for figure - Categories: none - Parents: figure - Children: flow - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/figcaption - """ # fmt: skip - - tag = "figcaption" - categories = ["none"] - - class hint(GlobalAttrs): - """ - Type hints for "figcaption" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'figcaption' (Caption for figure) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/figcaption - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "figcaption", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class figure(BaseElement): - """ - The 'figure' element. - Description: Figure with optional caption - Categories: flow palpable - Parents: flow - Children: figcaption* flow - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/figure - """ # fmt: skip - - tag = "figure" - categories = ["flow", "palpable"] - - class hint(GlobalAttrs): - """ - Type hints for "figure" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'figure' (Figure with optional caption) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/figure - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "figure", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class footer(BaseElement): - """ - The 'footer' element. - Description: Footer for a page or section - Categories: flow palpable - Parents: flow - Children: flow* - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/footer - """ # fmt: skip - - tag = "footer" - categories = ["flow", "palpable"] - - class hint(GlobalAttrs): - """ - Type hints for "footer" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'footer' (Footer for a page or section) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/footer - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "footer", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class form(BaseElement): - """ - The 'form' element. - Description: User-submittable form - Categories: flow palpable - Parents: flow - Children: flow* - Interface: HTMLFormElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form - """ # fmt: skip - - tag = "form" - categories = ["flow", "palpable"] - - class hint(GlobalAttrs, FormAttrs): - """ - Type hints for "form" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accept_charset: Optional[str] = None, - action: Optional[str] = None, - autocomplete: Optional[Union[str, Literal["on", "off"]]] = None, - enctype: Optional[ - Union[ - str, - Literal[ - "application/x-www-form-urlencoded", - "multipart/form-data", - "text/plain", - ], - ] - ] = None, - method: Optional[Union[str, Literal["GET", "POST", "dialog"]]] = None, - name: Optional[str] = None, - novalidate: Optional[Union[str, bool]] = None, - target: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'form' (User-submittable form) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accept_charset` : - Character encodings to use for form submission - - ASCII case-insensitive match for "UTF-8" - `action` : - URL to use for form submission - - Valid non-empty URL potentially surrounded by spaces - `autocomplete` : - Default setting for autofill feature for controls in the form - `enctype` : - Entry list encoding type to use for form submission - `method` : - Variant to use for form submission - `name` : - Name of form to use in the document.forms API - `novalidate` : - Bypass form control validation for form submission - `target` : - Navigable for form submission - - Valid navigable target name or keyword - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "form", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accept_charset is None or accept_charset is False): - self._process_attr("accept-charset", accept_charset) - if not (action is None or action is False): - self._process_attr("action", action) - if not (autocomplete is None or autocomplete is False): - self._process_attr("autocomplete", autocomplete) - if not (enctype is None or enctype is False): - self._process_attr("enctype", enctype) - if not (method is None or method is False): - self._process_attr("method", method) - if not (name is None or name is False): - self._process_attr("name", name) - if not (novalidate is None or novalidate is False): - self._process_attr("novalidate", novalidate) - if not (target is None or target is False): - self._process_attr("target", target) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class h1(BaseElement): - """ - The 'h1' element. - Description: Heading - Categories: flow heading palpable - Parents: legend summary flow - Children: phrasing - Interface: HTMLHeadingElement - Documentation: None - """ # fmt: skip - - tag = "h1" - categories = ["flow", "heading", "palpable"] - - class hint(GlobalAttrs): - """ - Type hints for "h1" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'h1' (Heading) element. - Documentation: None - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "h1", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class h2(BaseElement): - """ - The 'h2' element. - Description: Heading - Categories: flow heading palpable - Parents: legend summary flow - Children: phrasing - Interface: HTMLHeadingElement - Documentation: None - """ # fmt: skip - - tag = "h2" - categories = ["flow", "heading", "palpable"] - - class hint(GlobalAttrs): - """ - Type hints for "h2" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'h2' (Heading) element. - Documentation: None - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "h2", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class h3(BaseElement): - """ - The 'h3' element. - Description: Heading - Categories: flow heading palpable - Parents: legend summary flow - Children: phrasing - Interface: HTMLHeadingElement - Documentation: None - """ # fmt: skip - - tag = "h3" - categories = ["flow", "heading", "palpable"] - - class hint(GlobalAttrs): - """ - Type hints for "h3" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'h3' (Heading) element. - Documentation: None - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "h3", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class h4(BaseElement): - """ - The 'h4' element. - Description: Heading - Categories: flow heading palpable - Parents: legend summary flow - Children: phrasing - Interface: HTMLHeadingElement - Documentation: None - """ # fmt: skip - - tag = "h4" - categories = ["flow", "heading", "palpable"] - - class hint(GlobalAttrs): - """ - Type hints for "h4" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'h4' (Heading) element. - Documentation: None - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "h4", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class h5(BaseElement): - """ - The 'h5' element. - Description: Heading - Categories: flow heading palpable - Parents: legend summary flow - Children: phrasing - Interface: HTMLHeadingElement - Documentation: None - """ # fmt: skip - - tag = "h5" - categories = ["flow", "heading", "palpable"] - - class hint(GlobalAttrs): - """ - Type hints for "h5" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'h5' (Heading) element. - Documentation: None - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "h5", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class h6(BaseElement): - """ - The 'h6' element. - Description: Heading - Categories: flow heading palpable - Parents: legend summary flow - Children: phrasing - Interface: HTMLHeadingElement - Documentation: None - """ # fmt: skip - - tag = "h6" - categories = ["flow", "heading", "palpable"] - - class hint(GlobalAttrs): - """ - Type hints for "h6" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'h6' (Heading) element. - Documentation: None - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "h6", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class head(BaseElement): - """ - The 'head' element. - Description: Container for document metadata - Categories: none - Parents: html - Children: metadata content* - Interface: HTMLHeadElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/head - """ # fmt: skip - - tag = "head" - categories = ["none"] - - class hint(GlobalAttrs): - """ - Type hints for "head" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'head' (Container for document metadata) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/head - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "head", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class header(BaseElement): - """ - The 'header' element. - Description: Introductory or navigational aids for a page or section - Categories: flow palpable - Parents: flow - Children: flow* - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/header - """ # fmt: skip - - tag = "header" - categories = ["flow", "palpable"] - - class hint(GlobalAttrs): - """ - Type hints for "header" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'header' (Introductory or navigational aids for a page or section) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/header - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "header", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class hgroup(BaseElement): - """ - The 'hgroup' element. - Description: Heading container - Categories: flow palpable - Parents: legend summary flow - Children: h1 h2 h3 h4 h5 h6 script-supporting elements - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/hgroup - """ # fmt: skip - - tag = "hgroup" - categories = ["flow", "palpable"] - - class hint(GlobalAttrs): - """ - Type hints for "hgroup" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'hgroup' (Heading container) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/hgroup - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "hgroup", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class hr(BaseElement): - """ - The 'hr' element. - Description: Thematic break - Categories: flow - Parents: flow - Children: empty - Interface: HTMLHRElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/hr - """ # fmt: skip - - tag = "hr" - categories = ["flow"] - - class hint(GlobalAttrs): - """ - Type hints for "hr" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'hr' (Thematic break) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/hr - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "hr", void_element=True, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class html(BaseElement): - """ - The 'html' element. - Description: Root element - Categories: none - Parents: none* - Children: head* body* - Interface: HTMLHtmlElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/html - """ # fmt: skip - - tag = "html" - categories = ["none"] - - class hint(GlobalAttrs): - """ - Type hints for "html" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'html' (Root element) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/html - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "html", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class i(BaseElement): - """ - The 'i' element. - Description: Alternate voice - Categories: flow phrasing palpable - Parents: phrasing - Children: phrasing - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/i - """ # fmt: skip - - tag = "i" - categories = ["flow", "phrasing", "palpable"] - - class hint(GlobalAttrs): - """ - Type hints for "i" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'i' (Alternate voice) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/i - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "i", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class iframe(BaseElement): - """ - The 'iframe' element. - Description: Child navigable - Categories: flow phrasing embedded interactive palpable - Parents: phrasing - Children: empty - Interface: HTMLIFrameElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe - """ # fmt: skip - - tag = "iframe" - categories = ["flow", "phrasing", "embedded", "interactive", "palpable"] - - class hint(GlobalAttrs, IframeAttrs): - """ - Type hints for "iframe" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - allow: Optional[str] = None, - allowfullscreen: Optional[Union[str, bool]] = None, - height: Optional[Union[str, int]] = None, - loading: Optional[Union[str, Literal["lazy", "eager"]]] = None, - name: Optional[str] = None, - referrerpolicy: Optional[str] = None, - sandbox: Optional[Union[str, list]] = None, - src: Optional[str] = None, - srcdoc: Optional[str] = None, - width: Optional[Union[str, int]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'iframe' (Child navigable) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `allow` : - Permissions policy to be applied to the iframe's contents - - Serialized permissions policy - `allowfullscreen` : - Whether to allow the iframe's contents to use requestFullscreen() - `height` : - Vertical dimension - `loading` : - Used when determining loading deferral - `name` : - Name of content navigable - - Valid navigable target name or keyword - `referrerpolicy` : - Referrer policy for fetches initiated by the element - - Referrer policy - `sandbox` : - Security rules for nested content - `src` : - Address of the resource - - Valid non-empty URL potentially surrounded by spaces - `srcdoc` : - A document to render in the iframe - - The source of an iframe srcdoc document* - `width` : - Horizontal dimension - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "iframe", void_element=True, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (allow is None or allow is False): - self._process_attr("allow", allow) - if not (allowfullscreen is None or allowfullscreen is False): - self._process_attr("allowfullscreen", allowfullscreen) - if not (height is None or height is False): - self._process_attr("height", height) - if not (loading is None or loading is False): - self._process_attr("loading", loading) - if not (name is None or name is False): - self._process_attr("name", name) - if not (referrerpolicy is None or referrerpolicy is False): - self._process_attr("referrerpolicy", referrerpolicy) - if not (sandbox is None or sandbox is False): - self._process_attr("sandbox", sandbox) - if not (src is None or src is False): - self._process_attr("src", src) - if not (srcdoc is None or srcdoc is False): - self._process_attr("srcdoc", srcdoc) - if not (width is None or width is False): - self._process_attr("width", width) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class img(BaseElement): - """ - The 'img' element. - Description: Image - Categories: flow phrasing embedded interactive* form-associated palpable - Parents: phrasing picture - Children: empty - Interface: HTMLImageElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img - """ # fmt: skip - - tag = "img" - categories = [ - "flow", - "phrasing", - "embedded", - "interactive*", - "form-associated", - "palpable", - ] - - class hint(GlobalAttrs, ImgAttrs): - """ - Type hints for "img" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - alt: Optional[str] = None, - crossorigin: Optional[ - Union[str, Literal["anonymous", "use-credentials"]] - ] = None, - decoding: Optional[Union[str, Literal["sync", "async", "auto"]]] = None, - fetchpriority: Optional[ - Union[str, Literal["auto", "high", "low"]] - ] = None, - height: Optional[Union[str, int]] = None, - ismap: Optional[Union[str, bool]] = None, - loading: Optional[Union[str, Literal["lazy", "eager"]]] = None, - referrerpolicy: Optional[str] = None, - sizes: Optional[str] = None, - src: Optional[str] = None, - srcset: Optional[str] = None, - usemap: Optional[str] = None, - width: Optional[Union[str, int]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'img' (Image) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `alt` : - Replacement text for use when images are not available - `crossorigin` : - How the element handles crossorigin requests - `decoding` : - Decoding hint to use when processing this image for presentation - `fetchpriority` : - Sets the priority for fetches initiated by the element - `height` : - Vertical dimension - `ismap` : - Whether the image is a server-side image map - `loading` : - Used when determining loading deferral - `referrerpolicy` : - Referrer policy for fetches initiated by the element - - Referrer policy - `sizes` : - Image sizes for different page layouts - - Valid source size list - `src` : - Address of the resource - - Valid non-empty URL potentially surrounded by spaces - `srcset` : - Images to use in different situations, e.g., high-resolution displays, small monitors, etc. - - Comma-separated list of image candidate strings - `usemap` : - Name of image map to use - - Valid hash-name reference* - `width` : - Horizontal dimension - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "img", void_element=True, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (alt is None or alt is False): - self._process_attr("alt", alt) - if not (crossorigin is None or crossorigin is False): - self._process_attr("crossorigin", crossorigin) - if not (decoding is None or decoding is False): - self._process_attr("decoding", decoding) - if not (fetchpriority is None or fetchpriority is False): - self._process_attr("fetchpriority", fetchpriority) - if not (height is None or height is False): - self._process_attr("height", height) - if not (ismap is None or ismap is False): - self._process_attr("ismap", ismap) - if not (loading is None or loading is False): - self._process_attr("loading", loading) - if not (referrerpolicy is None or referrerpolicy is False): - self._process_attr("referrerpolicy", referrerpolicy) - if not (sizes is None or sizes is False): - self._process_attr("sizes", sizes) - if not (src is None or src is False): - self._process_attr("src", src) - if not (srcset is None or srcset is False): - self._process_attr("srcset", srcset) - if not (usemap is None or usemap is False): - self._process_attr("usemap", usemap) - if not (width is None or width is False): - self._process_attr("width", width) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class input(BaseElement): # type: ignore[misc] - """ - The 'input' element. - Description: Form control - Categories: flow phrasing interactive* listed labelable submittable resettable form-associated palpable* - Parents: phrasing - Children: empty - Interface: HTMLInputElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input - """ # fmt: skip - - tag = "input" - categories = [ - "flow", - "phrasing", - "interactive*", - "listed", - "labelable", - "submittable", - "resettable", - "form-associated", - "palpable*", - ] - - class hint(GlobalAttrs, InputAttrs): - """ - Type hints for "input" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accept: Optional[str] = None, - alpha: Optional[Union[str, bool]] = None, - alt: Optional[str] = None, - autocomplete: Optional[str] = None, - checked: Optional[Union[str, bool]] = None, - colorspace: Optional[ - Union[str, Literal["limited-srgb", "display-p3"]] - ] = None, - dirname: Optional[str] = None, - disabled: Optional[Union[str, bool]] = None, - form: Optional[str] = None, - formaction: Optional[str] = None, - formenctype: Optional[ - Union[ - str, - Literal[ - "application/x-www-form-urlencoded", - "multipart/form-data", - "text/plain", - ], - ] - ] = None, - formmethod: Optional[ - Union[str, Literal["GET", "POST", "dialog"]] - ] = None, - formnovalidate: Optional[Union[str, bool]] = None, - formtarget: Optional[str] = None, - height: Optional[Union[str, int]] = None, - list: Optional[str] = None, - max: Optional[str] = None, - maxlength: Optional[Union[str, int]] = None, - min: Optional[str] = None, - minlength: Optional[Union[str, int]] = None, - multiple: Optional[Union[str, bool]] = None, - name: Optional[str] = None, - pattern: Optional[str] = None, - placeholder: Optional[str] = None, - popovertarget: Optional[str] = None, - popovertargetaction: Optional[ - Union[str, Literal["toggle", "show", "hide"]] - ] = None, - readonly: Optional[Union[str, bool]] = None, - required: Optional[Union[str, bool]] = None, - size: Optional[str] = None, - src: Optional[str] = None, - step: Optional[Union[str, float]] = None, - title: Optional[str] = None, - type: Optional[str] = None, - value: Optional[str] = None, - width: Optional[Union[str, int]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'input' (Form control) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accept` : - Hint for expected file type in file upload controls - - Set of comma-separated tokens* consisting of valid MIME type strings with no parameters or audio/*, video/*, or image/* - `alpha` : - Allow the color's alpha component to be set - `alt` : - Replacement text for use when images are not available - `autocomplete` : - Hint for form autofill feature - - Autofill field name and related tokens* - `checked` : - Whether the control is checked - `colorspace` : - The color space of the serialized color - `dirname` : - Name of form control to use for sending the element's directionality in form submission - `disabled` : - Whether the form control is disabled - `form` : - Associates the element with a form element - - ID* - `formaction` : - URL to use for form submission - - Valid non-empty URL potentially surrounded by spaces - `formenctype` : - Entry list encoding type to use for form submission - `formmethod` : - Variant to use for form submission - `formnovalidate` : - Bypass form control validation for form submission - `formtarget` : - Navigable for form submission - - Valid navigable target name or keyword - `height` : - Vertical dimension - `list` : - List of autocomplete options - - ID* - `max` : - Maximum value - - Varies* - `maxlength` : - Maximum length of value - `min` : - Minimum value - - Varies* - `minlength` : - Minimum length of value - `multiple` : - Whether to allow multiple values - `name` : - Name of the element to use for form submission and in the form.elements API - `pattern` : - Pattern to be matched by the form control's value - - Regular expression matching the JavaScript Pattern production - `placeholder` : - User-visible label to be placed within the form control - `popovertarget` : - Targets a popover element to toggle, show, or hide - - ID* - `popovertargetaction` : - Indicates whether a targeted popover element is to be toggled, shown, or hidden - `readonly` : - Whether to allow the value to be edited by the user - `required` : - Whether the control is required for form submission - `size` : - Size of the control - - Valid non-negative integer greater than zero - `src` : - Address of the resource - - Valid non-empty URL potentially surrounded by spaces - `step` : - Granularity to be matched by the form control's value - `title` : - Description of pattern (when used with pattern attribute) - `type` : - Type of form control - - input type keyword - `value` : - Value of the form control - - Varies* - `width` : - Horizontal dimension - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "input", void_element=True, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accept is None or accept is False): - self._process_attr("accept", accept) - if not (alpha is None or alpha is False): - self._process_attr("alpha", alpha) - if not (alt is None or alt is False): - self._process_attr("alt", alt) - if not (autocomplete is None or autocomplete is False): - self._process_attr("autocomplete", autocomplete) - if not (checked is None or checked is False): - self._process_attr("checked", checked) - if not (colorspace is None or colorspace is False): - self._process_attr("colorspace", colorspace) - if not (dirname is None or dirname is False): - self._process_attr("dirname", dirname) - if not (disabled is None or disabled is False): - self._process_attr("disabled", disabled) - if not (form is None or form is False): - self._process_attr("form", form) - if not (formaction is None or formaction is False): - self._process_attr("formaction", formaction) - if not (formenctype is None or formenctype is False): - self._process_attr("formenctype", formenctype) - if not (formmethod is None or formmethod is False): - self._process_attr("formmethod", formmethod) - if not (formnovalidate is None or formnovalidate is False): - self._process_attr("formnovalidate", formnovalidate) - if not (formtarget is None or formtarget is False): - self._process_attr("formtarget", formtarget) - if not (height is None or height is False): - self._process_attr("height", height) - if not (list is None or list is False): - self._process_attr("list", list) - if not (max is None or max is False): - self._process_attr("max", max) - if not (maxlength is None or maxlength is False): - self._process_attr("maxlength", maxlength) - if not (min is None or min is False): - self._process_attr("min", min) - if not (minlength is None or minlength is False): - self._process_attr("minlength", minlength) - if not (multiple is None or multiple is False): - self._process_attr("multiple", multiple) - if not (name is None or name is False): - self._process_attr("name", name) - if not (pattern is None or pattern is False): - self._process_attr("pattern", pattern) - if not (placeholder is None or placeholder is False): - self._process_attr("placeholder", placeholder) - if not (popovertarget is None or popovertarget is False): - self._process_attr("popovertarget", popovertarget) - if not (popovertargetaction is None or popovertargetaction is False): - self._process_attr("popovertargetaction", popovertargetaction) - if not (readonly is None or readonly is False): - self._process_attr("readonly", readonly) - if not (required is None or required is False): - self._process_attr("required", required) - if not (size is None or size is False): - self._process_attr("size", size) - if not (src is None or src is False): - self._process_attr("src", src) - if not (step is None or step is False): - self._process_attr("step", step) - if not (title is None or title is False): - self._process_attr("title", title) - if not (type is None or type is False): - self._process_attr("type", type) - if not (value is None or value is False): - self._process_attr("value", value) - if not (width is None or width is False): - self._process_attr("width", width) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class ins(BaseElement): - """ - The 'ins' element. - Description: An addition to the document - Categories: flow phrasing* palpable - Parents: phrasing - Children: transparent - Interface: HTMLModElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ins - """ # fmt: skip - - tag = "ins" - categories = ["flow", "phrasing*", "palpable"] - - class hint(GlobalAttrs, InsAttrs): - """ - Type hints for "ins" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - cite: Optional[str] = None, - datetime: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'ins' (An addition to the document) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ins - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `cite` : - Link to the source of the quotation or more information about the edit - - Valid URL potentially surrounded by spaces - `datetime` : - Date and (optionally) time of the change - - Valid date string with optional time - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "ins", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (cite is None or cite is False): - self._process_attr("cite", cite) - if not (datetime is None or datetime is False): - self._process_attr("datetime", datetime) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class kbd(BaseElement): - """ - The 'kbd' element. - Description: User input - Categories: flow phrasing palpable - Parents: phrasing - Children: phrasing - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/kbd - """ # fmt: skip - - tag = "kbd" - categories = ["flow", "phrasing", "palpable"] - - class hint(GlobalAttrs): - """ - Type hints for "kbd" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'kbd' (User input) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/kbd - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "kbd", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class label(BaseElement): - """ - The 'label' element. - Description: Caption for a form control - Categories: flow phrasing interactive palpable - Parents: phrasing - Children: phrasing* - Interface: HTMLLabelElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label - """ # fmt: skip - - tag = "label" - categories = ["flow", "phrasing", "interactive", "palpable"] - - class hint(GlobalAttrs, LabelAttrs): - """ - Type hints for "label" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - for_: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'label' (Caption for a form control) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `for_` : - Associate the label with form control - - ID* - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "label", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (for_ is None or for_ is False): - self._process_attr("for", for_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class legend(BaseElement): - """ - The 'legend' element. - Description: Caption for fieldset - Categories: none - Parents: fieldset - Children: phrasing heading content - Interface: HTMLLegendElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/legend - """ # fmt: skip - - tag = "legend" - categories = ["none"] - - class hint(GlobalAttrs): - """ - Type hints for "legend" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'legend' (Caption for fieldset) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/legend - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "legend", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class li(BaseElement): - """ - The 'li' element. - Description: List item - Categories: none - Parents: ol ul menu* - Children: flow - Interface: HTMLLIElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/li - """ # fmt: skip - - tag = "li" - categories = ["none"] - - class hint(GlobalAttrs, LiAttrs): - """ - Type hints for "li" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - value: Optional[Union[str, int]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'li' (List item) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/li - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `value` : - Ordinal value of the list item - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "li", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (value is None or value is False): - self._process_attr("value", value) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class link(BaseElement): # type: ignore[misc] - """ - The 'link' element. - Description: Link metadata - Categories: metadata flow* phrasing* - Parents: head noscript* phrasing* - Children: empty - Interface: HTMLLinkElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link - """ # fmt: skip - - tag = "link" - categories = ["metadata", "flow*", "phrasing*"] - - class hint(GlobalAttrs, LinkAttrs): - """ - Type hints for "link" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - as_: Optional[str] = None, - blocking: Optional[Union[str, list]] = None, - color: Optional[str] = None, - crossorigin: Optional[ - Union[str, Literal["anonymous", "use-credentials"]] - ] = None, - disabled: Optional[Union[str, bool]] = None, - fetchpriority: Optional[ - Union[str, Literal["auto", "high", "low"]] - ] = None, - href: Optional[str] = None, - hreflang: Optional[str] = None, - imagesizes: Optional[str] = None, - imagesrcset: Optional[str] = None, - integrity: Optional[str] = None, - media: Optional[str] = None, - referrerpolicy: Optional[str] = None, - rel: Optional[Union[str, list]] = None, - sizes: Optional[Union[str, list]] = None, - title: Optional[str] = None, - type: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'link' (Link metadata) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `as_` : - Potential destination for a preload request (for rel="preload" and rel="modulepreload") - - Potential destination, for rel="preload"; script-like destination, for rel="modulepreload" - `blocking` : - Whether the element is potentially render-blocking - `color` : - Color to use when customizing a site's icon (for rel="mask-icon") - - CSS - `crossorigin` : - How the element handles crossorigin requests - `disabled` : - Whether the link is disabled - `fetchpriority` : - Sets the priority for fetches initiated by the element - `href` : - Address of the hyperlink - - Valid non-empty URL potentially surrounded by spaces - `hreflang` : - Language of the linked resource - - Valid BCP 47 language tag - `imagesizes` : - Image sizes for different page layouts (for rel="preload") - - Valid source size list - `imagesrcset` : - Images to use in different situations, e.g., high-resolution displays, small monitors, etc. (for rel="preload") - - Comma-separated list of image candidate strings - `integrity` : - Integrity metadata used in Subresource Integrity checks [SRI] - `media` : - Applicable media - - Valid media query list - `referrerpolicy` : - Referrer policy for fetches initiated by the element - - Referrer policy - `rel` : - Relationship between the document containing the hyperlink and the destination resource - `sizes` : - Sizes of the icons (for rel="icon") - `title` : - CSS style sheet set name - `title` : - Title of the link - `type` : - Hint for the type of the referenced resource - - Valid MIME type string - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "link", void_element=True, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (as_ is None or as_ is False): - self._process_attr("as", as_) - if not (blocking is None or blocking is False): - self._process_attr("blocking", blocking) - if not (color is None or color is False): - self._process_attr("color", color) - if not (crossorigin is None or crossorigin is False): - self._process_attr("crossorigin", crossorigin) - if not (disabled is None or disabled is False): - self._process_attr("disabled", disabled) - if not (fetchpriority is None or fetchpriority is False): - self._process_attr("fetchpriority", fetchpriority) - if not (href is None or href is False): - self._process_attr("href", href) - if not (hreflang is None or hreflang is False): - self._process_attr("hreflang", hreflang) - if not (imagesizes is None or imagesizes is False): - self._process_attr("imagesizes", imagesizes) - if not (imagesrcset is None or imagesrcset is False): - self._process_attr("imagesrcset", imagesrcset) - if not (integrity is None or integrity is False): - self._process_attr("integrity", integrity) - if not (media is None or media is False): - self._process_attr("media", media) - if not (referrerpolicy is None or referrerpolicy is False): - self._process_attr("referrerpolicy", referrerpolicy) - if not (rel is None or rel is False): - self._process_attr("rel", rel) - if not (sizes is None or sizes is False): - self._process_attr("sizes", sizes) - if not (title is None or title is False): - self._process_attr("title", title) - if not (type is None or type is False): - self._process_attr("type", type) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class main(BaseElement): - """ - The 'main' element. - Description: Container for the dominant contents of the document - Categories: flow palpable - Parents: flow* - Children: flow - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/main - """ # fmt: skip - - tag = "main" - categories = ["flow", "palpable"] - - class hint(GlobalAttrs): - """ - Type hints for "main" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'main' (Container for the dominant contents of the document) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/main - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "main", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class map(BaseElement): - """ - The 'map' element. - Description: Image map - Categories: flow phrasing* palpable - Parents: phrasing - Children: transparent area* - Interface: HTMLMapElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/map - """ # fmt: skip - - tag = "map" - categories = ["flow", "phrasing*", "palpable"] - - class hint(GlobalAttrs, MapAttrs): - """ - Type hints for "map" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - name: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'map' (Image map) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/map - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `name` : - Name of image map to reference from the usemap attribute - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "map", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (name is None or name is False): - self._process_attr("name", name) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class mark(BaseElement): - """ - The 'mark' element. - Description: Highlight - Categories: flow phrasing palpable - Parents: phrasing - Children: phrasing - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/mark - """ # fmt: skip - - tag = "mark" - categories = ["flow", "phrasing", "palpable"] - - class hint(GlobalAttrs): - """ - Type hints for "mark" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'mark' (Highlight) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/mark - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "mark", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class menu(BaseElement): - """ - The 'menu' element. - Description: Menu of commands - Categories: flow palpable* - Parents: flow - Children: li script-supporting elements - Interface: HTMLMenuElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/menu - """ # fmt: skip - - tag = "menu" - categories = ["flow", "palpable*"] - - class hint(GlobalAttrs): - """ - Type hints for "menu" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'menu' (Menu of commands) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/menu - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "menu", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class meta(BaseElement): - """ - The 'meta' element. - Description: Text metadata - Categories: metadata flow* phrasing* - Parents: head noscript* phrasing* - Children: empty - Interface: HTMLMetaElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta - """ # fmt: skip - - tag = "meta" - categories = ["metadata", "flow*", "phrasing*"] - - class hint(GlobalAttrs, MetaAttrs): - """ - Type hints for "meta" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - charset: Optional[Union[str, Literal["utf-8"]]] = None, - content: Optional[str] = None, - http_equiv: Optional[ - Union[ - str, - Literal[ - "content-type", - "default-style", - "refresh", - "x-ua-compatible", - "content-security-policy", - ], - ] - ] = None, - media: Optional[str] = None, - name: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'meta' (Text metadata) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `charset` : - Character encoding declaration - `content` : - Value of the element - `http_equiv` : - Pragma directive - `media` : - Applicable media - - Valid media query list - `name` : - Metadata name - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "meta", void_element=True, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (charset is None or charset is False): - self._process_attr("charset", charset) - if not (content is None or content is False): - self._process_attr("content", content) - if not (http_equiv is None or http_equiv is False): - self._process_attr("http-equiv", http_equiv) - if not (media is None or media is False): - self._process_attr("media", media) - if not (name is None or name is False): - self._process_attr("name", name) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class meter(BaseElement): - """ - The 'meter' element. - Description: Gauge - Categories: flow phrasing labelable palpable - Parents: phrasing - Children: phrasing* - Interface: HTMLMeterElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meter - """ # fmt: skip - - tag = "meter" - categories = ["flow", "phrasing", "labelable", "palpable"] - - class hint(GlobalAttrs, MeterAttrs): - """ - Type hints for "meter" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - high: Optional[Union[str, float]] = None, - low: Optional[Union[str, float]] = None, - max: Optional[Union[str, float]] = None, - min: Optional[Union[str, float]] = None, - optimum: Optional[Union[str, float]] = None, - value: Optional[Union[str, float]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'meter' (Gauge) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meter - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `high` : - Low limit of high range - `low` : - High limit of low range - `max` : - Upper bound of range - `min` : - Lower bound of range - `optimum` : - Optimum value in gauge - `value` : - Current value of the element - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "meter", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (high is None or high is False): - self._process_attr("high", high) - if not (low is None or low is False): - self._process_attr("low", low) - if not (max is None or max is False): - self._process_attr("max", max) - if not (min is None or min is False): - self._process_attr("min", min) - if not (optimum is None or optimum is False): - self._process_attr("optimum", optimum) - if not (value is None or value is False): - self._process_attr("value", value) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class nav(BaseElement): - """ - The 'nav' element. - Description: Section with navigational links - Categories: flow sectioning palpable - Parents: flow - Children: flow - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/nav - """ # fmt: skip - - tag = "nav" - categories = ["flow", "sectioning", "palpable"] - - class hint(GlobalAttrs): - """ - Type hints for "nav" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'nav' (Section with navigational links) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/nav - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "nav", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class noscript(BaseElement): - """ - The 'noscript' element. - Description: Fallback content for script - Categories: metadata flow phrasing - Parents: head* phrasing* - Children: varies* - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/noscript - """ # fmt: skip - - tag = "noscript" - categories = ["metadata", "flow", "phrasing"] - - class hint(GlobalAttrs): - """ - Type hints for "noscript" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'noscript' (Fallback content for script) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/noscript - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "noscript", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class object(BaseElement): - """ - The 'object' element. - Description: Image, child navigable, or plugin - Categories: flow phrasing embedded interactive* listed form-associated palpable - Parents: phrasing - Children: transparent - Interface: HTMLObjectElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/object - """ # fmt: skip - - tag = "object" - categories = [ - "flow", - "phrasing", - "embedded", - "interactive*", - "listed", - "form-associated", - "palpable", - ] - - class hint(GlobalAttrs, ObjectAttrs): - """ - Type hints for "object" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - data: Optional[str] = None, - form: Optional[str] = None, - height: Optional[Union[str, int]] = None, - name: Optional[str] = None, - type: Optional[str] = None, - width: Optional[Union[str, int]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'object' (Image, child navigable, or plugin) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/object - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `data` : - Address of the resource - - Valid non-empty URL potentially surrounded by spaces - `form` : - Associates the element with a form element - - ID* - `height` : - Vertical dimension - `name` : - Name of content navigable - - Valid navigable target name or keyword - `type` : - Type of embedded resource - - Valid MIME type string - `width` : - Horizontal dimension - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "object", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (data is None or data is False): - self._process_attr("data", data) - if not (form is None or form is False): - self._process_attr("form", form) - if not (height is None or height is False): - self._process_attr("height", height) - if not (name is None or name is False): - self._process_attr("name", name) - if not (type is None or type is False): - self._process_attr("type", type) - if not (width is None or width is False): - self._process_attr("width", width) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class ol(BaseElement): - """ - The 'ol' element. - Description: Ordered list - Categories: flow palpable* - Parents: flow - Children: li script-supporting elements - Interface: HTMLOListElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ol - """ # fmt: skip - - tag = "ol" - categories = ["flow", "palpable*"] - - class hint(GlobalAttrs, OlAttrs): - """ - Type hints for "ol" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - reversed: Optional[Union[str, bool]] = None, - start: Optional[Union[str, int]] = None, - type: Optional[Union[str, Literal["1", "a", "A", "i", "I"]]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'ol' (Ordered list) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ol - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `reversed` : - Number the list backwards - `start` : - Starting value of the list - `type` : - Kind of list marker - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "ol", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (reversed is None or reversed is False): - self._process_attr("reversed", reversed) - if not (start is None or start is False): - self._process_attr("start", start) - if not (type is None or type is False): - self._process_attr("type", type) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class optgroup(BaseElement): - """ - The 'optgroup' element. - Description: Group of options in a list box - Categories: none - Parents: select - Children: option script-supporting elements - Interface: HTMLOptGroupElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/optgroup - """ # fmt: skip - - tag = "optgroup" - categories = ["none"] - - class hint(GlobalAttrs, OptgroupAttrs): - """ - Type hints for "optgroup" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - disabled: Optional[Union[str, bool]] = None, - label: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'optgroup' (Group of options in a list box) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/optgroup - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `disabled` : - Whether the form control is disabled - `label` : - User-visible label - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "optgroup", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (disabled is None or disabled is False): - self._process_attr("disabled", disabled) - if not (label is None or label is False): - self._process_attr("label", label) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class option(BaseElement): - """ - The 'option' element. - Description: Option in a list box or combo box control - Categories: none - Parents: select datalist optgroup - Children: text* - Interface: HTMLOptionElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option - """ # fmt: skip - - tag = "option" - categories = ["none"] - - class hint(GlobalAttrs, OptionAttrs): - """ - Type hints for "option" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - disabled: Optional[Union[str, bool]] = None, - label: Optional[str] = None, - selected: Optional[Union[str, bool]] = None, - value: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'option' (Option in a list box or combo box control) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `disabled` : - Whether the form control is disabled - `label` : - User-visible label - `selected` : - Whether the option is selected by default - `value` : - Value to be used for form submission - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "option", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (disabled is None or disabled is False): - self._process_attr("disabled", disabled) - if not (label is None or label is False): - self._process_attr("label", label) - if not (selected is None or selected is False): - self._process_attr("selected", selected) - if not (value is None or value is False): - self._process_attr("value", value) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class output(BaseElement): - """ - The 'output' element. - Description: Calculated output value - Categories: flow phrasing listed labelable resettable form-associated palpable - Parents: phrasing - Children: phrasing - Interface: HTMLOutputElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/output - """ # fmt: skip - - tag = "output" - categories = [ - "flow", - "phrasing", - "listed", - "labelable", - "resettable", - "form-associated", - "palpable", - ] - - class hint(GlobalAttrs, OutputAttrs): - """ - Type hints for "output" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - for_: Optional[Union[str, list]] = None, - form: Optional[str] = None, - name: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'output' (Calculated output value) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/output - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `for_` : - Specifies controls from which the output was calculated - `form` : - Associates the element with a form element - - ID* - `name` : - Name of the element to use for form submission and in the form.elements API - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "output", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (for_ is None or for_ is False): - self._process_attr("for", for_) - if not (form is None or form is False): - self._process_attr("form", form) - if not (name is None or name is False): - self._process_attr("name", name) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class p(BaseElement): - """ - The 'p' element. - Description: Paragraph - Categories: flow palpable - Parents: flow - Children: phrasing - Interface: HTMLParagraphElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/p - """ # fmt: skip - - tag = "p" - categories = ["flow", "palpable"] - - class hint(GlobalAttrs): - """ - Type hints for "p" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'p' (Paragraph) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/p - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "p", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class picture(BaseElement): - """ - The 'picture' element. - Description: Image - Categories: flow phrasing embedded palpable - Parents: phrasing - Children: source* one img script-supporting elements - Interface: HTMLPictureElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture - """ # fmt: skip - - tag = "picture" - categories = ["flow", "phrasing", "embedded", "palpable"] - - class hint(GlobalAttrs): - """ - Type hints for "picture" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'picture' (Image) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "picture", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class pre(BaseElement): - """ - The 'pre' element. - Description: Block of preformatted text - Categories: flow palpable - Parents: flow - Children: phrasing - Interface: HTMLPreElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/pre - """ # fmt: skip - - tag = "pre" - categories = ["flow", "palpable"] - - class hint(GlobalAttrs): - """ - Type hints for "pre" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'pre' (Block of preformatted text) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/pre - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "pre", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class progress(BaseElement): - """ - The 'progress' element. - Description: Progress bar - Categories: flow phrasing labelable palpable - Parents: phrasing - Children: phrasing* - Interface: HTMLProgressElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/progress - """ # fmt: skip - - tag = "progress" - categories = ["flow", "phrasing", "labelable", "palpable"] - - class hint(GlobalAttrs, ProgressAttrs): - """ - Type hints for "progress" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - max: Optional[Union[str, float]] = None, - value: Optional[Union[str, float]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'progress' (Progress bar) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/progress - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `max` : - Upper bound of range - `value` : - Current value of the element - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "progress", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (max is None or max is False): - self._process_attr("max", max) - if not (value is None or value is False): - self._process_attr("value", value) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class q(BaseElement): - """ - The 'q' element. - Description: Quotation - Categories: flow phrasing palpable - Parents: phrasing - Children: phrasing - Interface: HTMLQuoteElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/q - """ # fmt: skip - - tag = "q" - categories = ["flow", "phrasing", "palpable"] - - class hint(GlobalAttrs, QAttrs): - """ - Type hints for "q" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - cite: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'q' (Quotation) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/q - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `cite` : - Link to the source of the quotation or more information about the edit - - Valid URL potentially surrounded by spaces - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "q", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (cite is None or cite is False): - self._process_attr("cite", cite) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class rp(BaseElement): - """ - The 'rp' element. - Description: Parenthesis for ruby annotation text - Categories: none - Parents: ruby - Children: text - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/rp - """ # fmt: skip - - tag = "rp" - categories = ["none"] - - class hint(GlobalAttrs): - """ - Type hints for "rp" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'rp' (Parenthesis for ruby annotation text) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/rp - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "rp", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class rt(BaseElement): - """ - The 'rt' element. - Description: Ruby annotation text - Categories: none - Parents: ruby - Children: phrasing - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/rt - """ # fmt: skip - - tag = "rt" - categories = ["none"] - - class hint(GlobalAttrs): - """ - Type hints for "rt" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'rt' (Ruby annotation text) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/rt - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "rt", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class ruby(BaseElement): - """ - The 'ruby' element. - Description: Ruby annotation(s) - Categories: flow phrasing palpable - Parents: phrasing - Children: phrasing rt rp* - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ruby - """ # fmt: skip - - tag = "ruby" - categories = ["flow", "phrasing", "palpable"] - - class hint(GlobalAttrs): - """ - Type hints for "ruby" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'ruby' (Ruby annotation(s)) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ruby - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "ruby", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class s(BaseElement): - """ - The 's' element. - Description: Inaccurate text - Categories: flow phrasing palpable - Parents: phrasing - Children: phrasing - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/s - """ # fmt: skip - - tag = "s" - categories = ["flow", "phrasing", "palpable"] - - class hint(GlobalAttrs): - """ - Type hints for "s" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 's' (Inaccurate text) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/s - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "s", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class samp(BaseElement): - """ - The 'samp' element. - Description: Computer output - Categories: flow phrasing palpable - Parents: phrasing - Children: phrasing - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/samp - """ # fmt: skip - - tag = "samp" - categories = ["flow", "phrasing", "palpable"] - - class hint(GlobalAttrs): - """ - Type hints for "samp" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'samp' (Computer output) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/samp - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "samp", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class script(BaseElement): - """ - The 'script' element. - Description: Embedded script - Categories: metadata flow phrasing script-supporting - Parents: head phrasing script-supporting - Children: script, data, or script documentation* - Interface: HTMLScriptElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script - """ # fmt: skip - - tag = "script" - categories = ["metadata", "flow", "phrasing", "script-supporting"] - - class hint(GlobalAttrs, ScriptAttrs): - """ - Type hints for "script" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - async_: Optional[Union[str, bool]] = None, - blocking: Optional[Union[str, list]] = None, - crossorigin: Optional[ - Union[str, Literal["anonymous", "use-credentials"]] - ] = None, - defer: Optional[Union[str, bool]] = None, - fetchpriority: Optional[ - Union[str, Literal["auto", "high", "low"]] - ] = None, - integrity: Optional[str] = None, - nomodule: Optional[Union[str, bool]] = None, - referrerpolicy: Optional[str] = None, - src: Optional[str] = None, - type: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'script' (Embedded script) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `async_` : - Execute script when available, without blocking while fetching - `blocking` : - Whether the element is potentially render-blocking - `crossorigin` : - How the element handles crossorigin requests - `defer` : - Defer script execution - `fetchpriority` : - Sets the priority for fetches initiated by the element - `integrity` : - Integrity metadata used in Subresource Integrity checks [SRI] - `nomodule` : - Prevents execution in user agents that support module scripts - `referrerpolicy` : - Referrer policy for fetches initiated by the element - - Referrer policy - `src` : - Address of the resource - - Valid non-empty URL potentially surrounded by spaces - `type` : - Type of script - - "module"; a valid MIME type string that is not a JavaScript MIME type essence match - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "script", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (async_ is None or async_ is False): - self._process_attr("async", async_) - if not (blocking is None or blocking is False): - self._process_attr("blocking", blocking) - if not (crossorigin is None or crossorigin is False): - self._process_attr("crossorigin", crossorigin) - if not (defer is None or defer is False): - self._process_attr("defer", defer) - if not (fetchpriority is None or fetchpriority is False): - self._process_attr("fetchpriority", fetchpriority) - if not (integrity is None or integrity is False): - self._process_attr("integrity", integrity) - if not (nomodule is None or nomodule is False): - self._process_attr("nomodule", nomodule) - if not (referrerpolicy is None or referrerpolicy is False): - self._process_attr("referrerpolicy", referrerpolicy) - if not (src is None or src is False): - self._process_attr("src", src) - if not (type is None or type is False): - self._process_attr("type", type) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class search(BaseElement): - """ - The 'search' element. - Description: Container for search controls - Categories: flow palpable - Parents: flow - Children: flow - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/search - """ # fmt: skip - - tag = "search" - categories = ["flow", "palpable"] - - class hint(GlobalAttrs): - """ - Type hints for "search" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'search' (Container for search controls) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/search - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "search", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class section(BaseElement): - """ - The 'section' element. - Description: Generic document or application section - Categories: flow sectioning palpable - Parents: flow - Children: flow - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/section - """ # fmt: skip - - tag = "section" - categories = ["flow", "sectioning", "palpable"] - - class hint(GlobalAttrs): - """ - Type hints for "section" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'section' (Generic document or application section) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/section - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "section", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class select(BaseElement): - """ - The 'select' element. - Description: List box control - Categories: flow phrasing interactive listed labelable submittable resettable form-associated palpable - Parents: phrasing - Children: option optgroup script-supporting elements - Interface: HTMLSelectElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select - """ # fmt: skip - - tag = "select" - categories = [ - "flow", - "phrasing", - "interactive", - "listed", - "labelable", - "submittable", - "resettable", - "form-associated", - "palpable", - ] - - class hint(GlobalAttrs, SelectAttrs): - """ - Type hints for "select" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - autocomplete: Optional[str] = None, - disabled: Optional[Union[str, bool]] = None, - form: Optional[str] = None, - multiple: Optional[Union[str, bool]] = None, - name: Optional[str] = None, - required: Optional[Union[str, bool]] = None, - size: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'select' (List box control) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `autocomplete` : - Hint for form autofill feature - - Autofill field name and related tokens* - `disabled` : - Whether the form control is disabled - `form` : - Associates the element with a form element - - ID* - `multiple` : - Whether to allow multiple values - `name` : - Name of the element to use for form submission and in the form.elements API - `required` : - Whether the control is required for form submission - `size` : - Size of the control - - Valid non-negative integer greater than zero - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "select", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (autocomplete is None or autocomplete is False): - self._process_attr("autocomplete", autocomplete) - if not (disabled is None or disabled is False): - self._process_attr("disabled", disabled) - if not (form is None or form is False): - self._process_attr("form", form) - if not (multiple is None or multiple is False): - self._process_attr("multiple", multiple) - if not (name is None or name is False): - self._process_attr("name", name) - if not (required is None or required is False): - self._process_attr("required", required) - if not (size is None or size is False): - self._process_attr("size", size) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class slot(BaseElement): - """ - The 'slot' element. - Description: Shadow tree slot - Categories: flow phrasing - Parents: phrasing - Children: transparent - Interface: HTMLSlotElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/slot - """ # fmt: skip - - tag = "slot" - categories = ["flow", "phrasing"] - - class hint(GlobalAttrs, SlotAttrs): - """ - Type hints for "slot" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - name: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'slot' (Shadow tree slot) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/slot - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `name` : - Name of shadow tree slot - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "slot", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (name is None or name is False): - self._process_attr("name", name) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class small(BaseElement): - """ - The 'small' element. - Description: Side comment - Categories: flow phrasing palpable - Parents: phrasing - Children: phrasing - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/small - """ # fmt: skip - - tag = "small" - categories = ["flow", "phrasing", "palpable"] - - class hint(GlobalAttrs): - """ - Type hints for "small" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'small' (Side comment) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/small - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "small", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class source(BaseElement): - """ - The 'source' element. - Description: Image source for img or media source for video or audio - Categories: none - Parents: picture video audio - Children: empty - Interface: HTMLSourceElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source - """ # fmt: skip - - tag = "source" - categories = ["none"] - - class hint(GlobalAttrs, SourceAttrs): - """ - Type hints for "source" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - height: Optional[Union[str, int]] = None, - media: Optional[str] = None, - sizes: Optional[str] = None, - src: Optional[str] = None, - srcset: Optional[str] = None, - type: Optional[str] = None, - width: Optional[Union[str, int]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'source' (Image source for img or media source for video or audio) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `height` : - Vertical dimension - `media` : - Applicable media - - Valid media query list - `sizes` : - Image sizes for different page layouts - - Valid source size list - `src` : - Address of the resource - - Valid non-empty URL potentially surrounded by spaces - `srcset` : - Images to use in different situations, e.g., high-resolution displays, small monitors, etc. - - Comma-separated list of image candidate strings - `type` : - Type of embedded resource - - Valid MIME type string - `width` : - Horizontal dimension - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "source", void_element=True, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (height is None or height is False): - self._process_attr("height", height) - if not (media is None or media is False): - self._process_attr("media", media) - if not (sizes is None or sizes is False): - self._process_attr("sizes", sizes) - if not (src is None or src is False): - self._process_attr("src", src) - if not (srcset is None or srcset is False): - self._process_attr("srcset", srcset) - if not (type is None or type is False): - self._process_attr("type", type) - if not (width is None or width is False): - self._process_attr("width", width) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class span(BaseElement): - """ - The 'span' element. - Description: Generic phrasing container - Categories: flow phrasing palpable - Parents: phrasing - Children: phrasing - Interface: HTMLSpanElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/span - """ # fmt: skip - - tag = "span" - categories = ["flow", "phrasing", "palpable"] - - class hint(GlobalAttrs): - """ - Type hints for "span" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'span' (Generic phrasing container) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/span - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "span", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class strong(BaseElement): - """ - The 'strong' element. - Description: Importance - Categories: flow phrasing palpable - Parents: phrasing - Children: phrasing - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/strong - """ # fmt: skip - - tag = "strong" - categories = ["flow", "phrasing", "palpable"] - - class hint(GlobalAttrs): - """ - Type hints for "strong" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'strong' (Importance) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/strong - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "strong", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class style(BaseElement): # type: ignore[misc] - """ - The 'style' element. - Description: Embedded styling information - Categories: metadata - Parents: head noscript* - Children: text* - Interface: HTMLStyleElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/style - """ # fmt: skip - - tag = "style" - categories = ["metadata"] - - class hint(GlobalAttrs, StyleAttrs): - """ - Type hints for "style" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - blocking: Optional[Union[str, list]] = None, - media: Optional[str] = None, - title: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'style' (Embedded styling information) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/style - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `blocking` : - Whether the element is potentially render-blocking - `media` : - Applicable media - - Valid media query list - `title` : - CSS style sheet set name - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "style", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (blocking is None or blocking is False): - self._process_attr("blocking", blocking) - if not (media is None or media is False): - self._process_attr("media", media) - if not (title is None or title is False): - self._process_attr("title", title) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class sub(BaseElement): - """ - The 'sub' element. - Description: Subscript - Categories: flow phrasing palpable - Parents: phrasing - Children: phrasing - Interface: HTMLElement - Documentation: None - """ # fmt: skip - - tag = "sub" - categories = ["flow", "phrasing", "palpable"] - - class hint(GlobalAttrs): - """ - Type hints for "sub" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'sub' (Subscript) element. - Documentation: None - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "sub", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class summary(BaseElement): - """ - The 'summary' element. - Description: Caption for details - Categories: none - Parents: details - Children: phrasing heading content - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/summary - """ # fmt: skip - - tag = "summary" - categories = ["none"] - - class hint(GlobalAttrs): - """ - Type hints for "summary" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'summary' (Caption for details) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/summary - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "summary", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class sup(BaseElement): - """ - The 'sup' element. - Description: Superscript - Categories: flow phrasing palpable - Parents: phrasing - Children: phrasing - Interface: HTMLElement - Documentation: None - """ # fmt: skip - - tag = "sup" - categories = ["flow", "phrasing", "palpable"] - - class hint(GlobalAttrs): - """ - Type hints for "sup" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'sup' (Superscript) element. - Documentation: None - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "sup", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class svg(BaseElement): - """ - The 'svg' element. - Description: SVG root - Categories: flow phrasing embedded palpable - Parents: phrasing - Children: per [SVG] - Interface: SVGSVGElement - Documentation: None - """ # fmt: skip - - tag = "svg" - categories = ["flow", "phrasing", "embedded", "palpable"] - - class hint(GlobalAttrs): - """ - Type hints for "svg" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'svg' (SVG root) element. - Documentation: None - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "svg", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class table(BaseElement): - """ - The 'table' element. - Description: Table - Categories: flow palpable - Parents: flow - Children: caption* colgroup* thead* tbody* tfoot* tr* script-supporting elements - Interface: HTMLTableElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table - """ # fmt: skip - - tag = "table" - categories = ["flow", "palpable"] - - class hint(GlobalAttrs): - """ - Type hints for "table" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'table' (Table) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "table", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class tbody(BaseElement): - """ - The 'tbody' element. - Description: Group of rows in a table - Categories: none - Parents: table - Children: tr script-supporting elements - Interface: HTMLTableSectionElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tbody - """ # fmt: skip - - tag = "tbody" - categories = ["none"] - - class hint(GlobalAttrs): - """ - Type hints for "tbody" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'tbody' (Group of rows in a table) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tbody - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "tbody", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class td(BaseElement): - """ - The 'td' element. - Description: Table cell - Categories: none - Parents: tr - Children: flow - Interface: HTMLTableCellElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td - """ # fmt: skip - - tag = "td" - categories = ["none"] - - class hint(GlobalAttrs, TdAttrs): - """ - Type hints for "td" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - colspan: Optional[str] = None, - headers: Optional[Union[str, list]] = None, - rowspan: Optional[Union[str, int]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'td' (Table cell) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `colspan` : - Number of columns that the cell is to span - - Valid non-negative integer greater than zero - `headers` : - The header cells for this cell - `rowspan` : - Number of rows that the cell is to span - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "td", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (colspan is None or colspan is False): - self._process_attr("colspan", colspan) - if not (headers is None or headers is False): - self._process_attr("headers", headers) - if not (rowspan is None or rowspan is False): - self._process_attr("rowspan", rowspan) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class template(BaseElement): - """ - The 'template' element. - Description: Template - Categories: metadata flow phrasing script-supporting - Parents: metadata phrasing script-supporting colgroup* - Children: empty - Interface: HTMLTemplateElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/template - """ # fmt: skip - - tag = "template" - categories = ["metadata", "flow", "phrasing", "script-supporting"] - - class hint(GlobalAttrs, TemplateAttrs): - """ - Type hints for "template" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - shadowrootclonable: Optional[Union[str, bool]] = None, - shadowrootdelegatesfocus: Optional[Union[str, bool]] = None, - shadowrootmode: Optional[Union[str, Literal["open", "closed"]]] = None, - shadowrootserializable: Optional[Union[str, bool]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'template' (Template) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/template - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `shadowrootclonable` : - Sets clonable on a declarative shadow root - `shadowrootdelegatesfocus` : - Sets delegates focus on a declarative shadow root - `shadowrootmode` : - Enables streaming declarative shadow roots - `shadowrootserializable` : - Sets serializable on a declarative shadow root - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "template", void_element=True, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (shadowrootclonable is None or shadowrootclonable is False): - self._process_attr("shadowrootclonable", shadowrootclonable) - if not ( - shadowrootdelegatesfocus is None - or shadowrootdelegatesfocus is False - ): - self._process_attr( - "shadowrootdelegatesfocus", shadowrootdelegatesfocus - ) - if not (shadowrootmode is None or shadowrootmode is False): - self._process_attr("shadowrootmode", shadowrootmode) - if not ( - shadowrootserializable is None or shadowrootserializable is False - ): - self._process_attr("shadowrootserializable", shadowrootserializable) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class textarea(BaseElement): - """ - The 'textarea' element. - Description: Multiline text controls - Categories: flow phrasing interactive listed labelable submittable resettable form-associated palpable - Parents: phrasing - Children: text - Interface: HTMLTextAreaElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea - """ # fmt: skip - - tag = "textarea" - categories = [ - "flow", - "phrasing", - "interactive", - "listed", - "labelable", - "submittable", - "resettable", - "form-associated", - "palpable", - ] - - class hint(GlobalAttrs, TextareaAttrs): - """ - Type hints for "textarea" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - autocomplete: Optional[str] = None, - cols: Optional[str] = None, - dirname: Optional[str] = None, - disabled: Optional[Union[str, bool]] = None, - form: Optional[str] = None, - maxlength: Optional[Union[str, int]] = None, - minlength: Optional[Union[str, int]] = None, - name: Optional[str] = None, - placeholder: Optional[str] = None, - readonly: Optional[Union[str, bool]] = None, - required: Optional[Union[str, bool]] = None, - rows: Optional[str] = None, - wrap: Optional[Union[str, Literal["soft", "hard"]]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'textarea' (Multiline text controls) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `autocomplete` : - Hint for form autofill feature - - Autofill field name and related tokens* - `cols` : - Maximum number of characters per line - - Valid non-negative integer greater than zero - `dirname` : - Name of form control to use for sending the element's directionality in form submission - `disabled` : - Whether the form control is disabled - `form` : - Associates the element with a form element - - ID* - `maxlength` : - Maximum length of value - `minlength` : - Minimum length of value - `name` : - Name of the element to use for form submission and in the form.elements API - `placeholder` : - User-visible label to be placed within the form control - `readonly` : - Whether to allow the value to be edited by the user - `required` : - Whether the control is required for form submission - `rows` : - Number of lines to show - - Valid non-negative integer greater than zero - `wrap` : - How the value of the form control is to be wrapped for form submission - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "textarea", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (autocomplete is None or autocomplete is False): - self._process_attr("autocomplete", autocomplete) - if not (cols is None or cols is False): - self._process_attr("cols", cols) - if not (dirname is None or dirname is False): - self._process_attr("dirname", dirname) - if not (disabled is None or disabled is False): - self._process_attr("disabled", disabled) - if not (form is None or form is False): - self._process_attr("form", form) - if not (maxlength is None or maxlength is False): - self._process_attr("maxlength", maxlength) - if not (minlength is None or minlength is False): - self._process_attr("minlength", minlength) - if not (name is None or name is False): - self._process_attr("name", name) - if not (placeholder is None or placeholder is False): - self._process_attr("placeholder", placeholder) - if not (readonly is None or readonly is False): - self._process_attr("readonly", readonly) - if not (required is None or required is False): - self._process_attr("required", required) - if not (rows is None or rows is False): - self._process_attr("rows", rows) - if not (wrap is None or wrap is False): - self._process_attr("wrap", wrap) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class tfoot(BaseElement): - """ - The 'tfoot' element. - Description: Group of footer rows in a table - Categories: none - Parents: table - Children: tr script-supporting elements - Interface: HTMLTableSectionElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tfoot - """ # fmt: skip - - tag = "tfoot" - categories = ["none"] - - class hint(GlobalAttrs): - """ - Type hints for "tfoot" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'tfoot' (Group of footer rows in a table) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tfoot - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "tfoot", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class th(BaseElement): - """ - The 'th' element. - Description: Table header cell - Categories: interactive* - Parents: tr - Children: flow* - Interface: HTMLTableCellElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th - """ # fmt: skip - - tag = "th" - categories = ["interactive*"] - - class hint(GlobalAttrs, ThAttrs): - """ - Type hints for "th" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - abbr: Optional[str] = None, - colspan: Optional[str] = None, - headers: Optional[Union[str, list]] = None, - rowspan: Optional[Union[str, int]] = None, - scope: Optional[ - Union[str, Literal["row", "col", "rowgroup", "colgroup"]] - ] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'th' (Table header cell) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `abbr` : - Alternative label to use for the header cell when referencing the cell in other contexts - `colspan` : - Number of columns that the cell is to span - - Valid non-negative integer greater than zero - `headers` : - The header cells for this cell - `rowspan` : - Number of rows that the cell is to span - `scope` : - Specifies which cells the header cell applies to - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "th", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (abbr is None or abbr is False): - self._process_attr("abbr", abbr) - if not (colspan is None or colspan is False): - self._process_attr("colspan", colspan) - if not (headers is None or headers is False): - self._process_attr("headers", headers) - if not (rowspan is None or rowspan is False): - self._process_attr("rowspan", rowspan) - if not (scope is None or scope is False): - self._process_attr("scope", scope) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class thead(BaseElement): - """ - The 'thead' element. - Description: Group of heading rows in a table - Categories: none - Parents: table - Children: tr script-supporting elements - Interface: HTMLTableSectionElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/thead - """ # fmt: skip - - tag = "thead" - categories = ["none"] - - class hint(GlobalAttrs): - """ - Type hints for "thead" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'thead' (Group of heading rows in a table) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/thead - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "thead", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class time(BaseElement): - """ - The 'time' element. - Description: Machine-readable equivalent of date- or time-related data - Categories: flow phrasing palpable - Parents: phrasing - Children: phrasing - Interface: HTMLTimeElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/time - """ # fmt: skip - - tag = "time" - categories = ["flow", "phrasing", "palpable"] - - class hint(GlobalAttrs, TimeAttrs): - """ - Type hints for "time" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - datetime: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'time' (Machine-readable equivalent of date- or time-related data) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/time - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `datetime` : - Machine-readable value - - Valid month string, valid date string, valid yearless date string, valid time string, valid local date and time string, valid time-zone offset string, valid global date and time string, valid week string, valid non-negative integer, or valid duration string - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "time", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (datetime is None or datetime is False): - self._process_attr("datetime", datetime) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class title(BaseElement): - """ - The 'title' element. - Description: Document title - Categories: metadata - Parents: head - Children: text* - Interface: HTMLTitleElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/title - """ # fmt: skip - - tag = "title" - categories = ["metadata"] - - class hint(GlobalAttrs): - """ - Type hints for "title" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'title' (Document title) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/title - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "title", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class tr(BaseElement): - """ - The 'tr' element. - Description: Table row - Categories: none - Parents: table thead tbody tfoot - Children: th* td script-supporting elements - Interface: HTMLTableRowElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tr - """ # fmt: skip - - tag = "tr" - categories = ["none"] - - class hint(GlobalAttrs): - """ - Type hints for "tr" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'tr' (Table row) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tr - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "tr", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class track(BaseElement): - """ - The 'track' element. - Description: Timed text track - Categories: none - Parents: audio video - Children: empty - Interface: HTMLTrackElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/track - """ # fmt: skip - - tag = "track" - categories = ["none"] - - class hint(GlobalAttrs, TrackAttrs): - """ - Type hints for "track" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - default: Optional[Union[str, bool]] = None, - kind: Optional[ - Union[ - str, - Literal[ - "subtitles", - "captions", - "descriptions", - "chapters", - "metadata", - ], - ] - ] = None, - label: Optional[str] = None, - src: Optional[str] = None, - srclang: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'track' (Timed text track) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/track - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `default` : - Enable the track if no other text track is more suitable - `kind` : - The type of text track - `label` : - User-visible label - `src` : - Address of the resource - - Valid non-empty URL potentially surrounded by spaces - `srclang` : - Language of the text track - - Valid BCP 47 language tag - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "track", void_element=True, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (default is None or default is False): - self._process_attr("default", default) - if not (kind is None or kind is False): - self._process_attr("kind", kind) - if not (label is None or label is False): - self._process_attr("label", label) - if not (src is None or src is False): - self._process_attr("src", src) - if not (srclang is None or srclang is False): - self._process_attr("srclang", srclang) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class u(BaseElement): - """ - The 'u' element. - Description: Unarticulated annotation - Categories: flow phrasing palpable - Parents: phrasing - Children: phrasing - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/u - """ # fmt: skip - - tag = "u" - categories = ["flow", "phrasing", "palpable"] - - class hint(GlobalAttrs): - """ - Type hints for "u" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'u' (Unarticulated annotation) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/u - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "u", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class ul(BaseElement): - """ - The 'ul' element. - Description: List - Categories: flow palpable* - Parents: flow - Children: li script-supporting elements - Interface: HTMLUListElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ul - """ # fmt: skip - - tag = "ul" - categories = ["flow", "palpable*"] - - class hint(GlobalAttrs): - """ - Type hints for "ul" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'ul' (List) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ul - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "ul", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class var(BaseElement): - """ - The 'var' element. - Description: Variable - Categories: flow phrasing palpable - Parents: phrasing - Children: phrasing - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/var - """ # fmt: skip - - tag = "var" - categories = ["flow", "phrasing", "palpable"] - - class hint(GlobalAttrs): - """ - Type hints for "var" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'var' (Variable) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/var - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "var", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class video(BaseElement): - """ - The 'video' element. - Description: Video player - Categories: flow phrasing embedded interactive palpable - Parents: phrasing - Children: source* track* transparent* - Interface: HTMLVideoElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video - """ # fmt: skip - - tag = "video" - categories = ["flow", "phrasing", "embedded", "interactive", "palpable"] - - class hint(GlobalAttrs, VideoAttrs): - """ - Type hints for "video" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - autoplay: Optional[Union[str, bool]] = None, - controls: Optional[Union[str, bool]] = None, - crossorigin: Optional[ - Union[str, Literal["anonymous", "use-credentials"]] - ] = None, - height: Optional[Union[str, int]] = None, - loop: Optional[Union[str, bool]] = None, - muted: Optional[Union[str, bool]] = None, - playsinline: Optional[Union[str, bool]] = None, - poster: Optional[str] = None, - preload: Optional[ - Union[str, Literal["none", "metadata", "auto"]] - ] = None, - src: Optional[str] = None, - width: Optional[Union[str, int]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'video' (Video player) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `autoplay` : - Hint that the media resource can be started automatically when the page is loaded - `controls` : - Show user agent controls - `crossorigin` : - How the element handles crossorigin requests - `height` : - Vertical dimension - `loop` : - Whether to loop the media resource - `muted` : - Whether to mute the media resource by default - `playsinline` : - Encourage the user agent to display video content within the element's playback area - `poster` : - Poster frame to show prior to video playback - - Valid non-empty URL potentially surrounded by spaces - `preload` : - Hints how much buffering the media resource will likely need - `src` : - Address of the resource - - Valid non-empty URL potentially surrounded by spaces - `width` : - Horizontal dimension - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "video", void_element=False, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (autoplay is None or autoplay is False): - self._process_attr("autoplay", autoplay) - if not (controls is None or controls is False): - self._process_attr("controls", controls) - if not (crossorigin is None or crossorigin is False): - self._process_attr("crossorigin", crossorigin) - if not (height is None or height is False): - self._process_attr("height", height) - if not (loop is None or loop is False): - self._process_attr("loop", loop) - if not (muted is None or muted is False): - self._process_attr("muted", muted) - if not (playsinline is None or playsinline is False): - self._process_attr("playsinline", playsinline) - if not (poster is None or poster is False): - self._process_attr("poster", poster) - if not (preload is None or preload is False): - self._process_attr("preload", preload) - if not (src is None or src is False): - self._process_attr("src", src) - if not (width is None or width is False): - self._process_attr("width", width) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class wbr(BaseElement): - """ - The 'wbr' element. - Description: Line breaking opportunity - Categories: flow phrasing - Parents: phrasing - Children: empty - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/wbr - """ # fmt: skip - - tag = "wbr" - categories = ["flow", "phrasing"] - - class hint(GlobalAttrs): - """ - Type hints for "wbr" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - - pass - - _ = hint - - def __init__( - self, - attrs: Optional[ - Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] - ] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[ - Union[ - str, - Literal[ - "on", "off", "none", "sentences", "words", "characters" - ], - ] - ] = None, - autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[ - Union[str, Literal["true", "plaintext-only", "false"]] - ] = None, - dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, - draggable: Optional[Union[str, Literal["true", "false"]]] = None, - enterkeyhint: Optional[ - Union[ - str, - Literal[ - "enter", "done", "go", "next", "previous", "search", "send" - ], - ] - ] = None, - hidden: Optional[ - Union[str, Literal["until-found", "hidden", ""]] - ] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[ - Union[ - str, - Literal[ - "none", - "text", - "tel", - "email", - "url", - "numeric", - "decimal", - "search", - ], - ] - ] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal["auto", "manual"]]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal["yes", "no"]]] = None, - writingsuggestions: Optional[ - Union[str, Literal["true", "false", ""]] - ] = None, - children: Optional[list] = None, - ) -> None: - """ - Initialize 'wbr' (Line breaking opportunity) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/wbr - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ # fmt: skip - super().__init__( - "wbr", void_element=True, attrs=attrs, children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/__init__.py b/src/html_compose/elements/__init__.py new file mode 100644 index 0000000..4b897a8 --- /dev/null +++ b/src/html_compose/elements/__init__.py @@ -0,0 +1,337 @@ +""" +This module contains HTML elements. + +Each element is a class that inherits from BaseElement. + +The classes are generated from the WhatWG HTML specification. +We do not generate deprecated elements. + +Each class has a hint class that provides type hints for the attributes. + +## Construction +#### `[]` syntax +1. There is special syntax for constructed elements which will append + any given parameters to the elements children. Internally this is simply + `BaseElement.append(...)` +2. There is a special syntax for _unconstructed_ elements which will create + an element with no parameters and append the children. + +Example: +```python +from html_compose import p, strong +# Internally, this is what we're doing +# p().append("Hello ", strong().append("world!")) + +# Syntax 1. +link = a()["Hello ", strong()["world!"]] + +# Syntax 2. +link = a["Hello ", strong["world!"]] +``` + +#### Basic usage +Most hints are available right in the constructor signature. + +This was done because it makes the constructor hint too heavy. + +```python +from html_compose import a + +link = a(href="https://example.com", target="_blank")["Click here"] +link.render() # 'Click here' +``` +#### Attributes that aren't in the constructor signature +**Note that events like .onclick are _not_ available in the constructor.** + +We do however provide the type hint via `.hint` + +The first positional argument is `attrs=` which can be a list of attributes. +We generate many of these for type hints under `.hint or `._` + +```python +# attrs can also be a list of BaseAttribute objects +link = a([a.hint.onclick("alert(1)")], + href="https://example.com", target="_blank")["Click here"] +``` + +#### With attributes that aren't built-in +The first positional argument is `attrs=` which can also be a dictionary. + +```python +from html_compose import a +# You can simply define any attribute in the attrs dict +link = a({"href": "https://example.com", + "target": "_blank"})["Click here"] +link.render() # 'Click here' + +# attrs can also be a list of BaseAttribute objects +link = a([a.hint.onclick("alert(1)")], + href="https://example.com", target="_blank")["Click here"] +``` +#### Framework Attributes +Some attributes are not part of the HTML specification, but are +commonly used in web frameworks. You can make your own hint class to wrap these + +```python +from html_compose.base_attribute import BaseAttribute +from html_compose import button +class htmx: + ''' + Attributes for the HTMX framework. + ''' + + @staticmethod + def hx_get(value: str) -> BaseAttribute: + ''' + htmx attribute: hx-get + The hx-get attribute will cause an element to issue a + GET to the specified URL and swap the HTML into the DOM + using a swap strategy + + :param value: URI to GET when the element is activated + :return: An hx-get attribute to be added to your element + ''' + + return BaseAttribute("hx-get", value) + +btn = button([htmx.hx_get("/api/data")])["Click me!"] +btn.render() # '' +``` + +Publish your own to make someone elses development experience better! + +""" + +from .a_element import a +from .abbr_element import abbr +from .address_element import address +from .area_element import area +from .article_element import article +from .aside_element import aside +from .audio_element import audio +from .b_element import b +from .base_element import base +from .bdi_element import bdi +from .bdo_element import bdo +from .blockquote_element import blockquote +from .body_element import body +from .br_element import br +from .button_element import button +from .canvas_element import canvas +from .caption_element import caption +from .cite_element import cite +from .code_element import code +from .col_element import col +from .colgroup_element import colgroup +from .data_element import data +from .datalist_element import datalist +from .dd_element import dd +from .del__element import del_ +from .details_element import details +from .dfn_element import dfn +from .dialog_element import dialog +from .div_element import div +from .dl_element import dl +from .dt_element import dt +from .em_element import em +from .embed_element import embed +from .fieldset_element import fieldset +from .figcaption_element import figcaption +from .figure_element import figure +from .footer_element import footer +from .form_element import form +from .h1_element import h1 +from .h2_element import h2 +from .h3_element import h3 +from .h4_element import h4 +from .h5_element import h5 +from .h6_element import h6 +from .head_element import head +from .header_element import header +from .hgroup_element import hgroup +from .hr_element import hr +from .html_element import html +from .i_element import i +from .iframe_element import iframe +from .img_element import img +from .input_element import input +from .ins_element import ins +from .kbd_element import kbd +from .label_element import label +from .legend_element import legend +from .li_element import li +from .link_element import link +from .main_element import main +from .map_element import map +from .mark_element import mark +from .menu_element import menu +from .meta_element import meta +from .meter_element import meter +from .nav_element import nav +from .noscript_element import noscript +from .object_element import object +from .ol_element import ol +from .optgroup_element import optgroup +from .option_element import option +from .output_element import output +from .p_element import p +from .picture_element import picture +from .pre_element import pre +from .progress_element import progress +from .q_element import q +from .rp_element import rp +from .rt_element import rt +from .ruby_element import ruby +from .s_element import s +from .samp_element import samp +from .script_element import script +from .search_element import search +from .section_element import section +from .select_element import select +from .slot_element import slot +from .small_element import small +from .source_element import source +from .span_element import span +from .strong_element import strong +from .style_element import style +from .sub_element import sub +from .summary_element import summary +from .sup_element import sup +from .svg_element import svg +from .table_element import table +from .tbody_element import tbody +from .td_element import td +from .template_element import template +from .textarea_element import textarea +from .tfoot_element import tfoot +from .th_element import th +from .thead_element import thead +from .time_element import time +from .title_element import title +from .tr_element import tr +from .track_element import track +from .u_element import u +from .ul_element import ul +from .var_element import var +from .video_element import video +from .wbr_element import wbr + +import os + +# hack: force PDOC to treat elements as submodules +if not os.environ.get("PDOC_GENERATING", False): + __all__ = [ + "a", + "abbr", + "address", + "area", + "article", + "aside", + "audio", + "b", + "base", + "bdi", + "bdo", + "blockquote", + "body", + "br", + "button", + "canvas", + "caption", + "cite", + "code", + "col", + "colgroup", + "data", + "datalist", + "dd", + "del_", + "details", + "dfn", + "dialog", + "div", + "dl", + "dt", + "em", + "embed", + "fieldset", + "figcaption", + "figure", + "footer", + "form", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "head", + "header", + "hgroup", + "hr", + "html", + "i", + "iframe", + "img", + "input", + "ins", + "kbd", + "label", + "legend", + "li", + "link", + "main", + "map", + "mark", + "menu", + "meta", + "meter", + "nav", + "noscript", + "object", + "ol", + "optgroup", + "option", + "output", + "p", + "picture", + "pre", + "progress", + "q", + "rp", + "rt", + "ruby", + "s", + "samp", + "script", + "search", + "section", + "select", + "slot", + "small", + "source", + "span", + "strong", + "style", + "sub", + "summary", + "sup", + "svg", + "table", + "tbody", + "td", + "template", + "textarea", + "tfoot", + "th", + "thead", + "time", + "title", + "tr", + "track", + "u", + "ul", + "var", + "video", + "wbr", + ] diff --git a/src/html_compose/elements/a_element.py b/src/html_compose/elements/a_element.py new file mode 100644 index 0000000..ebfb457 --- /dev/null +++ b/src/html_compose/elements/a_element.py @@ -0,0 +1,319 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class a(BaseElement): + """ + The 'a' element. + Description: Hyperlink + Categories: flow phrasing* interactive palpable + Parents: phrasing + Children: transparent* + Interface: HTMLAnchorElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a + """ # fmt: skip + + tag = "a" + categories = ["flow", "phrasing*", "interactive", "palpable"] + + class hint(GlobalAttrs, AnchorAttrs): + """ + Type hints for "a" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + download: Optional[str] = None, + href: Optional[str] = None, + hreflang: Optional[str] = None, + ping: Optional[Union[str, list]] = None, + referrerpolicy: Optional[str] = None, + rel: Optional[Union[str, list]] = None, + target: Optional[str] = None, + type: Optional[str] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'a' (Hyperlink) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `download` : + Whether to download the resource instead of navigating to it, and its filename if so + + `href` : + Address of the hyperlink + Valid URL potentially surrounded by spaces + + `hreflang` : + Language of the linked resource + Valid BCP 47 language tag + + `ping` : + URLs to ping + + `referrerpolicy` : + Referrer policy for fetches initiated by the element + Referrer policy + + `rel` : + Relationship between the location in the document containing the hyperlink and the destination resource + + `target` : + Navigable for hyperlink navigation + Valid navigable target name or keyword + + `type` : + Hint for the type of the referenced resource + Valid MIME type string + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "a", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (download is None or download is False): + self._process_attr("download", download) + if not (href is None or href is False): + self._process_attr("href", href) + if not (hreflang is None or hreflang is False): + self._process_attr("hreflang", hreflang) + if not (ping is None or ping is False): + self._process_attr("ping", ping) + if not (referrerpolicy is None or referrerpolicy is False): + self._process_attr("referrerpolicy", referrerpolicy) + if not (rel is None or rel is False): + self._process_attr("rel", rel) + if not (target is None or target is False): + self._process_attr("target", target) + if not (type is None or type is False): + self._process_attr("type", type) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/abbr_element.py b/src/html_compose/elements/abbr_element.py new file mode 100644 index 0000000..a622a9e --- /dev/null +++ b/src/html_compose/elements/abbr_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class abbr(BaseElement): + """ + The 'abbr' element. + Description: Abbreviation + Categories: flow phrasing palpable + Parents: phrasing + Children: phrasing + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/abbr + """ # fmt: skip + + tag = "abbr" + categories = ["flow", "phrasing", "palpable"] + + class hint(GlobalAttrs): + """ + Type hints for "abbr" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'abbr' (Abbreviation) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/abbr + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "abbr", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/address_element.py b/src/html_compose/elements/address_element.py new file mode 100644 index 0000000..48bc2f9 --- /dev/null +++ b/src/html_compose/elements/address_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class address(BaseElement): + """ + The 'address' element. + Description: Contact information for a page or article element + Categories: flow palpable + Parents: flow + Children: flow* + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/address + """ # fmt: skip + + tag = "address" + categories = ["flow", "palpable"] + + class hint(GlobalAttrs): + """ + Type hints for "address" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'address' (Contact information for a page or article element) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/address + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "address", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/area_element.py b/src/html_compose/elements/area_element.py new file mode 100644 index 0000000..4b449bb --- /dev/null +++ b/src/html_compose/elements/area_element.py @@ -0,0 +1,326 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AreaAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class area(BaseElement): + """ + The 'area' element. + Description: Hyperlink or dead area on an image map + Categories: flow phrasing + Parents: phrasing* + Children: empty + Interface: HTMLAreaElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/area + """ # fmt: skip + + tag = "area" + categories = ["flow", "phrasing"] + + class hint(GlobalAttrs, AreaAttrs): + """ + Type hints for "area" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + alt: Optional[str] = None, + coords: Optional[str] = None, + download: Optional[str] = None, + href: Optional[str] = None, + ping: Optional[Union[str, list]] = None, + referrerpolicy: Optional[str] = None, + rel: Optional[Union[str, list]] = None, + shape: Optional[ + Union[str, Literal["circle", "default", "poly", "rect"]] + ] = None, + target: Optional[str] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'area' (Hyperlink or dead area on an image map) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/area + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `alt` : + Replacement text for use when images are not available + + `coords` : + Coordinates for the shape to be created in an image map + Valid list of floating-point numbers* + + `download` : + Whether to download the resource instead of navigating to it, and its filename if so + + `href` : + Address of the hyperlink + Valid URL potentially surrounded by spaces + + `ping` : + URLs to ping + + `referrerpolicy` : + Referrer policy for fetches initiated by the element + Referrer policy + + `rel` : + Relationship between the location in the document containing the hyperlink and the destination resource + + `shape` : + The kind of shape to be created in an image map + + `target` : + Navigable for hyperlink navigation + Valid navigable target name or keyword + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "area", void_element=True, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (alt is None or alt is False): + self._process_attr("alt", alt) + if not (coords is None or coords is False): + self._process_attr("coords", coords) + if not (download is None or download is False): + self._process_attr("download", download) + if not (href is None or href is False): + self._process_attr("href", href) + if not (ping is None or ping is False): + self._process_attr("ping", ping) + if not (referrerpolicy is None or referrerpolicy is False): + self._process_attr("referrerpolicy", referrerpolicy) + if not (rel is None or rel is False): + self._process_attr("rel", rel) + if not (shape is None or shape is False): + self._process_attr("shape", shape) + if not (target is None or target is False): + self._process_attr("target", target) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/article_element.py b/src/html_compose/elements/article_element.py new file mode 100644 index 0000000..b60ae25 --- /dev/null +++ b/src/html_compose/elements/article_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class article(BaseElement): + """ + The 'article' element. + Description: Self-contained syndicatable or reusable composition + Categories: flow sectioning palpable + Parents: flow + Children: flow + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/article + """ # fmt: skip + + tag = "article" + categories = ["flow", "sectioning", "palpable"] + + class hint(GlobalAttrs): + """ + Type hints for "article" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'article' (Self-contained syndicatable or reusable composition) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/article + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "article", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/aside_element.py b/src/html_compose/elements/aside_element.py new file mode 100644 index 0000000..41d2d32 --- /dev/null +++ b/src/html_compose/elements/aside_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class aside(BaseElement): + """ + The 'aside' element. + Description: Sidebar for tangentially related content + Categories: flow sectioning palpable + Parents: flow + Children: flow + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/aside + """ # fmt: skip + + tag = "aside" + categories = ["flow", "sectioning", "palpable"] + + class hint(GlobalAttrs): + """ + Type hints for "aside" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'aside' (Sidebar for tangentially related content) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/aside + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "aside", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/audio_element.py b/src/html_compose/elements/audio_element.py new file mode 100644 index 0000000..4e8e13f --- /dev/null +++ b/src/html_compose/elements/audio_element.py @@ -0,0 +1,313 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AudioAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class audio(BaseElement): + """ + The 'audio' element. + Description: Audio player + Categories: flow phrasing embedded interactive palpable* + Parents: phrasing + Children: source* track* transparent* + Interface: HTMLAudioElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio + """ # fmt: skip + + tag = "audio" + categories = ["flow", "phrasing", "embedded", "interactive", "palpable*"] + + class hint(GlobalAttrs, AudioAttrs): + """ + Type hints for "audio" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + autoplay: Optional[Union[str, bool]] = None, + controls: Optional[Union[str, bool]] = None, + crossorigin: Optional[ + Union[str, Literal["anonymous", "use-credentials"]] + ] = None, + loop: Optional[Union[str, bool]] = None, + muted: Optional[Union[str, bool]] = None, + preload: Optional[ + Union[str, Literal["none", "metadata", "auto"]] + ] = None, + src: Optional[str] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'audio' (Audio player) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `autoplay` : + Hint that the media resource can be started automatically when the page is loaded + + `controls` : + Show user agent controls + + `crossorigin` : + How the element handles crossorigin requests + + `loop` : + Whether to loop the media resource + + `muted` : + Whether to mute the media resource by default + + `preload` : + Hints how much buffering the media resource will likely need + + `src` : + Address of the resource + Valid non-empty URL potentially surrounded by spaces + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "audio", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (autoplay is None or autoplay is False): + self._process_attr("autoplay", autoplay) + if not (controls is None or controls is False): + self._process_attr("controls", controls) + if not (crossorigin is None or crossorigin is False): + self._process_attr("crossorigin", crossorigin) + if not (loop is None or loop is False): + self._process_attr("loop", loop) + if not (muted is None or muted is False): + self._process_attr("muted", muted) + if not (preload is None or preload is False): + self._process_attr("preload", preload) + if not (src is None or src is False): + self._process_attr("src", src) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/b_element.py b/src/html_compose/elements/b_element.py new file mode 100644 index 0000000..5bb43d6 --- /dev/null +++ b/src/html_compose/elements/b_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class b(BaseElement): + """ + The 'b' element. + Description: Keywords + Categories: flow phrasing palpable + Parents: phrasing + Children: phrasing + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/b + """ # fmt: skip + + tag = "b" + categories = ["flow", "phrasing", "palpable"] + + class hint(GlobalAttrs): + """ + Type hints for "b" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'b' (Keywords) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/b + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "b", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/base_element.py b/src/html_compose/elements/base_element.py new file mode 100644 index 0000000..b4c3d66 --- /dev/null +++ b/src/html_compose/elements/base_element.py @@ -0,0 +1,280 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, BaseAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class base(BaseElement): + """ + The 'base' element. + Description: Base URL and default target navigable for hyperlinks and forms + Categories: metadata + Parents: head + Children: empty + Interface: HTMLBaseElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base + """ # fmt: skip + + tag = "base" + categories = ["metadata"] + + class hint(GlobalAttrs, BaseAttrs): + """ + Type hints for "base" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + href: Optional[str] = None, + target: Optional[str] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'base' (Base URL and default target navigable for hyperlinks and forms) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `href` : + Document base URL + Valid URL potentially surrounded by spaces + + `target` : + Default navigable for hyperlink navigation and form submission + Valid navigable target name or keyword + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "base", void_element=True, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (href is None or href is False): + self._process_attr("href", href) + if not (target is None or target is False): + self._process_attr("target", target) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/bdi_element.py b/src/html_compose/elements/bdi_element.py new file mode 100644 index 0000000..45ae171 --- /dev/null +++ b/src/html_compose/elements/bdi_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class bdi(BaseElement): + """ + The 'bdi' element. + Description: Text directionality isolation + Categories: flow phrasing palpable + Parents: phrasing + Children: phrasing + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/bdi + """ # fmt: skip + + tag = "bdi" + categories = ["flow", "phrasing", "palpable"] + + class hint(GlobalAttrs): + """ + Type hints for "bdi" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'bdi' (Text directionality isolation) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/bdi + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "bdi", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/bdo_element.py b/src/html_compose/elements/bdo_element.py new file mode 100644 index 0000000..3c08d9a --- /dev/null +++ b/src/html_compose/elements/bdo_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class bdo(BaseElement): + """ + The 'bdo' element. + Description: Text directionality formatting + Categories: flow phrasing palpable + Parents: phrasing + Children: phrasing + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/bdo + """ # fmt: skip + + tag = "bdo" + categories = ["flow", "phrasing", "palpable"] + + class hint(GlobalAttrs): + """ + Type hints for "bdo" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'bdo' (Text directionality formatting) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/bdo + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "bdo", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/blockquote_element.py b/src/html_compose/elements/blockquote_element.py new file mode 100644 index 0000000..f5ac912 --- /dev/null +++ b/src/html_compose/elements/blockquote_element.py @@ -0,0 +1,273 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, BlockquoteAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class blockquote(BaseElement): + """ + The 'blockquote' element. + Description: A section quoted from another source + Categories: flow palpable + Parents: flow + Children: flow + Interface: HTMLQuoteElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/blockquote + """ # fmt: skip + + tag = "blockquote" + categories = ["flow", "palpable"] + + class hint(GlobalAttrs, BlockquoteAttrs): + """ + Type hints for "blockquote" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + cite: Optional[str] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'blockquote' (A section quoted from another source) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/blockquote + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `cite` : + Link to the source of the quotation or more information about the edit + Valid URL potentially surrounded by spaces + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "blockquote", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (cite is None or cite is False): + self._process_attr("cite", cite) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/body_element.py b/src/html_compose/elements/body_element.py new file mode 100644 index 0000000..86fcd29 --- /dev/null +++ b/src/html_compose/elements/body_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, BodyAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class body(BaseElement): + """ + The 'body' element. + Description: Document body + Categories: none + Parents: html + Children: flow + Interface: HTMLBodyElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/body + """ # fmt: skip + + tag = "body" + categories = ["none"] + + class hint(GlobalAttrs, BodyAttrs): + """ + Type hints for "body" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'body' (Document body) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/body + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "body", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/br_element.py b/src/html_compose/elements/br_element.py new file mode 100644 index 0000000..70aeccb --- /dev/null +++ b/src/html_compose/elements/br_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class br(BaseElement): + """ + The 'br' element. + Description: Line break, e.g. in poem or postal address + Categories: flow phrasing + Parents: phrasing + Children: empty + Interface: HTMLBRElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/br + """ # fmt: skip + + tag = "br" + categories = ["flow", "phrasing"] + + class hint(GlobalAttrs): + """ + Type hints for "br" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'br' (Line break, e.g. in poem or postal address) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/br + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "br", void_element=True, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/button_element.py b/src/html_compose/elements/button_element.py new file mode 100644 index 0000000..2d5f6f0 --- /dev/null +++ b/src/html_compose/elements/button_element.py @@ -0,0 +1,364 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, ButtonAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class button(BaseElement): + """ + The 'button' element. + Description: Button control + Categories: flow phrasing interactive listed labelable submittable form-associated palpable + Parents: phrasing + Children: phrasing* + Interface: HTMLButtonElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button + """ # fmt: skip + + tag = "button" + categories = [ + "flow", + "phrasing", + "interactive", + "listed", + "labelable", + "submittable", + "form-associated", + "palpable", + ] + + class hint(GlobalAttrs, ButtonAttrs): + """ + Type hints for "button" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + disabled: Optional[Union[str, bool]] = None, + form: Optional[str] = None, + formaction: Optional[str] = None, + formenctype: Optional[ + Union[ + str, + Literal[ + "application/x-www-form-urlencoded", + "multipart/form-data", + "text/plain", + ], + ] + ] = None, + formmethod: Optional[ + Union[str, Literal["GET", "POST", "dialog"]] + ] = None, + formnovalidate: Optional[Union[str, bool]] = None, + formtarget: Optional[str] = None, + name: Optional[str] = None, + popovertarget: Optional[str] = None, + popovertargetaction: Optional[ + Union[str, Literal["toggle", "show", "hide"]] + ] = None, + type: Optional[Union[str, Literal["submit", "reset", "button"]]] = None, + value: Optional[str] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'button' (Button control) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `disabled` : + Whether the form control is disabled + + `form` : + Associates the element with a form element + ID* + + `formaction` : + URL to use for form submission + Valid non-empty URL potentially surrounded by spaces + + `formenctype` : + Entry list encoding type to use for form submission + + `formmethod` : + Variant to use for form submission + + `formnovalidate` : + Bypass form control validation for form submission + + `formtarget` : + Navigable for form submission + Valid navigable target name or keyword + + `name` : + Name of the element to use for form submission and in the form.elements API + + `popovertarget` : + Targets a popover element to toggle, show, or hide + ID* + + `popovertargetaction` : + Indicates whether a targeted popover element is to be toggled, shown, or hidden + + `type` : + Type of button + + `value` : + Value to be used for form submission + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "button", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (disabled is None or disabled is False): + self._process_attr("disabled", disabled) + if not (form is None or form is False): + self._process_attr("form", form) + if not (formaction is None or formaction is False): + self._process_attr("formaction", formaction) + if not (formenctype is None or formenctype is False): + self._process_attr("formenctype", formenctype) + if not (formmethod is None or formmethod is False): + self._process_attr("formmethod", formmethod) + if not (formnovalidate is None or formnovalidate is False): + self._process_attr("formnovalidate", formnovalidate) + if not (formtarget is None or formtarget is False): + self._process_attr("formtarget", formtarget) + if not (name is None or name is False): + self._process_attr("name", name) + if not (popovertarget is None or popovertarget is False): + self._process_attr("popovertarget", popovertarget) + if not (popovertargetaction is None or popovertargetaction is False): + self._process_attr("popovertargetaction", popovertargetaction) + if not (type is None or type is False): + self._process_attr("type", type) + if not (value is None or value is False): + self._process_attr("value", value) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/canvas_element.py b/src/html_compose/elements/canvas_element.py new file mode 100644 index 0000000..9ad96b5 --- /dev/null +++ b/src/html_compose/elements/canvas_element.py @@ -0,0 +1,278 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, CanvasAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class canvas(BaseElement): + """ + The 'canvas' element. + Description: Scriptable bitmap canvas + Categories: flow phrasing embedded palpable + Parents: phrasing + Children: transparent + Interface: HTMLCanvasElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas + """ # fmt: skip + + tag = "canvas" + categories = ["flow", "phrasing", "embedded", "palpable"] + + class hint(GlobalAttrs, CanvasAttrs): + """ + Type hints for "canvas" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + height: Optional[Union[str, int]] = None, + width: Optional[Union[str, int]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'canvas' (Scriptable bitmap canvas) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `height` : + Vertical dimension + + `width` : + Horizontal dimension + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "canvas", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (height is None or height is False): + self._process_attr("height", height) + if not (width is None or width is False): + self._process_attr("width", width) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/caption_element.py b/src/html_compose/elements/caption_element.py new file mode 100644 index 0000000..31333f4 --- /dev/null +++ b/src/html_compose/elements/caption_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class caption(BaseElement): + """ + The 'caption' element. + Description: Table caption + Categories: none + Parents: table + Children: flow* + Interface: HTMLTableCaptionElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/caption + """ # fmt: skip + + tag = "caption" + categories = ["none"] + + class hint(GlobalAttrs): + """ + Type hints for "caption" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'caption' (Table caption) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/caption + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "caption", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/cite_element.py b/src/html_compose/elements/cite_element.py new file mode 100644 index 0000000..e56953f --- /dev/null +++ b/src/html_compose/elements/cite_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class cite(BaseElement): + """ + The 'cite' element. + Description: Title of a work + Categories: flow phrasing palpable + Parents: phrasing + Children: phrasing + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/cite + """ # fmt: skip + + tag = "cite" + categories = ["flow", "phrasing", "palpable"] + + class hint(GlobalAttrs): + """ + Type hints for "cite" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'cite' (Title of a work) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/cite + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "cite", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/code_element.py b/src/html_compose/elements/code_element.py new file mode 100644 index 0000000..cf9de78 --- /dev/null +++ b/src/html_compose/elements/code_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class code(BaseElement): + """ + The 'code' element. + Description: Computer code + Categories: flow phrasing palpable + Parents: phrasing + Children: phrasing + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/code + """ # fmt: skip + + tag = "code" + categories = ["flow", "phrasing", "palpable"] + + class hint(GlobalAttrs): + """ + Type hints for "code" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'code' (Computer code) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/code + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "code", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/col_element.py b/src/html_compose/elements/col_element.py new file mode 100644 index 0000000..3a4d52e --- /dev/null +++ b/src/html_compose/elements/col_element.py @@ -0,0 +1,273 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, ColAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class col(BaseElement): + """ + The 'col' element. + Description: Table column + Categories: none + Parents: colgroup + Children: empty + Interface: HTMLTableColElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col + """ # fmt: skip + + tag = "col" + categories = ["none"] + + class hint(GlobalAttrs, ColAttrs): + """ + Type hints for "col" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + span: Optional[str] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'col' (Table column) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `span` : + Number of columns spanned by the element + Valid non-negative integer greater than zero + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "col", void_element=True, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (span is None or span is False): + self._process_attr("span", span) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/colgroup_element.py b/src/html_compose/elements/colgroup_element.py new file mode 100644 index 0000000..8779039 --- /dev/null +++ b/src/html_compose/elements/colgroup_element.py @@ -0,0 +1,273 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, ColgroupAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class colgroup(BaseElement): + """ + The 'colgroup' element. + Description: Group of columns in a table + Categories: none + Parents: table + Children: col* template* + Interface: HTMLTableColElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/colgroup + """ # fmt: skip + + tag = "colgroup" + categories = ["none"] + + class hint(GlobalAttrs, ColgroupAttrs): + """ + Type hints for "colgroup" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + span: Optional[str] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'colgroup' (Group of columns in a table) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/colgroup + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `span` : + Number of columns spanned by the element + Valid non-negative integer greater than zero + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "colgroup", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (span is None or span is False): + self._process_attr("span", span) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/data_element.py b/src/html_compose/elements/data_element.py new file mode 100644 index 0000000..c0bc6d5 --- /dev/null +++ b/src/html_compose/elements/data_element.py @@ -0,0 +1,272 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, DataAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class data(BaseElement): + """ + The 'data' element. + Description: Machine-readable equivalent + Categories: flow phrasing palpable + Parents: phrasing + Children: phrasing + Interface: HTMLDataElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/data + """ # fmt: skip + + tag = "data" + categories = ["flow", "phrasing", "palpable"] + + class hint(GlobalAttrs, DataAttrs): + """ + Type hints for "data" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + value: Optional[str] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'data' (Machine-readable equivalent) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/data + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `value` : + Machine-readable value + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "data", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (value is None or value is False): + self._process_attr("value", value) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/datalist_element.py b/src/html_compose/elements/datalist_element.py new file mode 100644 index 0000000..b763ae0 --- /dev/null +++ b/src/html_compose/elements/datalist_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class datalist(BaseElement): + """ + The 'datalist' element. + Description: Container for options for combo box control + Categories: flow phrasing + Parents: phrasing + Children: phrasing* option* script-supporting elements* + Interface: HTMLDataListElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/datalist + """ # fmt: skip + + tag = "datalist" + categories = ["flow", "phrasing"] + + class hint(GlobalAttrs): + """ + Type hints for "datalist" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'datalist' (Container for options for combo box control) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/datalist + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "datalist", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/dd_element.py b/src/html_compose/elements/dd_element.py new file mode 100644 index 0000000..e6fc4f1 --- /dev/null +++ b/src/html_compose/elements/dd_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class dd(BaseElement): + """ + The 'dd' element. + Description: Content for corresponding dt element(s) + Categories: none + Parents: dl div* + Children: flow + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dd + """ # fmt: skip + + tag = "dd" + categories = ["none"] + + class hint(GlobalAttrs): + """ + Type hints for "dd" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'dd' (Content for corresponding dt element(s)) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dd + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "dd", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/del__element.py b/src/html_compose/elements/del__element.py new file mode 100644 index 0000000..09e0c47 --- /dev/null +++ b/src/html_compose/elements/del__element.py @@ -0,0 +1,280 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, DelAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class del_(BaseElement): + """ + The 'del' element. + Description: A removal from the document + Categories: flow phrasing* palpable + Parents: phrasing + Children: transparent + Interface: HTMLModElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/del + """ # fmt: skip + + tag = "del" + categories = ["flow", "phrasing*", "palpable"] + + class hint(GlobalAttrs, DelAttrs): + """ + Type hints for "del" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + cite: Optional[str] = None, + datetime: Optional[str] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'del' (A removal from the document) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/del + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `cite` : + Link to the source of the quotation or more information about the edit + Valid URL potentially surrounded by spaces + + `datetime` : + Date and (optionally) time of the change + Valid date string with optional time + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "del", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (cite is None or cite is False): + self._process_attr("cite", cite) + if not (datetime is None or datetime is False): + self._process_attr("datetime", datetime) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/details_element.py b/src/html_compose/elements/details_element.py new file mode 100644 index 0000000..d9db424 --- /dev/null +++ b/src/html_compose/elements/details_element.py @@ -0,0 +1,278 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, DetailsAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class details(BaseElement): + """ + The 'details' element. + Description: Disclosure control for hiding details + Categories: flow interactive palpable + Parents: flow + Children: summary* flow + Interface: HTMLDetailsElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details + """ # fmt: skip + + tag = "details" + categories = ["flow", "interactive", "palpable"] + + class hint(GlobalAttrs, DetailsAttrs): + """ + Type hints for "details" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + name: Optional[str] = None, + open: Optional[Union[str, bool]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'details' (Disclosure control for hiding details) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `name` : + Name of group of mutually-exclusive details elements + + `open` : + Whether the details are visible + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "details", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (name is None or name is False): + self._process_attr("name", name) + if not (open is None or open is False): + self._process_attr("open", open) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/dfn_element.py b/src/html_compose/elements/dfn_element.py new file mode 100644 index 0000000..c90d6b3 --- /dev/null +++ b/src/html_compose/elements/dfn_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class dfn(BaseElement): + """ + The 'dfn' element. + Description: Defining instance + Categories: flow phrasing palpable + Parents: phrasing + Children: phrasing* + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dfn + """ # fmt: skip + + tag = "dfn" + categories = ["flow", "phrasing", "palpable"] + + class hint(GlobalAttrs): + """ + Type hints for "dfn" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'dfn' (Defining instance) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dfn + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "dfn", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/dialog_element.py b/src/html_compose/elements/dialog_element.py new file mode 100644 index 0000000..7ffc37f --- /dev/null +++ b/src/html_compose/elements/dialog_element.py @@ -0,0 +1,272 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, DialogAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class dialog(BaseElement): + """ + The 'dialog' element. + Description: Dialog box or window + Categories: flow + Parents: flow + Children: flow + Interface: HTMLDialogElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog + """ # fmt: skip + + tag = "dialog" + categories = ["flow"] + + class hint(GlobalAttrs, DialogAttrs): + """ + Type hints for "dialog" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + open: Optional[Union[str, bool]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'dialog' (Dialog box or window) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `open` : + Whether the dialog box is showing + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "dialog", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (open is None or open is False): + self._process_attr("open", open) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/div_element.py b/src/html_compose/elements/div_element.py new file mode 100644 index 0000000..03c6070 --- /dev/null +++ b/src/html_compose/elements/div_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class div(BaseElement): + """ + The 'div' element. + Description: Generic flow container, or container for name-value groups in dl elements + Categories: flow palpable + Parents: flow dl + Children: flow + Interface: HTMLDivElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/div + """ # fmt: skip + + tag = "div" + categories = ["flow", "palpable"] + + class hint(GlobalAttrs): + """ + Type hints for "div" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'div' (Generic flow container, or container for name-value groups in dl elements) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/div + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "div", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/dl_element.py b/src/html_compose/elements/dl_element.py new file mode 100644 index 0000000..0f41176 --- /dev/null +++ b/src/html_compose/elements/dl_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class dl(BaseElement): + """ + The 'dl' element. + Description: Association list consisting of zero or more name-value groups + Categories: flow palpable + Parents: flow + Children: dt* dd* div* script-supporting elements + Interface: HTMLDListElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dl + """ # fmt: skip + + tag = "dl" + categories = ["flow", "palpable"] + + class hint(GlobalAttrs): + """ + Type hints for "dl" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'dl' (Association list consisting of zero or more name-value groups) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dl + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "dl", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/dt_element.py b/src/html_compose/elements/dt_element.py new file mode 100644 index 0000000..2f634ab --- /dev/null +++ b/src/html_compose/elements/dt_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class dt(BaseElement): + """ + The 'dt' element. + Description: Legend for corresponding dd element(s) + Categories: none + Parents: dl div* + Children: flow* + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dt + """ # fmt: skip + + tag = "dt" + categories = ["none"] + + class hint(GlobalAttrs): + """ + Type hints for "dt" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'dt' (Legend for corresponding dd element(s)) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dt + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "dt", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/em_element.py b/src/html_compose/elements/em_element.py new file mode 100644 index 0000000..4ad78d3 --- /dev/null +++ b/src/html_compose/elements/em_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class em(BaseElement): + """ + The 'em' element. + Description: Stress emphasis + Categories: flow phrasing palpable + Parents: phrasing + Children: phrasing + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/em + """ # fmt: skip + + tag = "em" + categories = ["flow", "phrasing", "palpable"] + + class hint(GlobalAttrs): + """ + Type hints for "em" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'em' (Stress emphasis) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/em + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "em", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/embed_element.py b/src/html_compose/elements/embed_element.py new file mode 100644 index 0000000..1aa4304 --- /dev/null +++ b/src/html_compose/elements/embed_element.py @@ -0,0 +1,292 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, EmbedAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class embed(BaseElement): + """ + The 'embed' element. + Description: Plugin + Categories: flow phrasing embedded interactive palpable + Parents: phrasing + Children: empty + Interface: HTMLEmbedElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/embed + """ # fmt: skip + + tag = "embed" + categories = ["flow", "phrasing", "embedded", "interactive", "palpable"] + + class hint(GlobalAttrs, EmbedAttrs): + """ + Type hints for "embed" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + height: Optional[Union[str, int]] = None, + src: Optional[str] = None, + type: Optional[str] = None, + width: Optional[Union[str, int]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'embed' (Plugin) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/embed + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `height` : + Vertical dimension + + `src` : + Address of the resource + Valid non-empty URL potentially surrounded by spaces + + `type` : + Type of embedded resource + Valid MIME type string + + `width` : + Horizontal dimension + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "embed", void_element=True, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (height is None or height is False): + self._process_attr("height", height) + if not (src is None or src is False): + self._process_attr("src", src) + if not (type is None or type is False): + self._process_attr("type", type) + if not (width is None or width is False): + self._process_attr("width", width) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/fieldset_element.py b/src/html_compose/elements/fieldset_element.py new file mode 100644 index 0000000..c6c8426 --- /dev/null +++ b/src/html_compose/elements/fieldset_element.py @@ -0,0 +1,285 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, FieldsetAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class fieldset(BaseElement): + """ + The 'fieldset' element. + Description: Group of form controls + Categories: flow listed form-associated palpable + Parents: flow + Children: legend* flow + Interface: HTMLFieldSetElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fieldset + """ # fmt: skip + + tag = "fieldset" + categories = ["flow", "listed", "form-associated", "palpable"] + + class hint(GlobalAttrs, FieldsetAttrs): + """ + Type hints for "fieldset" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + disabled: Optional[Union[str, bool]] = None, + form: Optional[str] = None, + name: Optional[str] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'fieldset' (Group of form controls) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fieldset + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `disabled` : + Whether the descendant form controls, except any inside legend, are disabled + + `form` : + Associates the element with a form element + ID* + + `name` : + Name of the element to use for form submission and in the form.elements API + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "fieldset", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (disabled is None or disabled is False): + self._process_attr("disabled", disabled) + if not (form is None or form is False): + self._process_attr("form", form) + if not (name is None or name is False): + self._process_attr("name", name) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/figcaption_element.py b/src/html_compose/elements/figcaption_element.py new file mode 100644 index 0000000..6738a22 --- /dev/null +++ b/src/html_compose/elements/figcaption_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class figcaption(BaseElement): + """ + The 'figcaption' element. + Description: Caption for figure + Categories: none + Parents: figure + Children: flow + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/figcaption + """ # fmt: skip + + tag = "figcaption" + categories = ["none"] + + class hint(GlobalAttrs): + """ + Type hints for "figcaption" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'figcaption' (Caption for figure) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/figcaption + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "figcaption", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/figure_element.py b/src/html_compose/elements/figure_element.py new file mode 100644 index 0000000..144febf --- /dev/null +++ b/src/html_compose/elements/figure_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class figure(BaseElement): + """ + The 'figure' element. + Description: Figure with optional caption + Categories: flow palpable + Parents: flow + Children: figcaption* flow + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/figure + """ # fmt: skip + + tag = "figure" + categories = ["flow", "palpable"] + + class hint(GlobalAttrs): + """ + Type hints for "figure" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'figure' (Figure with optional caption) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/figure + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "figure", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/footer_element.py b/src/html_compose/elements/footer_element.py new file mode 100644 index 0000000..efbee34 --- /dev/null +++ b/src/html_compose/elements/footer_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class footer(BaseElement): + """ + The 'footer' element. + Description: Footer for a page or section + Categories: flow palpable + Parents: flow + Children: flow* + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/footer + """ # fmt: skip + + tag = "footer" + categories = ["flow", "palpable"] + + class hint(GlobalAttrs): + """ + Type hints for "footer" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'footer' (Footer for a page or section) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/footer + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "footer", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/form_element.py b/src/html_compose/elements/form_element.py new file mode 100644 index 0000000..1dd23d6 --- /dev/null +++ b/src/html_compose/elements/form_element.py @@ -0,0 +1,326 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, FormAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class form(BaseElement): + """ + The 'form' element. + Description: User-submittable form + Categories: flow palpable + Parents: flow + Children: flow* + Interface: HTMLFormElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form + """ # fmt: skip + + tag = "form" + categories = ["flow", "palpable"] + + class hint(GlobalAttrs, FormAttrs): + """ + Type hints for "form" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accept_charset: Optional[str] = None, + action: Optional[str] = None, + autocomplete: Optional[Union[str, Literal["on", "off"]]] = None, + enctype: Optional[ + Union[ + str, + Literal[ + "application/x-www-form-urlencoded", + "multipart/form-data", + "text/plain", + ], + ] + ] = None, + method: Optional[Union[str, Literal["GET", "POST", "dialog"]]] = None, + name: Optional[str] = None, + novalidate: Optional[Union[str, bool]] = None, + target: Optional[str] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'form' (User-submittable form) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accept_charset` : + Character encodings to use for form submission + ASCII case-insensitive match for "UTF-8" + + `action` : + URL to use for form submission + Valid non-empty URL potentially surrounded by spaces + + `autocomplete` : + Default setting for autofill feature for controls in the form + + `enctype` : + Entry list encoding type to use for form submission + + `method` : + Variant to use for form submission + + `name` : + Name of form to use in the document.forms API + + `novalidate` : + Bypass form control validation for form submission + + `target` : + Navigable for form submission + Valid navigable target name or keyword + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "form", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accept_charset is None or accept_charset is False): + self._process_attr("accept-charset", accept_charset) + if not (action is None or action is False): + self._process_attr("action", action) + if not (autocomplete is None or autocomplete is False): + self._process_attr("autocomplete", autocomplete) + if not (enctype is None or enctype is False): + self._process_attr("enctype", enctype) + if not (method is None or method is False): + self._process_attr("method", method) + if not (name is None or name is False): + self._process_attr("name", name) + if not (novalidate is None or novalidate is False): + self._process_attr("novalidate", novalidate) + if not (target is None or target is False): + self._process_attr("target", target) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/h1_element.py b/src/html_compose/elements/h1_element.py new file mode 100644 index 0000000..8668230 --- /dev/null +++ b/src/html_compose/elements/h1_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class h1(BaseElement): + """ + The 'h1' element. + Description: Heading + Categories: flow heading palpable + Parents: legend summary flow + Children: phrasing + Interface: HTMLHeadingElement + Documentation: None + """ # fmt: skip + + tag = "h1" + categories = ["flow", "heading", "palpable"] + + class hint(GlobalAttrs): + """ + Type hints for "h1" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'h1' (Heading) element. + Documentation: None + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "h1", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/h2_element.py b/src/html_compose/elements/h2_element.py new file mode 100644 index 0000000..31807fa --- /dev/null +++ b/src/html_compose/elements/h2_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class h2(BaseElement): + """ + The 'h2' element. + Description: Heading + Categories: flow heading palpable + Parents: legend summary flow + Children: phrasing + Interface: HTMLHeadingElement + Documentation: None + """ # fmt: skip + + tag = "h2" + categories = ["flow", "heading", "palpable"] + + class hint(GlobalAttrs): + """ + Type hints for "h2" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'h2' (Heading) element. + Documentation: None + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "h2", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/h3_element.py b/src/html_compose/elements/h3_element.py new file mode 100644 index 0000000..1d81304 --- /dev/null +++ b/src/html_compose/elements/h3_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class h3(BaseElement): + """ + The 'h3' element. + Description: Heading + Categories: flow heading palpable + Parents: legend summary flow + Children: phrasing + Interface: HTMLHeadingElement + Documentation: None + """ # fmt: skip + + tag = "h3" + categories = ["flow", "heading", "palpable"] + + class hint(GlobalAttrs): + """ + Type hints for "h3" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'h3' (Heading) element. + Documentation: None + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "h3", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/h4_element.py b/src/html_compose/elements/h4_element.py new file mode 100644 index 0000000..722d0e4 --- /dev/null +++ b/src/html_compose/elements/h4_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class h4(BaseElement): + """ + The 'h4' element. + Description: Heading + Categories: flow heading palpable + Parents: legend summary flow + Children: phrasing + Interface: HTMLHeadingElement + Documentation: None + """ # fmt: skip + + tag = "h4" + categories = ["flow", "heading", "palpable"] + + class hint(GlobalAttrs): + """ + Type hints for "h4" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'h4' (Heading) element. + Documentation: None + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "h4", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/h5_element.py b/src/html_compose/elements/h5_element.py new file mode 100644 index 0000000..466558b --- /dev/null +++ b/src/html_compose/elements/h5_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class h5(BaseElement): + """ + The 'h5' element. + Description: Heading + Categories: flow heading palpable + Parents: legend summary flow + Children: phrasing + Interface: HTMLHeadingElement + Documentation: None + """ # fmt: skip + + tag = "h5" + categories = ["flow", "heading", "palpable"] + + class hint(GlobalAttrs): + """ + Type hints for "h5" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'h5' (Heading) element. + Documentation: None + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "h5", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/h6_element.py b/src/html_compose/elements/h6_element.py new file mode 100644 index 0000000..05f2f5f --- /dev/null +++ b/src/html_compose/elements/h6_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class h6(BaseElement): + """ + The 'h6' element. + Description: Heading + Categories: flow heading palpable + Parents: legend summary flow + Children: phrasing + Interface: HTMLHeadingElement + Documentation: None + """ # fmt: skip + + tag = "h6" + categories = ["flow", "heading", "palpable"] + + class hint(GlobalAttrs): + """ + Type hints for "h6" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'h6' (Heading) element. + Documentation: None + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "h6", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/head_element.py b/src/html_compose/elements/head_element.py new file mode 100644 index 0000000..1417529 --- /dev/null +++ b/src/html_compose/elements/head_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class head(BaseElement): + """ + The 'head' element. + Description: Container for document metadata + Categories: none + Parents: html + Children: metadata content* + Interface: HTMLHeadElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/head + """ # fmt: skip + + tag = "head" + categories = ["none"] + + class hint(GlobalAttrs): + """ + Type hints for "head" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'head' (Container for document metadata) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/head + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "head", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/header_element.py b/src/html_compose/elements/header_element.py new file mode 100644 index 0000000..42b5274 --- /dev/null +++ b/src/html_compose/elements/header_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class header(BaseElement): + """ + The 'header' element. + Description: Introductory or navigational aids for a page or section + Categories: flow palpable + Parents: flow + Children: flow* + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/header + """ # fmt: skip + + tag = "header" + categories = ["flow", "palpable"] + + class hint(GlobalAttrs): + """ + Type hints for "header" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'header' (Introductory or navigational aids for a page or section) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/header + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "header", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/hgroup_element.py b/src/html_compose/elements/hgroup_element.py new file mode 100644 index 0000000..11220df --- /dev/null +++ b/src/html_compose/elements/hgroup_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class hgroup(BaseElement): + """ + The 'hgroup' element. + Description: Heading container + Categories: flow palpable + Parents: legend summary flow + Children: h1 h2 h3 h4 h5 h6 script-supporting elements + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/hgroup + """ # fmt: skip + + tag = "hgroup" + categories = ["flow", "palpable"] + + class hint(GlobalAttrs): + """ + Type hints for "hgroup" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'hgroup' (Heading container) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/hgroup + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "hgroup", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/hr_element.py b/src/html_compose/elements/hr_element.py new file mode 100644 index 0000000..18cd231 --- /dev/null +++ b/src/html_compose/elements/hr_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class hr(BaseElement): + """ + The 'hr' element. + Description: Thematic break + Categories: flow + Parents: flow + Children: empty + Interface: HTMLHRElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/hr + """ # fmt: skip + + tag = "hr" + categories = ["flow"] + + class hint(GlobalAttrs): + """ + Type hints for "hr" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'hr' (Thematic break) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/hr + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "hr", void_element=True, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/html_element.py b/src/html_compose/elements/html_element.py new file mode 100644 index 0000000..627f3fe --- /dev/null +++ b/src/html_compose/elements/html_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class html(BaseElement): + """ + The 'html' element. + Description: Root element + Categories: none + Parents: none* + Children: head* body* + Interface: HTMLHtmlElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/html + """ # fmt: skip + + tag = "html" + categories = ["none"] + + class hint(GlobalAttrs): + """ + Type hints for "html" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'html' (Root element) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/html + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "html", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/i_element.py b/src/html_compose/elements/i_element.py new file mode 100644 index 0000000..d65e8ea --- /dev/null +++ b/src/html_compose/elements/i_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class i(BaseElement): + """ + The 'i' element. + Description: Alternate voice + Categories: flow phrasing palpable + Parents: phrasing + Children: phrasing + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/i + """ # fmt: skip + + tag = "i" + categories = ["flow", "phrasing", "palpable"] + + class hint(GlobalAttrs): + """ + Type hints for "i" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'i' (Alternate voice) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/i + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "i", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/iframe_element.py b/src/html_compose/elements/iframe_element.py new file mode 100644 index 0000000..dd0705b --- /dev/null +++ b/src/html_compose/elements/iframe_element.py @@ -0,0 +1,331 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, IframeAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class iframe(BaseElement): + """ + The 'iframe' element. + Description: Child navigable + Categories: flow phrasing embedded interactive palpable + Parents: phrasing + Children: empty + Interface: HTMLIFrameElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe + """ # fmt: skip + + tag = "iframe" + categories = ["flow", "phrasing", "embedded", "interactive", "palpable"] + + class hint(GlobalAttrs, IframeAttrs): + """ + Type hints for "iframe" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + allow: Optional[str] = None, + allowfullscreen: Optional[Union[str, bool]] = None, + height: Optional[Union[str, int]] = None, + loading: Optional[Union[str, Literal["lazy", "eager"]]] = None, + name: Optional[str] = None, + referrerpolicy: Optional[str] = None, + sandbox: Optional[Union[str, list]] = None, + src: Optional[str] = None, + srcdoc: Optional[str] = None, + width: Optional[Union[str, int]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'iframe' (Child navigable) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `allow` : + Permissions policy to be applied to the iframe's contents + Serialized permissions policy + + `allowfullscreen` : + Whether to allow the iframe's contents to use requestFullscreen() + + `height` : + Vertical dimension + + `loading` : + Used when determining loading deferral + + `name` : + Name of content navigable + Valid navigable target name or keyword + + `referrerpolicy` : + Referrer policy for fetches initiated by the element + Referrer policy + + `sandbox` : + Security rules for nested content + + `src` : + Address of the resource + Valid non-empty URL potentially surrounded by spaces + + `srcdoc` : + A document to render in the iframe + The source of an iframe srcdoc document* + + `width` : + Horizontal dimension + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "iframe", void_element=True, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (allow is None or allow is False): + self._process_attr("allow", allow) + if not (allowfullscreen is None or allowfullscreen is False): + self._process_attr("allowfullscreen", allowfullscreen) + if not (height is None or height is False): + self._process_attr("height", height) + if not (loading is None or loading is False): + self._process_attr("loading", loading) + if not (name is None or name is False): + self._process_attr("name", name) + if not (referrerpolicy is None or referrerpolicy is False): + self._process_attr("referrerpolicy", referrerpolicy) + if not (sandbox is None or sandbox is False): + self._process_attr("sandbox", sandbox) + if not (src is None or src is False): + self._process_attr("src", src) + if not (srcdoc is None or srcdoc is False): + self._process_attr("srcdoc", srcdoc) + if not (width is None or width is False): + self._process_attr("width", width) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/img_element.py b/src/html_compose/elements/img_element.py new file mode 100644 index 0000000..e66699a --- /dev/null +++ b/src/html_compose/elements/img_element.py @@ -0,0 +1,360 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, ImgAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class img(BaseElement): + """ + The 'img' element. + Description: Image + Categories: flow phrasing embedded interactive* form-associated palpable + Parents: phrasing picture + Children: empty + Interface: HTMLImageElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img + """ # fmt: skip + + tag = "img" + categories = [ + "flow", + "phrasing", + "embedded", + "interactive*", + "form-associated", + "palpable", + ] + + class hint(GlobalAttrs, ImgAttrs): + """ + Type hints for "img" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + alt: Optional[str] = None, + crossorigin: Optional[ + Union[str, Literal["anonymous", "use-credentials"]] + ] = None, + decoding: Optional[Union[str, Literal["sync", "async", "auto"]]] = None, + fetchpriority: Optional[ + Union[str, Literal["auto", "high", "low"]] + ] = None, + height: Optional[Union[str, int]] = None, + ismap: Optional[Union[str, bool]] = None, + loading: Optional[Union[str, Literal["lazy", "eager"]]] = None, + referrerpolicy: Optional[str] = None, + sizes: Optional[str] = None, + src: Optional[str] = None, + srcset: Optional[str] = None, + usemap: Optional[str] = None, + width: Optional[Union[str, int]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'img' (Image) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `alt` : + Replacement text for use when images are not available + + `crossorigin` : + How the element handles crossorigin requests + + `decoding` : + Decoding hint to use when processing this image for presentation + + `fetchpriority` : + Sets the priority for fetches initiated by the element + + `height` : + Vertical dimension + + `ismap` : + Whether the image is a server-side image map + + `loading` : + Used when determining loading deferral + + `referrerpolicy` : + Referrer policy for fetches initiated by the element + Referrer policy + + `sizes` : + Image sizes for different page layouts + Valid source size list + + `src` : + Address of the resource + Valid non-empty URL potentially surrounded by spaces + + `srcset` : + Images to use in different situations, e.g., high-resolution displays, small monitors, etc. + Comma-separated list of image candidate strings + + `usemap` : + Name of image map to use + Valid hash-name reference* + + `width` : + Horizontal dimension + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "img", void_element=True, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (alt is None or alt is False): + self._process_attr("alt", alt) + if not (crossorigin is None or crossorigin is False): + self._process_attr("crossorigin", crossorigin) + if not (decoding is None or decoding is False): + self._process_attr("decoding", decoding) + if not (fetchpriority is None or fetchpriority is False): + self._process_attr("fetchpriority", fetchpriority) + if not (height is None or height is False): + self._process_attr("height", height) + if not (ismap is None or ismap is False): + self._process_attr("ismap", ismap) + if not (loading is None or loading is False): + self._process_attr("loading", loading) + if not (referrerpolicy is None or referrerpolicy is False): + self._process_attr("referrerpolicy", referrerpolicy) + if not (sizes is None or sizes is False): + self._process_attr("sizes", sizes) + if not (src is None or src is False): + self._process_attr("src", src) + if not (srcset is None or srcset is False): + self._process_attr("srcset", srcset) + if not (usemap is None or usemap is False): + self._process_attr("usemap", usemap) + if not (width is None or width is False): + self._process_attr("width", width) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/input_element.py b/src/html_compose/elements/input_element.py new file mode 100644 index 0000000..0c2f49e --- /dev/null +++ b/src/html_compose/elements/input_element.py @@ -0,0 +1,509 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, InputAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class input(BaseElement): # type: ignore[misc] + """ + The 'input' element. + Description: Form control + Categories: flow phrasing interactive* listed labelable submittable resettable form-associated palpable* + Parents: phrasing + Children: empty + Interface: HTMLInputElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input + """ # fmt: skip + + tag = "input" + categories = [ + "flow", + "phrasing", + "interactive*", + "listed", + "labelable", + "submittable", + "resettable", + "form-associated", + "palpable*", + ] + + class hint(GlobalAttrs, InputAttrs): + """ + Type hints for "input" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accept: Optional[str] = None, + alpha: Optional[Union[str, bool]] = None, + alt: Optional[str] = None, + autocomplete: Optional[str] = None, + checked: Optional[Union[str, bool]] = None, + colorspace: Optional[ + Union[str, Literal["limited-srgb", "display-p3"]] + ] = None, + dirname: Optional[str] = None, + disabled: Optional[Union[str, bool]] = None, + form: Optional[str] = None, + formaction: Optional[str] = None, + formenctype: Optional[ + Union[ + str, + Literal[ + "application/x-www-form-urlencoded", + "multipart/form-data", + "text/plain", + ], + ] + ] = None, + formmethod: Optional[ + Union[str, Literal["GET", "POST", "dialog"]] + ] = None, + formnovalidate: Optional[Union[str, bool]] = None, + formtarget: Optional[str] = None, + height: Optional[Union[str, int]] = None, + list: Optional[str] = None, + max: Optional[str] = None, + maxlength: Optional[Union[str, int]] = None, + min: Optional[str] = None, + minlength: Optional[Union[str, int]] = None, + multiple: Optional[Union[str, bool]] = None, + name: Optional[str] = None, + pattern: Optional[str] = None, + placeholder: Optional[str] = None, + popovertarget: Optional[str] = None, + popovertargetaction: Optional[ + Union[str, Literal["toggle", "show", "hide"]] + ] = None, + readonly: Optional[Union[str, bool]] = None, + required: Optional[Union[str, bool]] = None, + size: Optional[str] = None, + src: Optional[str] = None, + step: Optional[Union[str, float]] = None, + title: Optional[str] = None, + type: Optional[str] = None, + value: Optional[str] = None, + width: Optional[Union[str, int]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'input' (Form control) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accept` : + Hint for expected file type in file upload controls + Set of comma-separated tokens* consisting of valid MIME type strings with no parameters or audio/*, video/*, or image/* + + `alpha` : + Allow the color's alpha component to be set + + `alt` : + Replacement text for use when images are not available + + `autocomplete` : + Hint for form autofill feature + Autofill field name and related tokens* + + `checked` : + Whether the control is checked + + `colorspace` : + The color space of the serialized color + + `dirname` : + Name of form control to use for sending the element's directionality in form submission + + `disabled` : + Whether the form control is disabled + + `form` : + Associates the element with a form element + ID* + + `formaction` : + URL to use for form submission + Valid non-empty URL potentially surrounded by spaces + + `formenctype` : + Entry list encoding type to use for form submission + + `formmethod` : + Variant to use for form submission + + `formnovalidate` : + Bypass form control validation for form submission + + `formtarget` : + Navigable for form submission + Valid navigable target name or keyword + + `height` : + Vertical dimension + + `list` : + List of autocomplete options + ID* + + `max` : + Maximum value + Varies* + + `maxlength` : + Maximum length of value + + `min` : + Minimum value + Varies* + + `minlength` : + Minimum length of value + + `multiple` : + Whether to allow multiple values + + `name` : + Name of the element to use for form submission and in the form.elements API + + `pattern` : + Pattern to be matched by the form control's value + Regular expression matching the JavaScript Pattern production + + `placeholder` : + User-visible label to be placed within the form control + + `popovertarget` : + Targets a popover element to toggle, show, or hide + ID* + + `popovertargetaction` : + Indicates whether a targeted popover element is to be toggled, shown, or hidden + + `readonly` : + Whether to allow the value to be edited by the user + + `required` : + Whether the control is required for form submission + + `size` : + Size of the control + Valid non-negative integer greater than zero + + `src` : + Address of the resource + Valid non-empty URL potentially surrounded by spaces + + `step` : + Granularity to be matched by the form control's value + + `title` : + Description of pattern (when used with pattern attribute) + + `type` : + Type of form control + input type keyword + + `value` : + Value of the form control + Varies* + + `width` : + Horizontal dimension + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "input", void_element=True, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accept is None or accept is False): + self._process_attr("accept", accept) + if not (alpha is None or alpha is False): + self._process_attr("alpha", alpha) + if not (alt is None or alt is False): + self._process_attr("alt", alt) + if not (autocomplete is None or autocomplete is False): + self._process_attr("autocomplete", autocomplete) + if not (checked is None or checked is False): + self._process_attr("checked", checked) + if not (colorspace is None or colorspace is False): + self._process_attr("colorspace", colorspace) + if not (dirname is None or dirname is False): + self._process_attr("dirname", dirname) + if not (disabled is None or disabled is False): + self._process_attr("disabled", disabled) + if not (form is None or form is False): + self._process_attr("form", form) + if not (formaction is None or formaction is False): + self._process_attr("formaction", formaction) + if not (formenctype is None or formenctype is False): + self._process_attr("formenctype", formenctype) + if not (formmethod is None or formmethod is False): + self._process_attr("formmethod", formmethod) + if not (formnovalidate is None or formnovalidate is False): + self._process_attr("formnovalidate", formnovalidate) + if not (formtarget is None or formtarget is False): + self._process_attr("formtarget", formtarget) + if not (height is None or height is False): + self._process_attr("height", height) + if not (list is None or list is False): + self._process_attr("list", list) + if not (max is None or max is False): + self._process_attr("max", max) + if not (maxlength is None or maxlength is False): + self._process_attr("maxlength", maxlength) + if not (min is None or min is False): + self._process_attr("min", min) + if not (minlength is None or minlength is False): + self._process_attr("minlength", minlength) + if not (multiple is None or multiple is False): + self._process_attr("multiple", multiple) + if not (name is None or name is False): + self._process_attr("name", name) + if not (pattern is None or pattern is False): + self._process_attr("pattern", pattern) + if not (placeholder is None or placeholder is False): + self._process_attr("placeholder", placeholder) + if not (popovertarget is None or popovertarget is False): + self._process_attr("popovertarget", popovertarget) + if not (popovertargetaction is None or popovertargetaction is False): + self._process_attr("popovertargetaction", popovertargetaction) + if not (readonly is None or readonly is False): + self._process_attr("readonly", readonly) + if not (required is None or required is False): + self._process_attr("required", required) + if not (size is None or size is False): + self._process_attr("size", size) + if not (src is None or src is False): + self._process_attr("src", src) + if not (step is None or step is False): + self._process_attr("step", step) + if not (title is None or title is False): + self._process_attr("title", title) + if not (type is None or type is False): + self._process_attr("type", type) + if not (value is None or value is False): + self._process_attr("value", value) + if not (width is None or width is False): + self._process_attr("width", width) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/ins_element.py b/src/html_compose/elements/ins_element.py new file mode 100644 index 0000000..bd5eafd --- /dev/null +++ b/src/html_compose/elements/ins_element.py @@ -0,0 +1,280 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, InsAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class ins(BaseElement): + """ + The 'ins' element. + Description: An addition to the document + Categories: flow phrasing* palpable + Parents: phrasing + Children: transparent + Interface: HTMLModElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ins + """ # fmt: skip + + tag = "ins" + categories = ["flow", "phrasing*", "palpable"] + + class hint(GlobalAttrs, InsAttrs): + """ + Type hints for "ins" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + cite: Optional[str] = None, + datetime: Optional[str] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'ins' (An addition to the document) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ins + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `cite` : + Link to the source of the quotation or more information about the edit + Valid URL potentially surrounded by spaces + + `datetime` : + Date and (optionally) time of the change + Valid date string with optional time + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "ins", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (cite is None or cite is False): + self._process_attr("cite", cite) + if not (datetime is None or datetime is False): + self._process_attr("datetime", datetime) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/kbd_element.py b/src/html_compose/elements/kbd_element.py new file mode 100644 index 0000000..c514e77 --- /dev/null +++ b/src/html_compose/elements/kbd_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class kbd(BaseElement): + """ + The 'kbd' element. + Description: User input + Categories: flow phrasing palpable + Parents: phrasing + Children: phrasing + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/kbd + """ # fmt: skip + + tag = "kbd" + categories = ["flow", "phrasing", "palpable"] + + class hint(GlobalAttrs): + """ + Type hints for "kbd" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'kbd' (User input) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/kbd + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "kbd", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/label_element.py b/src/html_compose/elements/label_element.py new file mode 100644 index 0000000..f3624a5 --- /dev/null +++ b/src/html_compose/elements/label_element.py @@ -0,0 +1,273 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, LabelAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class label(BaseElement): + """ + The 'label' element. + Description: Caption for a form control + Categories: flow phrasing interactive palpable + Parents: phrasing + Children: phrasing* + Interface: HTMLLabelElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label + """ # fmt: skip + + tag = "label" + categories = ["flow", "phrasing", "interactive", "palpable"] + + class hint(GlobalAttrs, LabelAttrs): + """ + Type hints for "label" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + for_: Optional[str] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'label' (Caption for a form control) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `for_` : + Associate the label with form control + ID* + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "label", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (for_ is None or for_ is False): + self._process_attr("for", for_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/legend_element.py b/src/html_compose/elements/legend_element.py new file mode 100644 index 0000000..09d6a79 --- /dev/null +++ b/src/html_compose/elements/legend_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class legend(BaseElement): + """ + The 'legend' element. + Description: Caption for fieldset + Categories: none + Parents: fieldset + Children: phrasing heading content + Interface: HTMLLegendElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/legend + """ # fmt: skip + + tag = "legend" + categories = ["none"] + + class hint(GlobalAttrs): + """ + Type hints for "legend" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'legend' (Caption for fieldset) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/legend + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "legend", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/li_element.py b/src/html_compose/elements/li_element.py new file mode 100644 index 0000000..291a7f6 --- /dev/null +++ b/src/html_compose/elements/li_element.py @@ -0,0 +1,272 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, LiAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class li(BaseElement): + """ + The 'li' element. + Description: List item + Categories: none + Parents: ol ul menu* + Children: flow + Interface: HTMLLIElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/li + """ # fmt: skip + + tag = "li" + categories = ["none"] + + class hint(GlobalAttrs, LiAttrs): + """ + Type hints for "li" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + value: Optional[Union[str, int]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'li' (List item) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/li + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `value` : + Ordinal value of the list item + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "li", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (value is None or value is False): + self._process_attr("value", value) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/link_element.py b/src/html_compose/elements/link_element.py new file mode 100644 index 0000000..2bf7592 --- /dev/null +++ b/src/html_compose/elements/link_element.py @@ -0,0 +1,377 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, LinkAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class link(BaseElement): # type: ignore[misc] + """ + The 'link' element. + Description: Link metadata + Categories: metadata flow* phrasing* + Parents: head noscript* phrasing* + Children: empty + Interface: HTMLLinkElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link + """ # fmt: skip + + tag = "link" + categories = ["metadata", "flow*", "phrasing*"] + + class hint(GlobalAttrs, LinkAttrs): + """ + Type hints for "link" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + as_: Optional[str] = None, + blocking: Optional[Union[str, list]] = None, + color: Optional[str] = None, + crossorigin: Optional[ + Union[str, Literal["anonymous", "use-credentials"]] + ] = None, + disabled: Optional[Union[str, bool]] = None, + fetchpriority: Optional[ + Union[str, Literal["auto", "high", "low"]] + ] = None, + href: Optional[str] = None, + hreflang: Optional[str] = None, + imagesizes: Optional[str] = None, + imagesrcset: Optional[str] = None, + integrity: Optional[str] = None, + media: Optional[str] = None, + referrerpolicy: Optional[str] = None, + rel: Optional[Union[str, list]] = None, + sizes: Optional[Union[str, list]] = None, + title: Optional[str] = None, + type: Optional[str] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'link' (Link metadata) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `as_` : + Potential destination for a preload request (for rel="preload" and rel="modulepreload") + Potential destination, for rel="preload"; script-like destination, for rel="modulepreload" + + `blocking` : + Whether the element is potentially render-blocking + + `color` : + Color to use when customizing a site's icon (for rel="mask-icon") + CSS + + `crossorigin` : + How the element handles crossorigin requests + + `disabled` : + Whether the link is disabled + + `fetchpriority` : + Sets the priority for fetches initiated by the element + + `href` : + Address of the hyperlink + Valid non-empty URL potentially surrounded by spaces + + `hreflang` : + Language of the linked resource + Valid BCP 47 language tag + + `imagesizes` : + Image sizes for different page layouts (for rel="preload") + Valid source size list + + `imagesrcset` : + Images to use in different situations, e.g., high-resolution displays, small monitors, etc. (for rel="preload") + Comma-separated list of image candidate strings + + `integrity` : + Integrity metadata used in Subresource Integrity checks [SRI] + + `media` : + Applicable media + Valid media query list + + `referrerpolicy` : + Referrer policy for fetches initiated by the element + Referrer policy + + `rel` : + Relationship between the document containing the hyperlink and the destination resource + + `sizes` : + Sizes of the icons (for rel="icon") + + `title` : + CSS style sheet set name + `title` : + Title of the link + + `type` : + Hint for the type of the referenced resource + Valid MIME type string + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "link", void_element=True, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (as_ is None or as_ is False): + self._process_attr("as", as_) + if not (blocking is None or blocking is False): + self._process_attr("blocking", blocking) + if not (color is None or color is False): + self._process_attr("color", color) + if not (crossorigin is None or crossorigin is False): + self._process_attr("crossorigin", crossorigin) + if not (disabled is None or disabled is False): + self._process_attr("disabled", disabled) + if not (fetchpriority is None or fetchpriority is False): + self._process_attr("fetchpriority", fetchpriority) + if not (href is None or href is False): + self._process_attr("href", href) + if not (hreflang is None or hreflang is False): + self._process_attr("hreflang", hreflang) + if not (imagesizes is None or imagesizes is False): + self._process_attr("imagesizes", imagesizes) + if not (imagesrcset is None or imagesrcset is False): + self._process_attr("imagesrcset", imagesrcset) + if not (integrity is None or integrity is False): + self._process_attr("integrity", integrity) + if not (media is None or media is False): + self._process_attr("media", media) + if not (referrerpolicy is None or referrerpolicy is False): + self._process_attr("referrerpolicy", referrerpolicy) + if not (rel is None or rel is False): + self._process_attr("rel", rel) + if not (sizes is None or sizes is False): + self._process_attr("sizes", sizes) + if not (title is None or title is False): + self._process_attr("title", title) + if not (type is None or type is False): + self._process_attr("type", type) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/main_element.py b/src/html_compose/elements/main_element.py new file mode 100644 index 0000000..46a9efd --- /dev/null +++ b/src/html_compose/elements/main_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class main(BaseElement): + """ + The 'main' element. + Description: Container for the dominant contents of the document + Categories: flow palpable + Parents: flow* + Children: flow + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/main + """ # fmt: skip + + tag = "main" + categories = ["flow", "palpable"] + + class hint(GlobalAttrs): + """ + Type hints for "main" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'main' (Container for the dominant contents of the document) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/main + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "main", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/map_element.py b/src/html_compose/elements/map_element.py new file mode 100644 index 0000000..8d9b5ca --- /dev/null +++ b/src/html_compose/elements/map_element.py @@ -0,0 +1,272 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, MapAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class map(BaseElement): + """ + The 'map' element. + Description: Image map + Categories: flow phrasing* palpable + Parents: phrasing + Children: transparent area* + Interface: HTMLMapElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/map + """ # fmt: skip + + tag = "map" + categories = ["flow", "phrasing*", "palpable"] + + class hint(GlobalAttrs, MapAttrs): + """ + Type hints for "map" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + name: Optional[str] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'map' (Image map) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/map + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `name` : + Name of image map to reference from the usemap attribute + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "map", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (name is None or name is False): + self._process_attr("name", name) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/mark_element.py b/src/html_compose/elements/mark_element.py new file mode 100644 index 0000000..b809372 --- /dev/null +++ b/src/html_compose/elements/mark_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class mark(BaseElement): + """ + The 'mark' element. + Description: Highlight + Categories: flow phrasing palpable + Parents: phrasing + Children: phrasing + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/mark + """ # fmt: skip + + tag = "mark" + categories = ["flow", "phrasing", "palpable"] + + class hint(GlobalAttrs): + """ + Type hints for "mark" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'mark' (Highlight) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/mark + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "mark", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/menu_element.py b/src/html_compose/elements/menu_element.py new file mode 100644 index 0000000..2526f47 --- /dev/null +++ b/src/html_compose/elements/menu_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class menu(BaseElement): + """ + The 'menu' element. + Description: Menu of commands + Categories: flow palpable* + Parents: flow + Children: li script-supporting elements + Interface: HTMLMenuElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/menu + """ # fmt: skip + + tag = "menu" + categories = ["flow", "palpable*"] + + class hint(GlobalAttrs): + """ + Type hints for "menu" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'menu' (Menu of commands) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/menu + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "menu", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/meta_element.py b/src/html_compose/elements/meta_element.py new file mode 100644 index 0000000..1af5a4b --- /dev/null +++ b/src/html_compose/elements/meta_element.py @@ -0,0 +1,308 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, MetaAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class meta(BaseElement): + """ + The 'meta' element. + Description: Text metadata + Categories: metadata flow* phrasing* + Parents: head noscript* phrasing* + Children: empty + Interface: HTMLMetaElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta + """ # fmt: skip + + tag = "meta" + categories = ["metadata", "flow*", "phrasing*"] + + class hint(GlobalAttrs, MetaAttrs): + """ + Type hints for "meta" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + charset: Optional[Union[str, Literal["utf-8"]]] = None, + content: Optional[str] = None, + http_equiv: Optional[ + Union[ + str, + Literal[ + "content-type", + "default-style", + "refresh", + "x-ua-compatible", + "content-security-policy", + ], + ] + ] = None, + media: Optional[str] = None, + name: Optional[str] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'meta' (Text metadata) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `charset` : + Character encoding declaration + + `content` : + Value of the element + + `http_equiv` : + Pragma directive + + `media` : + Applicable media + Valid media query list + + `name` : + Metadata name + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "meta", void_element=True, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (charset is None or charset is False): + self._process_attr("charset", charset) + if not (content is None or content is False): + self._process_attr("content", content) + if not (http_equiv is None or http_equiv is False): + self._process_attr("http-equiv", http_equiv) + if not (media is None or media is False): + self._process_attr("media", media) + if not (name is None or name is False): + self._process_attr("name", name) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/meter_element.py b/src/html_compose/elements/meter_element.py new file mode 100644 index 0000000..2017970 --- /dev/null +++ b/src/html_compose/elements/meter_element.py @@ -0,0 +1,302 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, MeterAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class meter(BaseElement): + """ + The 'meter' element. + Description: Gauge + Categories: flow phrasing labelable palpable + Parents: phrasing + Children: phrasing* + Interface: HTMLMeterElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meter + """ # fmt: skip + + tag = "meter" + categories = ["flow", "phrasing", "labelable", "palpable"] + + class hint(GlobalAttrs, MeterAttrs): + """ + Type hints for "meter" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + high: Optional[Union[str, float]] = None, + low: Optional[Union[str, float]] = None, + max: Optional[Union[str, float]] = None, + min: Optional[Union[str, float]] = None, + optimum: Optional[Union[str, float]] = None, + value: Optional[Union[str, float]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'meter' (Gauge) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meter + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `high` : + Low limit of high range + + `low` : + High limit of low range + + `max` : + Upper bound of range + + `min` : + Lower bound of range + + `optimum` : + Optimum value in gauge + + `value` : + Current value of the element + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "meter", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (high is None or high is False): + self._process_attr("high", high) + if not (low is None or low is False): + self._process_attr("low", low) + if not (max is None or max is False): + self._process_attr("max", max) + if not (min is None or min is False): + self._process_attr("min", min) + if not (optimum is None or optimum is False): + self._process_attr("optimum", optimum) + if not (value is None or value is False): + self._process_attr("value", value) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/nav_element.py b/src/html_compose/elements/nav_element.py new file mode 100644 index 0000000..05e49f6 --- /dev/null +++ b/src/html_compose/elements/nav_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class nav(BaseElement): + """ + The 'nav' element. + Description: Section with navigational links + Categories: flow sectioning palpable + Parents: flow + Children: flow + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/nav + """ # fmt: skip + + tag = "nav" + categories = ["flow", "sectioning", "palpable"] + + class hint(GlobalAttrs): + """ + Type hints for "nav" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'nav' (Section with navigational links) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/nav + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "nav", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/noscript_element.py b/src/html_compose/elements/noscript_element.py new file mode 100644 index 0000000..f3f1924 --- /dev/null +++ b/src/html_compose/elements/noscript_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class noscript(BaseElement): + """ + The 'noscript' element. + Description: Fallback content for script + Categories: metadata flow phrasing + Parents: head* phrasing* + Children: varies* + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/noscript + """ # fmt: skip + + tag = "noscript" + categories = ["metadata", "flow", "phrasing"] + + class hint(GlobalAttrs): + """ + Type hints for "noscript" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'noscript' (Fallback content for script) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/noscript + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "noscript", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/object_element.py b/src/html_compose/elements/object_element.py new file mode 100644 index 0000000..bf05443 --- /dev/null +++ b/src/html_compose/elements/object_element.py @@ -0,0 +1,314 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, ObjectAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class object(BaseElement): + """ + The 'object' element. + Description: Image, child navigable, or plugin + Categories: flow phrasing embedded interactive* listed form-associated palpable + Parents: phrasing + Children: transparent + Interface: HTMLObjectElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/object + """ # fmt: skip + + tag = "object" + categories = [ + "flow", + "phrasing", + "embedded", + "interactive*", + "listed", + "form-associated", + "palpable", + ] + + class hint(GlobalAttrs, ObjectAttrs): + """ + Type hints for "object" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + data: Optional[str] = None, + form: Optional[str] = None, + height: Optional[Union[str, int]] = None, + name: Optional[str] = None, + type: Optional[str] = None, + width: Optional[Union[str, int]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'object' (Image, child navigable, or plugin) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/object + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `data` : + Address of the resource + Valid non-empty URL potentially surrounded by spaces + + `form` : + Associates the element with a form element + ID* + + `height` : + Vertical dimension + + `name` : + Name of content navigable + Valid navigable target name or keyword + + `type` : + Type of embedded resource + Valid MIME type string + + `width` : + Horizontal dimension + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "object", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (data is None or data is False): + self._process_attr("data", data) + if not (form is None or form is False): + self._process_attr("form", form) + if not (height is None or height is False): + self._process_attr("height", height) + if not (name is None or name is False): + self._process_attr("name", name) + if not (type is None or type is False): + self._process_attr("type", type) + if not (width is None or width is False): + self._process_attr("width", width) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/ol_element.py b/src/html_compose/elements/ol_element.py new file mode 100644 index 0000000..3a16165 --- /dev/null +++ b/src/html_compose/elements/ol_element.py @@ -0,0 +1,284 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, OlAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class ol(BaseElement): + """ + The 'ol' element. + Description: Ordered list + Categories: flow palpable* + Parents: flow + Children: li script-supporting elements + Interface: HTMLOListElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ol + """ # fmt: skip + + tag = "ol" + categories = ["flow", "palpable*"] + + class hint(GlobalAttrs, OlAttrs): + """ + Type hints for "ol" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + reversed: Optional[Union[str, bool]] = None, + start: Optional[Union[str, int]] = None, + type: Optional[Union[str, Literal["1", "a", "A", "i", "I"]]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'ol' (Ordered list) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ol + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `reversed` : + Number the list backwards + + `start` : + Starting value of the list + + `type` : + Kind of list marker + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "ol", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (reversed is None or reversed is False): + self._process_attr("reversed", reversed) + if not (start is None or start is False): + self._process_attr("start", start) + if not (type is None or type is False): + self._process_attr("type", type) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/optgroup_element.py b/src/html_compose/elements/optgroup_element.py new file mode 100644 index 0000000..dd21878 --- /dev/null +++ b/src/html_compose/elements/optgroup_element.py @@ -0,0 +1,278 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, OptgroupAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class optgroup(BaseElement): + """ + The 'optgroup' element. + Description: Group of options in a list box + Categories: none + Parents: select + Children: option script-supporting elements + Interface: HTMLOptGroupElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/optgroup + """ # fmt: skip + + tag = "optgroup" + categories = ["none"] + + class hint(GlobalAttrs, OptgroupAttrs): + """ + Type hints for "optgroup" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + disabled: Optional[Union[str, bool]] = None, + label: Optional[str] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'optgroup' (Group of options in a list box) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/optgroup + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `disabled` : + Whether the form control is disabled + + `label` : + User-visible label + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "optgroup", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (disabled is None or disabled is False): + self._process_attr("disabled", disabled) + if not (label is None or label is False): + self._process_attr("label", label) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/option_element.py b/src/html_compose/elements/option_element.py new file mode 100644 index 0000000..6bb765d --- /dev/null +++ b/src/html_compose/elements/option_element.py @@ -0,0 +1,290 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, OptionAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class option(BaseElement): + """ + The 'option' element. + Description: Option in a list box or combo box control + Categories: none + Parents: select datalist optgroup + Children: text* + Interface: HTMLOptionElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option + """ # fmt: skip + + tag = "option" + categories = ["none"] + + class hint(GlobalAttrs, OptionAttrs): + """ + Type hints for "option" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + disabled: Optional[Union[str, bool]] = None, + label: Optional[str] = None, + selected: Optional[Union[str, bool]] = None, + value: Optional[str] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'option' (Option in a list box or combo box control) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `disabled` : + Whether the form control is disabled + + `label` : + User-visible label + + `selected` : + Whether the option is selected by default + + `value` : + Value to be used for form submission + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "option", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (disabled is None or disabled is False): + self._process_attr("disabled", disabled) + if not (label is None or label is False): + self._process_attr("label", label) + if not (selected is None or selected is False): + self._process_attr("selected", selected) + if not (value is None or value is False): + self._process_attr("value", value) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/output_element.py b/src/html_compose/elements/output_element.py new file mode 100644 index 0000000..7b16d77 --- /dev/null +++ b/src/html_compose/elements/output_element.py @@ -0,0 +1,293 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, OutputAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class output(BaseElement): + """ + The 'output' element. + Description: Calculated output value + Categories: flow phrasing listed labelable resettable form-associated palpable + Parents: phrasing + Children: phrasing + Interface: HTMLOutputElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/output + """ # fmt: skip + + tag = "output" + categories = [ + "flow", + "phrasing", + "listed", + "labelable", + "resettable", + "form-associated", + "palpable", + ] + + class hint(GlobalAttrs, OutputAttrs): + """ + Type hints for "output" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + for_: Optional[Union[str, list]] = None, + form: Optional[str] = None, + name: Optional[str] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'output' (Calculated output value) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/output + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `for_` : + Specifies controls from which the output was calculated + + `form` : + Associates the element with a form element + ID* + + `name` : + Name of the element to use for form submission and in the form.elements API + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "output", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (for_ is None or for_ is False): + self._process_attr("for", for_) + if not (form is None or form is False): + self._process_attr("form", form) + if not (name is None or name is False): + self._process_attr("name", name) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/p_element.py b/src/html_compose/elements/p_element.py new file mode 100644 index 0000000..8f945d3 --- /dev/null +++ b/src/html_compose/elements/p_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class p(BaseElement): + """ + The 'p' element. + Description: Paragraph + Categories: flow palpable + Parents: flow + Children: phrasing + Interface: HTMLParagraphElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/p + """ # fmt: skip + + tag = "p" + categories = ["flow", "palpable"] + + class hint(GlobalAttrs): + """ + Type hints for "p" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'p' (Paragraph) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/p + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "p", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/picture_element.py b/src/html_compose/elements/picture_element.py new file mode 100644 index 0000000..dd35e1c --- /dev/null +++ b/src/html_compose/elements/picture_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class picture(BaseElement): + """ + The 'picture' element. + Description: Image + Categories: flow phrasing embedded palpable + Parents: phrasing + Children: source* one img script-supporting elements + Interface: HTMLPictureElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture + """ # fmt: skip + + tag = "picture" + categories = ["flow", "phrasing", "embedded", "palpable"] + + class hint(GlobalAttrs): + """ + Type hints for "picture" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'picture' (Image) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "picture", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/pre_element.py b/src/html_compose/elements/pre_element.py new file mode 100644 index 0000000..4e9a42a --- /dev/null +++ b/src/html_compose/elements/pre_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class pre(BaseElement): + """ + The 'pre' element. + Description: Block of preformatted text + Categories: flow palpable + Parents: flow + Children: phrasing + Interface: HTMLPreElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/pre + """ # fmt: skip + + tag = "pre" + categories = ["flow", "palpable"] + + class hint(GlobalAttrs): + """ + Type hints for "pre" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'pre' (Block of preformatted text) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/pre + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "pre", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/progress_element.py b/src/html_compose/elements/progress_element.py new file mode 100644 index 0000000..9625267 --- /dev/null +++ b/src/html_compose/elements/progress_element.py @@ -0,0 +1,278 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, ProgressAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class progress(BaseElement): + """ + The 'progress' element. + Description: Progress bar + Categories: flow phrasing labelable palpable + Parents: phrasing + Children: phrasing* + Interface: HTMLProgressElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/progress + """ # fmt: skip + + tag = "progress" + categories = ["flow", "phrasing", "labelable", "palpable"] + + class hint(GlobalAttrs, ProgressAttrs): + """ + Type hints for "progress" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + max: Optional[Union[str, float]] = None, + value: Optional[Union[str, float]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'progress' (Progress bar) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/progress + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `max` : + Upper bound of range + + `value` : + Current value of the element + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "progress", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (max is None or max is False): + self._process_attr("max", max) + if not (value is None or value is False): + self._process_attr("value", value) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/q_element.py b/src/html_compose/elements/q_element.py new file mode 100644 index 0000000..d37a888 --- /dev/null +++ b/src/html_compose/elements/q_element.py @@ -0,0 +1,273 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, QAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class q(BaseElement): + """ + The 'q' element. + Description: Quotation + Categories: flow phrasing palpable + Parents: phrasing + Children: phrasing + Interface: HTMLQuoteElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/q + """ # fmt: skip + + tag = "q" + categories = ["flow", "phrasing", "palpable"] + + class hint(GlobalAttrs, QAttrs): + """ + Type hints for "q" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + cite: Optional[str] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'q' (Quotation) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/q + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `cite` : + Link to the source of the quotation or more information about the edit + Valid URL potentially surrounded by spaces + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "q", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (cite is None or cite is False): + self._process_attr("cite", cite) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/rp_element.py b/src/html_compose/elements/rp_element.py new file mode 100644 index 0000000..6dbefe2 --- /dev/null +++ b/src/html_compose/elements/rp_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class rp(BaseElement): + """ + The 'rp' element. + Description: Parenthesis for ruby annotation text + Categories: none + Parents: ruby + Children: text + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/rp + """ # fmt: skip + + tag = "rp" + categories = ["none"] + + class hint(GlobalAttrs): + """ + Type hints for "rp" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'rp' (Parenthesis for ruby annotation text) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/rp + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "rp", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/rt_element.py b/src/html_compose/elements/rt_element.py new file mode 100644 index 0000000..fa98c52 --- /dev/null +++ b/src/html_compose/elements/rt_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class rt(BaseElement): + """ + The 'rt' element. + Description: Ruby annotation text + Categories: none + Parents: ruby + Children: phrasing + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/rt + """ # fmt: skip + + tag = "rt" + categories = ["none"] + + class hint(GlobalAttrs): + """ + Type hints for "rt" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'rt' (Ruby annotation text) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/rt + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "rt", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/ruby_element.py b/src/html_compose/elements/ruby_element.py new file mode 100644 index 0000000..2d33f0f --- /dev/null +++ b/src/html_compose/elements/ruby_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class ruby(BaseElement): + """ + The 'ruby' element. + Description: Ruby annotation(s) + Categories: flow phrasing palpable + Parents: phrasing + Children: phrasing rt rp* + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ruby + """ # fmt: skip + + tag = "ruby" + categories = ["flow", "phrasing", "palpable"] + + class hint(GlobalAttrs): + """ + Type hints for "ruby" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'ruby' (Ruby annotation(s)) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ruby + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "ruby", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/s_element.py b/src/html_compose/elements/s_element.py new file mode 100644 index 0000000..fba4d0a --- /dev/null +++ b/src/html_compose/elements/s_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class s(BaseElement): + """ + The 's' element. + Description: Inaccurate text + Categories: flow phrasing palpable + Parents: phrasing + Children: phrasing + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/s + """ # fmt: skip + + tag = "s" + categories = ["flow", "phrasing", "palpable"] + + class hint(GlobalAttrs): + """ + Type hints for "s" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 's' (Inaccurate text) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/s + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "s", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/samp_element.py b/src/html_compose/elements/samp_element.py new file mode 100644 index 0000000..d08e756 --- /dev/null +++ b/src/html_compose/elements/samp_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class samp(BaseElement): + """ + The 'samp' element. + Description: Computer output + Categories: flow phrasing palpable + Parents: phrasing + Children: phrasing + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/samp + """ # fmt: skip + + tag = "samp" + categories = ["flow", "phrasing", "palpable"] + + class hint(GlobalAttrs): + """ + Type hints for "samp" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'samp' (Computer output) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/samp + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "samp", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/script_element.py b/src/html_compose/elements/script_element.py new file mode 100644 index 0000000..2905544 --- /dev/null +++ b/src/html_compose/elements/script_element.py @@ -0,0 +1,333 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, ScriptAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class script(BaseElement): + """ + The 'script' element. + Description: Embedded script + Categories: metadata flow phrasing script-supporting + Parents: head phrasing script-supporting + Children: script, data, or script documentation* + Interface: HTMLScriptElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script + """ # fmt: skip + + tag = "script" + categories = ["metadata", "flow", "phrasing", "script-supporting"] + + class hint(GlobalAttrs, ScriptAttrs): + """ + Type hints for "script" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + async_: Optional[Union[str, bool]] = None, + blocking: Optional[Union[str, list]] = None, + crossorigin: Optional[ + Union[str, Literal["anonymous", "use-credentials"]] + ] = None, + defer: Optional[Union[str, bool]] = None, + fetchpriority: Optional[ + Union[str, Literal["auto", "high", "low"]] + ] = None, + integrity: Optional[str] = None, + nomodule: Optional[Union[str, bool]] = None, + referrerpolicy: Optional[str] = None, + src: Optional[str] = None, + type: Optional[str] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'script' (Embedded script) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `async_` : + Execute script when available, without blocking while fetching + + `blocking` : + Whether the element is potentially render-blocking + + `crossorigin` : + How the element handles crossorigin requests + + `defer` : + Defer script execution + + `fetchpriority` : + Sets the priority for fetches initiated by the element + + `integrity` : + Integrity metadata used in Subresource Integrity checks [SRI] + + `nomodule` : + Prevents execution in user agents that support module scripts + + `referrerpolicy` : + Referrer policy for fetches initiated by the element + Referrer policy + + `src` : + Address of the resource + Valid non-empty URL potentially surrounded by spaces + + `type` : + Type of script + "module"; a valid MIME type string that is not a JavaScript MIME type essence match + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "script", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (async_ is None or async_ is False): + self._process_attr("async", async_) + if not (blocking is None or blocking is False): + self._process_attr("blocking", blocking) + if not (crossorigin is None or crossorigin is False): + self._process_attr("crossorigin", crossorigin) + if not (defer is None or defer is False): + self._process_attr("defer", defer) + if not (fetchpriority is None or fetchpriority is False): + self._process_attr("fetchpriority", fetchpriority) + if not (integrity is None or integrity is False): + self._process_attr("integrity", integrity) + if not (nomodule is None or nomodule is False): + self._process_attr("nomodule", nomodule) + if not (referrerpolicy is None or referrerpolicy is False): + self._process_attr("referrerpolicy", referrerpolicy) + if not (src is None or src is False): + self._process_attr("src", src) + if not (type is None or type is False): + self._process_attr("type", type) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/search_element.py b/src/html_compose/elements/search_element.py new file mode 100644 index 0000000..ee006c2 --- /dev/null +++ b/src/html_compose/elements/search_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class search(BaseElement): + """ + The 'search' element. + Description: Container for search controls + Categories: flow palpable + Parents: flow + Children: flow + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/search + """ # fmt: skip + + tag = "search" + categories = ["flow", "palpable"] + + class hint(GlobalAttrs): + """ + Type hints for "search" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'search' (Container for search controls) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/search + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "search", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/section_element.py b/src/html_compose/elements/section_element.py new file mode 100644 index 0000000..0c220b4 --- /dev/null +++ b/src/html_compose/elements/section_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class section(BaseElement): + """ + The 'section' element. + Description: Generic document or application section + Categories: flow sectioning palpable + Parents: flow + Children: flow + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/section + """ # fmt: skip + + tag = "section" + categories = ["flow", "sectioning", "palpable"] + + class hint(GlobalAttrs): + """ + Type hints for "section" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'section' (Generic document or application section) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/section + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "section", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/select_element.py b/src/html_compose/elements/select_element.py new file mode 100644 index 0000000..3760eb4 --- /dev/null +++ b/src/html_compose/elements/select_element.py @@ -0,0 +1,321 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, SelectAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class select(BaseElement): + """ + The 'select' element. + Description: List box control + Categories: flow phrasing interactive listed labelable submittable resettable form-associated palpable + Parents: phrasing + Children: option optgroup script-supporting elements + Interface: HTMLSelectElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select + """ # fmt: skip + + tag = "select" + categories = [ + "flow", + "phrasing", + "interactive", + "listed", + "labelable", + "submittable", + "resettable", + "form-associated", + "palpable", + ] + + class hint(GlobalAttrs, SelectAttrs): + """ + Type hints for "select" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + autocomplete: Optional[str] = None, + disabled: Optional[Union[str, bool]] = None, + form: Optional[str] = None, + multiple: Optional[Union[str, bool]] = None, + name: Optional[str] = None, + required: Optional[Union[str, bool]] = None, + size: Optional[str] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'select' (List box control) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `autocomplete` : + Hint for form autofill feature + Autofill field name and related tokens* + + `disabled` : + Whether the form control is disabled + + `form` : + Associates the element with a form element + ID* + + `multiple` : + Whether to allow multiple values + + `name` : + Name of the element to use for form submission and in the form.elements API + + `required` : + Whether the control is required for form submission + + `size` : + Size of the control + Valid non-negative integer greater than zero + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "select", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (autocomplete is None or autocomplete is False): + self._process_attr("autocomplete", autocomplete) + if not (disabled is None or disabled is False): + self._process_attr("disabled", disabled) + if not (form is None or form is False): + self._process_attr("form", form) + if not (multiple is None or multiple is False): + self._process_attr("multiple", multiple) + if not (name is None or name is False): + self._process_attr("name", name) + if not (required is None or required is False): + self._process_attr("required", required) + if not (size is None or size is False): + self._process_attr("size", size) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/slot_element.py b/src/html_compose/elements/slot_element.py new file mode 100644 index 0000000..6d650af --- /dev/null +++ b/src/html_compose/elements/slot_element.py @@ -0,0 +1,272 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, SlotAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class slot(BaseElement): + """ + The 'slot' element. + Description: Shadow tree slot + Categories: flow phrasing + Parents: phrasing + Children: transparent + Interface: HTMLSlotElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/slot + """ # fmt: skip + + tag = "slot" + categories = ["flow", "phrasing"] + + class hint(GlobalAttrs, SlotAttrs): + """ + Type hints for "slot" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + name: Optional[str] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'slot' (Shadow tree slot) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/slot + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `name` : + Name of shadow tree slot + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "slot", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (name is None or name is False): + self._process_attr("name", name) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/small_element.py b/src/html_compose/elements/small_element.py new file mode 100644 index 0000000..fefa24f --- /dev/null +++ b/src/html_compose/elements/small_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class small(BaseElement): + """ + The 'small' element. + Description: Side comment + Categories: flow phrasing palpable + Parents: phrasing + Children: phrasing + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/small + """ # fmt: skip + + tag = "small" + categories = ["flow", "phrasing", "palpable"] + + class hint(GlobalAttrs): + """ + Type hints for "small" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'small' (Side comment) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/small + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "small", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/source_element.py b/src/html_compose/elements/source_element.py new file mode 100644 index 0000000..24adc63 --- /dev/null +++ b/src/html_compose/elements/source_element.py @@ -0,0 +1,313 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, SourceAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class source(BaseElement): + """ + The 'source' element. + Description: Image source for img or media source for video or audio + Categories: none + Parents: picture video audio + Children: empty + Interface: HTMLSourceElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source + """ # fmt: skip + + tag = "source" + categories = ["none"] + + class hint(GlobalAttrs, SourceAttrs): + """ + Type hints for "source" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + height: Optional[Union[str, int]] = None, + media: Optional[str] = None, + sizes: Optional[str] = None, + src: Optional[str] = None, + srcset: Optional[str] = None, + type: Optional[str] = None, + width: Optional[Union[str, int]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'source' (Image source for img or media source for video or audio) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `height` : + Vertical dimension + + `media` : + Applicable media + Valid media query list + + `sizes` : + Image sizes for different page layouts + Valid source size list + + `src` : + Address of the resource + Valid non-empty URL potentially surrounded by spaces + + `srcset` : + Images to use in different situations, e.g., high-resolution displays, small monitors, etc. + Comma-separated list of image candidate strings + + `type` : + Type of embedded resource + Valid MIME type string + + `width` : + Horizontal dimension + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "source", void_element=True, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (height is None or height is False): + self._process_attr("height", height) + if not (media is None or media is False): + self._process_attr("media", media) + if not (sizes is None or sizes is False): + self._process_attr("sizes", sizes) + if not (src is None or src is False): + self._process_attr("src", src) + if not (srcset is None or srcset is False): + self._process_attr("srcset", srcset) + if not (type is None or type is False): + self._process_attr("type", type) + if not (width is None or width is False): + self._process_attr("width", width) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/span_element.py b/src/html_compose/elements/span_element.py new file mode 100644 index 0000000..9bf5701 --- /dev/null +++ b/src/html_compose/elements/span_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class span(BaseElement): + """ + The 'span' element. + Description: Generic phrasing container + Categories: flow phrasing palpable + Parents: phrasing + Children: phrasing + Interface: HTMLSpanElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/span + """ # fmt: skip + + tag = "span" + categories = ["flow", "phrasing", "palpable"] + + class hint(GlobalAttrs): + """ + Type hints for "span" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'span' (Generic phrasing container) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/span + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "span", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/strong_element.py b/src/html_compose/elements/strong_element.py new file mode 100644 index 0000000..7ab7f1a --- /dev/null +++ b/src/html_compose/elements/strong_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class strong(BaseElement): + """ + The 'strong' element. + Description: Importance + Categories: flow phrasing palpable + Parents: phrasing + Children: phrasing + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/strong + """ # fmt: skip + + tag = "strong" + categories = ["flow", "phrasing", "palpable"] + + class hint(GlobalAttrs): + """ + Type hints for "strong" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'strong' (Importance) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/strong + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "strong", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/style_element.py b/src/html_compose/elements/style_element.py new file mode 100644 index 0000000..ef48a32 --- /dev/null +++ b/src/html_compose/elements/style_element.py @@ -0,0 +1,279 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, StyleAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class style(BaseElement): # type: ignore[misc] + """ + The 'style' element. + Description: Embedded styling information + Categories: metadata + Parents: head noscript* + Children: text* + Interface: HTMLStyleElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/style + """ # fmt: skip + + tag = "style" + categories = ["metadata"] + + class hint(GlobalAttrs, StyleAttrs): + """ + Type hints for "style" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + blocking: Optional[Union[str, list]] = None, + media: Optional[str] = None, + title: Optional[str] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'style' (Embedded styling information) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/style + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `blocking` : + Whether the element is potentially render-blocking + + `media` : + Applicable media + Valid media query list + + `title` : + CSS style sheet set name + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "style", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (blocking is None or blocking is False): + self._process_attr("blocking", blocking) + if not (media is None or media is False): + self._process_attr("media", media) + if not (title is None or title is False): + self._process_attr("title", title) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/sub_element.py b/src/html_compose/elements/sub_element.py new file mode 100644 index 0000000..8f69a40 --- /dev/null +++ b/src/html_compose/elements/sub_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class sub(BaseElement): + """ + The 'sub' element. + Description: Subscript + Categories: flow phrasing palpable + Parents: phrasing + Children: phrasing + Interface: HTMLElement + Documentation: None + """ # fmt: skip + + tag = "sub" + categories = ["flow", "phrasing", "palpable"] + + class hint(GlobalAttrs): + """ + Type hints for "sub" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'sub' (Subscript) element. + Documentation: None + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "sub", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/summary_element.py b/src/html_compose/elements/summary_element.py new file mode 100644 index 0000000..d5e3c2e --- /dev/null +++ b/src/html_compose/elements/summary_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class summary(BaseElement): + """ + The 'summary' element. + Description: Caption for details + Categories: none + Parents: details + Children: phrasing heading content + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/summary + """ # fmt: skip + + tag = "summary" + categories = ["none"] + + class hint(GlobalAttrs): + """ + Type hints for "summary" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'summary' (Caption for details) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/summary + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "summary", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/sup_element.py b/src/html_compose/elements/sup_element.py new file mode 100644 index 0000000..c6c5119 --- /dev/null +++ b/src/html_compose/elements/sup_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class sup(BaseElement): + """ + The 'sup' element. + Description: Superscript + Categories: flow phrasing palpable + Parents: phrasing + Children: phrasing + Interface: HTMLElement + Documentation: None + """ # fmt: skip + + tag = "sup" + categories = ["flow", "phrasing", "palpable"] + + class hint(GlobalAttrs): + """ + Type hints for "sup" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'sup' (Superscript) element. + Documentation: None + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "sup", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/svg_element.py b/src/html_compose/elements/svg_element.py new file mode 100644 index 0000000..c9d439c --- /dev/null +++ b/src/html_compose/elements/svg_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class svg(BaseElement): + """ + The 'svg' element. + Description: SVG root + Categories: flow phrasing embedded palpable + Parents: phrasing + Children: per [SVG] + Interface: SVGSVGElement + Documentation: None + """ # fmt: skip + + tag = "svg" + categories = ["flow", "phrasing", "embedded", "palpable"] + + class hint(GlobalAttrs): + """ + Type hints for "svg" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'svg' (SVG root) element. + Documentation: None + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "svg", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/table_element.py b/src/html_compose/elements/table_element.py new file mode 100644 index 0000000..8ceb73c --- /dev/null +++ b/src/html_compose/elements/table_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class table(BaseElement): + """ + The 'table' element. + Description: Table + Categories: flow palpable + Parents: flow + Children: caption* colgroup* thead* tbody* tfoot* tr* script-supporting elements + Interface: HTMLTableElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table + """ # fmt: skip + + tag = "table" + categories = ["flow", "palpable"] + + class hint(GlobalAttrs): + """ + Type hints for "table" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'table' (Table) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "table", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/tbody_element.py b/src/html_compose/elements/tbody_element.py new file mode 100644 index 0000000..e3d1132 --- /dev/null +++ b/src/html_compose/elements/tbody_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class tbody(BaseElement): + """ + The 'tbody' element. + Description: Group of rows in a table + Categories: none + Parents: table + Children: tr script-supporting elements + Interface: HTMLTableSectionElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tbody + """ # fmt: skip + + tag = "tbody" + categories = ["none"] + + class hint(GlobalAttrs): + """ + Type hints for "tbody" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'tbody' (Group of rows in a table) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tbody + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "tbody", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/td_element.py b/src/html_compose/elements/td_element.py new file mode 100644 index 0000000..640409e --- /dev/null +++ b/src/html_compose/elements/td_element.py @@ -0,0 +1,285 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, TdAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class td(BaseElement): + """ + The 'td' element. + Description: Table cell + Categories: none + Parents: tr + Children: flow + Interface: HTMLTableCellElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td + """ # fmt: skip + + tag = "td" + categories = ["none"] + + class hint(GlobalAttrs, TdAttrs): + """ + Type hints for "td" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + colspan: Optional[str] = None, + headers: Optional[Union[str, list]] = None, + rowspan: Optional[Union[str, int]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'td' (Table cell) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `colspan` : + Number of columns that the cell is to span + Valid non-negative integer greater than zero + + `headers` : + The header cells for this cell + + `rowspan` : + Number of rows that the cell is to span + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "td", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (colspan is None or colspan is False): + self._process_attr("colspan", colspan) + if not (headers is None or headers is False): + self._process_attr("headers", headers) + if not (rowspan is None or rowspan is False): + self._process_attr("rowspan", rowspan) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/template_element.py b/src/html_compose/elements/template_element.py new file mode 100644 index 0000000..61bec61 --- /dev/null +++ b/src/html_compose/elements/template_element.py @@ -0,0 +1,297 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, TemplateAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class template(BaseElement): + """ + The 'template' element. + Description: Template + Categories: metadata flow phrasing script-supporting + Parents: metadata phrasing script-supporting colgroup* + Children: empty + Interface: HTMLTemplateElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/template + """ # fmt: skip + + tag = "template" + categories = ["metadata", "flow", "phrasing", "script-supporting"] + + class hint(GlobalAttrs, TemplateAttrs): + """ + Type hints for "template" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + shadowrootclonable: Optional[Union[str, bool]] = None, + shadowrootdelegatesfocus: Optional[Union[str, bool]] = None, + shadowrootmode: Optional[Union[str, Literal["open", "closed"]]] = None, + shadowrootserializable: Optional[Union[str, bool]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'template' (Template) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/template + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `shadowrootclonable` : + Sets clonable on a declarative shadow root + + `shadowrootdelegatesfocus` : + Sets delegates focus on a declarative shadow root + + `shadowrootmode` : + Enables streaming declarative shadow roots + + `shadowrootserializable` : + Sets serializable on a declarative shadow root + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "template", void_element=True, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (shadowrootclonable is None or shadowrootclonable is False): + self._process_attr("shadowrootclonable", shadowrootclonable) + if not ( + shadowrootdelegatesfocus is None + or shadowrootdelegatesfocus is False + ): + self._process_attr( + "shadowrootdelegatesfocus", shadowrootdelegatesfocus + ) + if not (shadowrootmode is None or shadowrootmode is False): + self._process_attr("shadowrootmode", shadowrootmode) + if not ( + shadowrootserializable is None or shadowrootserializable is False + ): + self._process_attr("shadowrootserializable", shadowrootserializable) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/textarea_element.py b/src/html_compose/elements/textarea_element.py new file mode 100644 index 0000000..cfe5bad --- /dev/null +++ b/src/html_compose/elements/textarea_element.py @@ -0,0 +1,358 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, TextareaAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class textarea(BaseElement): + """ + The 'textarea' element. + Description: Multiline text controls + Categories: flow phrasing interactive listed labelable submittable resettable form-associated palpable + Parents: phrasing + Children: text + Interface: HTMLTextAreaElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea + """ # fmt: skip + + tag = "textarea" + categories = [ + "flow", + "phrasing", + "interactive", + "listed", + "labelable", + "submittable", + "resettable", + "form-associated", + "palpable", + ] + + class hint(GlobalAttrs, TextareaAttrs): + """ + Type hints for "textarea" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + autocomplete: Optional[str] = None, + cols: Optional[str] = None, + dirname: Optional[str] = None, + disabled: Optional[Union[str, bool]] = None, + form: Optional[str] = None, + maxlength: Optional[Union[str, int]] = None, + minlength: Optional[Union[str, int]] = None, + name: Optional[str] = None, + placeholder: Optional[str] = None, + readonly: Optional[Union[str, bool]] = None, + required: Optional[Union[str, bool]] = None, + rows: Optional[str] = None, + wrap: Optional[Union[str, Literal["soft", "hard"]]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'textarea' (Multiline text controls) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `autocomplete` : + Hint for form autofill feature + Autofill field name and related tokens* + + `cols` : + Maximum number of characters per line + Valid non-negative integer greater than zero + + `dirname` : + Name of form control to use for sending the element's directionality in form submission + + `disabled` : + Whether the form control is disabled + + `form` : + Associates the element with a form element + ID* + + `maxlength` : + Maximum length of value + + `minlength` : + Minimum length of value + + `name` : + Name of the element to use for form submission and in the form.elements API + + `placeholder` : + User-visible label to be placed within the form control + + `readonly` : + Whether to allow the value to be edited by the user + + `required` : + Whether the control is required for form submission + + `rows` : + Number of lines to show + Valid non-negative integer greater than zero + + `wrap` : + How the value of the form control is to be wrapped for form submission + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "textarea", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (autocomplete is None or autocomplete is False): + self._process_attr("autocomplete", autocomplete) + if not (cols is None or cols is False): + self._process_attr("cols", cols) + if not (dirname is None or dirname is False): + self._process_attr("dirname", dirname) + if not (disabled is None or disabled is False): + self._process_attr("disabled", disabled) + if not (form is None or form is False): + self._process_attr("form", form) + if not (maxlength is None or maxlength is False): + self._process_attr("maxlength", maxlength) + if not (minlength is None or minlength is False): + self._process_attr("minlength", minlength) + if not (name is None or name is False): + self._process_attr("name", name) + if not (placeholder is None or placeholder is False): + self._process_attr("placeholder", placeholder) + if not (readonly is None or readonly is False): + self._process_attr("readonly", readonly) + if not (required is None or required is False): + self._process_attr("required", required) + if not (rows is None or rows is False): + self._process_attr("rows", rows) + if not (wrap is None or wrap is False): + self._process_attr("wrap", wrap) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/tfoot_element.py b/src/html_compose/elements/tfoot_element.py new file mode 100644 index 0000000..8274087 --- /dev/null +++ b/src/html_compose/elements/tfoot_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class tfoot(BaseElement): + """ + The 'tfoot' element. + Description: Group of footer rows in a table + Categories: none + Parents: table + Children: tr script-supporting elements + Interface: HTMLTableSectionElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tfoot + """ # fmt: skip + + tag = "tfoot" + categories = ["none"] + + class hint(GlobalAttrs): + """ + Type hints for "tfoot" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'tfoot' (Group of footer rows in a table) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tfoot + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "tfoot", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/th_element.py b/src/html_compose/elements/th_element.py new file mode 100644 index 0000000..9ab78d1 --- /dev/null +++ b/src/html_compose/elements/th_element.py @@ -0,0 +1,299 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, ThAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class th(BaseElement): + """ + The 'th' element. + Description: Table header cell + Categories: interactive* + Parents: tr + Children: flow* + Interface: HTMLTableCellElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th + """ # fmt: skip + + tag = "th" + categories = ["interactive*"] + + class hint(GlobalAttrs, ThAttrs): + """ + Type hints for "th" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + abbr: Optional[str] = None, + colspan: Optional[str] = None, + headers: Optional[Union[str, list]] = None, + rowspan: Optional[Union[str, int]] = None, + scope: Optional[ + Union[str, Literal["row", "col", "rowgroup", "colgroup"]] + ] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'th' (Table header cell) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `abbr` : + Alternative label to use for the header cell when referencing the cell in other contexts + + `colspan` : + Number of columns that the cell is to span + Valid non-negative integer greater than zero + + `headers` : + The header cells for this cell + + `rowspan` : + Number of rows that the cell is to span + + `scope` : + Specifies which cells the header cell applies to + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "th", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (abbr is None or abbr is False): + self._process_attr("abbr", abbr) + if not (colspan is None or colspan is False): + self._process_attr("colspan", colspan) + if not (headers is None or headers is False): + self._process_attr("headers", headers) + if not (rowspan is None or rowspan is False): + self._process_attr("rowspan", rowspan) + if not (scope is None or scope is False): + self._process_attr("scope", scope) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/thead_element.py b/src/html_compose/elements/thead_element.py new file mode 100644 index 0000000..6e19cbf --- /dev/null +++ b/src/html_compose/elements/thead_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class thead(BaseElement): + """ + The 'thead' element. + Description: Group of heading rows in a table + Categories: none + Parents: table + Children: tr script-supporting elements + Interface: HTMLTableSectionElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/thead + """ # fmt: skip + + tag = "thead" + categories = ["none"] + + class hint(GlobalAttrs): + """ + Type hints for "thead" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'thead' (Group of heading rows in a table) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/thead + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "thead", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/time_element.py b/src/html_compose/elements/time_element.py new file mode 100644 index 0000000..fa62f49 --- /dev/null +++ b/src/html_compose/elements/time_element.py @@ -0,0 +1,273 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, TimeAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class time(BaseElement): + """ + The 'time' element. + Description: Machine-readable equivalent of date- or time-related data + Categories: flow phrasing palpable + Parents: phrasing + Children: phrasing + Interface: HTMLTimeElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/time + """ # fmt: skip + + tag = "time" + categories = ["flow", "phrasing", "palpable"] + + class hint(GlobalAttrs, TimeAttrs): + """ + Type hints for "time" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + datetime: Optional[str] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'time' (Machine-readable equivalent of date- or time-related data) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/time + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `datetime` : + Machine-readable value + Valid month string, valid date string, valid yearless date string, valid time string, valid local date and time string, valid time-zone offset string, valid global date and time string, valid week string, valid non-negative integer, or valid duration string + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "time", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (datetime is None or datetime is False): + self._process_attr("datetime", datetime) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/title_element.py b/src/html_compose/elements/title_element.py new file mode 100644 index 0000000..4d22051 --- /dev/null +++ b/src/html_compose/elements/title_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class title(BaseElement): + """ + The 'title' element. + Description: Document title + Categories: metadata + Parents: head + Children: text* + Interface: HTMLTitleElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/title + """ # fmt: skip + + tag = "title" + categories = ["metadata"] + + class hint(GlobalAttrs): + """ + Type hints for "title" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'title' (Document title) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/title + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "title", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/tr_element.py b/src/html_compose/elements/tr_element.py new file mode 100644 index 0000000..b1efe0a --- /dev/null +++ b/src/html_compose/elements/tr_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class tr(BaseElement): + """ + The 'tr' element. + Description: Table row + Categories: none + Parents: table thead tbody tfoot + Children: th* td script-supporting elements + Interface: HTMLTableRowElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tr + """ # fmt: skip + + tag = "tr" + categories = ["none"] + + class hint(GlobalAttrs): + """ + Type hints for "tr" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'tr' (Table row) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tr + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "tr", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/track_element.py b/src/html_compose/elements/track_element.py new file mode 100644 index 0000000..53b5306 --- /dev/null +++ b/src/html_compose/elements/track_element.py @@ -0,0 +1,309 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, TrackAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class track(BaseElement): + """ + The 'track' element. + Description: Timed text track + Categories: none + Parents: audio video + Children: empty + Interface: HTMLTrackElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/track + """ # fmt: skip + + tag = "track" + categories = ["none"] + + class hint(GlobalAttrs, TrackAttrs): + """ + Type hints for "track" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + default: Optional[Union[str, bool]] = None, + kind: Optional[ + Union[ + str, + Literal[ + "subtitles", + "captions", + "descriptions", + "chapters", + "metadata", + ], + ] + ] = None, + label: Optional[str] = None, + src: Optional[str] = None, + srclang: Optional[str] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'track' (Timed text track) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/track + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `default` : + Enable the track if no other text track is more suitable + + `kind` : + The type of text track + + `label` : + User-visible label + + `src` : + Address of the resource + Valid non-empty URL potentially surrounded by spaces + + `srclang` : + Language of the text track + Valid BCP 47 language tag + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "track", void_element=True, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (default is None or default is False): + self._process_attr("default", default) + if not (kind is None or kind is False): + self._process_attr("kind", kind) + if not (label is None or label is False): + self._process_attr("label", label) + if not (src is None or src is False): + self._process_attr("src", src) + if not (srclang is None or srclang is False): + self._process_attr("srclang", srclang) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/u_element.py b/src/html_compose/elements/u_element.py new file mode 100644 index 0000000..61fbc9b --- /dev/null +++ b/src/html_compose/elements/u_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class u(BaseElement): + """ + The 'u' element. + Description: Unarticulated annotation + Categories: flow phrasing palpable + Parents: phrasing + Children: phrasing + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/u + """ # fmt: skip + + tag = "u" + categories = ["flow", "phrasing", "palpable"] + + class hint(GlobalAttrs): + """ + Type hints for "u" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'u' (Unarticulated annotation) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/u + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "u", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/ul_element.py b/src/html_compose/elements/ul_element.py new file mode 100644 index 0000000..0bf0f4d --- /dev/null +++ b/src/html_compose/elements/ul_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class ul(BaseElement): + """ + The 'ul' element. + Description: List + Categories: flow palpable* + Parents: flow + Children: li script-supporting elements + Interface: HTMLUListElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ul + """ # fmt: skip + + tag = "ul" + categories = ["flow", "palpable*"] + + class hint(GlobalAttrs): + """ + Type hints for "ul" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'ul' (List) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ul + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "ul", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/var_element.py b/src/html_compose/elements/var_element.py new file mode 100644 index 0000000..4b44df7 --- /dev/null +++ b/src/html_compose/elements/var_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class var(BaseElement): + """ + The 'var' element. + Description: Variable + Categories: flow phrasing palpable + Parents: phrasing + Children: phrasing + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/var + """ # fmt: skip + + tag = "var" + categories = ["flow", "phrasing", "palpable"] + + class hint(GlobalAttrs): + """ + Type hints for "var" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'var' (Variable) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/var + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "var", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/video_element.py b/src/html_compose/elements/video_element.py new file mode 100644 index 0000000..bda715c --- /dev/null +++ b/src/html_compose/elements/video_element.py @@ -0,0 +1,338 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class video(BaseElement): + """ + The 'video' element. + Description: Video player + Categories: flow phrasing embedded interactive palpable + Parents: phrasing + Children: source* track* transparent* + Interface: HTMLVideoElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video + """ # fmt: skip + + tag = "video" + categories = ["flow", "phrasing", "embedded", "interactive", "palpable"] + + class hint(GlobalAttrs, VideoAttrs): + """ + Type hints for "video" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + autoplay: Optional[Union[str, bool]] = None, + controls: Optional[Union[str, bool]] = None, + crossorigin: Optional[ + Union[str, Literal["anonymous", "use-credentials"]] + ] = None, + height: Optional[Union[str, int]] = None, + loop: Optional[Union[str, bool]] = None, + muted: Optional[Union[str, bool]] = None, + playsinline: Optional[Union[str, bool]] = None, + poster: Optional[str] = None, + preload: Optional[ + Union[str, Literal["none", "metadata", "auto"]] + ] = None, + src: Optional[str] = None, + width: Optional[Union[str, int]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'video' (Video player) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `autoplay` : + Hint that the media resource can be started automatically when the page is loaded + + `controls` : + Show user agent controls + + `crossorigin` : + How the element handles crossorigin requests + + `height` : + Vertical dimension + + `loop` : + Whether to loop the media resource + + `muted` : + Whether to mute the media resource by default + + `playsinline` : + Encourage the user agent to display video content within the element's playback area + + `poster` : + Poster frame to show prior to video playback + Valid non-empty URL potentially surrounded by spaces + + `preload` : + Hints how much buffering the media resource will likely need + + `src` : + Address of the resource + Valid non-empty URL potentially surrounded by spaces + + `width` : + Horizontal dimension + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "video", void_element=False, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (autoplay is None or autoplay is False): + self._process_attr("autoplay", autoplay) + if not (controls is None or controls is False): + self._process_attr("controls", controls) + if not (crossorigin is None or crossorigin is False): + self._process_attr("crossorigin", crossorigin) + if not (height is None or height is False): + self._process_attr("height", height) + if not (loop is None or loop is False): + self._process_attr("loop", loop) + if not (muted is None or muted is False): + self._process_attr("muted", muted) + if not (playsinline is None or playsinline is False): + self._process_attr("playsinline", playsinline) + if not (poster is None or poster is False): + self._process_attr("poster", poster) + if not (preload is None or preload is False): + self._process_attr("preload", preload) + if not (src is None or src is False): + self._process_attr("src", src) + if not (width is None or width is False): + self._process_attr("width", width) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/elements/wbr_element.py b/src/html_compose/elements/wbr_element.py new file mode 100644 index 0000000..2e155a0 --- /dev/null +++ b/src/html_compose/elements/wbr_element.py @@ -0,0 +1,266 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + +class wbr(BaseElement): + """ + The 'wbr' element. + Description: Line breaking opportunity + Categories: flow phrasing + Parents: phrasing + Children: empty + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/wbr + """ # fmt: skip + + tag = "wbr" + categories = ["flow", "phrasing"] + + class hint(GlobalAttrs): + """ + Type hints for "wbr" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + + pass + + _ = hint + + def __init__( + self, + attrs: Optional[ + Union[dict[str, Union[str, dict, list]], list[BaseAttribute]] + ] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[ + Union[ + str, + Literal[ + "on", "off", "none", "sentences", "words", "characters" + ], + ] + ] = None, + autocorrect: Optional[Union[str, Literal["on", "off"]]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[ + Union[str, Literal["true", "plaintext-only", "false"]] + ] = None, + dir: Optional[Union[str, Literal["ltr", "rtl", "auto"]]] = None, + draggable: Optional[Union[str, Literal["true", "false"]]] = None, + enterkeyhint: Optional[ + Union[ + str, + Literal[ + "enter", "done", "go", "next", "previous", "search", "send" + ], + ] + ] = None, + hidden: Optional[ + Union[str, Literal["until-found", "hidden", ""]] + ] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[ + Union[ + str, + Literal[ + "none", + "text", + "tel", + "email", + "url", + "numeric", + "decimal", + "search", + ], + ] + ] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal["auto", "manual"]]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal["true", "false", ""]]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal["yes", "no"]]] = None, + writingsuggestions: Optional[ + Union[str, Literal["true", "false", ""]] + ] = None, + children: Optional[list] = None, + ) -> None: + """ + Initialize 'wbr' (Line breaking opportunity) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/wbr + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ # fmt: skip + super().__init__( + "wbr", void_element=True, attrs=attrs, children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) diff --git a/src/html_compose/live/__init__.py b/src/html_compose/live/__init__.py index 2aee138..1986e2b 100644 --- a/src/html_compose/live/__init__.py +++ b/src/html_compose/live/__init__.py @@ -1,3 +1,45 @@ +""" +Live server and file watcher for HTML Compose. + +Automatically reloads your Python server and the browser on changes. + +The typical recommendation is to write a script file to use this module. + +Example: +```python +# live-reload.py +import html_compose.live as live + +live.server( + daemon=live.ShellCommand( + "rye run flask --app ./backend/web/server.py run" + ), + daemon_delay=0.2, + conds=[ + live.WatchCond( + path_glob="backend/**/*.py", action=live.ShellCommand("date") + ), + live.WatchCond(path_glob="content/blog/*.md", action=None), + live.WatchCond( + ["frontend/**/*.js", "frontend/**/*.css"], + action=live.ShellCommand("cd frontend && pnpm build"), + ignore_glob=["frontend/node_modules/"], + reload=False, + ), + live.WatchCond( + "public/**/*", + action=None, + server_reload=False, + ), + ], + host="localhost", + port=51353, + livereload_delay=0.7, +) +``` + +""" + from .live_server import live_server from .watcher import ShellCommand, WatchCond, Watcher diff --git a/src/html_compose/translate_html.py b/src/html_compose/translate_html.py index 78b0cbc..241606e 100644 --- a/src/html_compose/translate_html.py +++ b/src/html_compose/translate_html.py @@ -6,6 +6,7 @@ from bs4 import BeautifulSoup, NavigableString, Tag from bs4.element import Doctype +from . import BaseElement from . import elements as el_list from .custom_element import CustomElement from .util_funcs import safe_name @@ -21,8 +22,8 @@ def get_phrasing_tags(): result = [] for e in dir(el_list): val = getattr(el_list, e) - if isinstance(val, type) and issubclass(val, el_list.BaseElement): - if val is el_list.BaseElement: + if isinstance(val, type) and issubclass(val, BaseElement): + if val is BaseElement: continue categories = getattr(val, "categories") diff --git a/src/html_compose/util_funcs.py b/src/html_compose/util_funcs.py index 2b4dbe0..be2d8ef 100644 --- a/src/html_compose/util_funcs.py +++ b/src/html_compose/util_funcs.py @@ -1,3 +1,9 @@ +""" +Library utility functions + +Not inteded to be used directly by library users. +""" + import inspect import json from functools import lru_cache diff --git a/tests/test_element.py b/tests/test_element.py index 6ef5f3c..7f8e029 100644 --- a/tests/test_element.py +++ b/tests/test_element.py @@ -167,6 +167,7 @@ def test_document(): head=None, body=[h.button["Button"], h.br(), h.p["demo 2"]], ) + expected = "\n".join( [ "", @@ -187,7 +188,7 @@ def test_float_precision(): c = h.h1[num].render() assert c == "

0.333

" # Now set globally - h.elements.BaseElement.FLOAT_PRECISION = 0 + h.BaseElement.FLOAT_PRECISION = 0 d = h.h1[num].render() assert d == "

0

" @@ -197,6 +198,13 @@ def test_list_attribute(): assert el.render() == '
' +def test_hint_attribute(): + r = h.button([h.button.hint.onclick("alert('Hello!')")])[ + "Click me!" + ].render() + assert r == '' + + def test_rel_array(): # ensure the list type arg doesnt violate type checks and builds # correctly diff --git a/tools/generate_elements.py b/tools/generate_elements.py index 421211f..f14a895 100644 --- a/tools/generate_elements.py +++ b/tools/generate_elements.py @@ -17,6 +17,114 @@ ) +def elements_docstring(): + """ + Generate a docstring for the elements module. + """ + return """ +This module contains HTML elements. + +Each element is a class that inherits from BaseElement. + +The classes are generated from the WhatWG HTML specification. +We do not generate deprecated elements. + +Each class has a hint class that provides type hints for the attributes. + +## Construction +#### `[]` syntax +1. There is special syntax for constructed elements which will append + any given parameters to the elements children. Internally this is simply + `BaseElement.append(...)` +2. There is a special syntax for _unconstructed_ elements which will create + an element with no parameters and append the children. + +Example: +```python +from html_compose import p, strong +# Internally, this is what we're doing +# p().append("Hello ", strong().append("world!")) + +# Syntax 1. +link = a()["Hello ", strong()["world!"]] + +# Syntax 2. +link = a["Hello ", strong["world!"]] +``` + +#### Basic usage +Most hints are available right in the constructor signature. + +This was done because it makes the constructor hint too heavy. + +```python +from html_compose import a + +link = a(href="https://example.com", target="_blank")["Click here"] +link.render() # 'Click here' +``` +#### Attributes that aren't in the constructor signature +**Note that events like .onclick are _not_ available in the constructor.** + +We do however provide the type hint via `.hint` + +The first positional argument is `attrs=` which can be a list of attributes. +We generate many of these for type hints under `.hint or `._` + +```python +# attrs can also be a list of BaseAttribute objects +link = a([a.hint.onclick("alert(1)")], + href="https://example.com", target="_blank")["Click here"] +``` + +#### With attributes that aren't built-in +The first positional argument is `attrs=` which can also be a dictionary. + +```python +from html_compose import a +# You can simply define any attribute in the attrs dict +link = a({"href": "https://example.com", + "target": "_blank"})["Click here"] +link.render() # 'Click here' + +# attrs can also be a list of BaseAttribute objects +link = a([a.hint.onclick("alert(1)")], + href="https://example.com", target="_blank")["Click here"] +``` +#### Framework Attributes +Some attributes are not part of the HTML specification, but are +commonly used in web frameworks. You can make your own hint class to wrap these + +```python +from html_compose.base_attribute import BaseAttribute +from html_compose import button +class htmx: + ''' + Attributes for the HTMX framework. + ''' + + @staticmethod + def hx_get(value: str) -> BaseAttribute: + ''' + htmx attribute: hx-get + The hx-get attribute will cause an element to issue a + GET to the specified URL and swap the HTML into the DOM + using a swap strategy + + :param value: URI to GET when the element is activated + :return: An hx-get attribute to be added to your element + ''' + + return BaseAttribute("hx-get", value) + +btn = button([htmx.hx_get("/api/data")])["Click me!"] +btn.render() # '' +``` + +Publish your own to make someone elses development experience better! +""" + + def generate_attrs(attr_class, attr_list) -> list[processed_attr]: # -> list: processed: list[processed_attr] = [] attrdefs = {} @@ -28,7 +136,6 @@ def generate_attrs(attr_class, attr_list) -> list[processed_attr]: # -> list: docstring.append(f" {attrdef.description}") if not value_hint_to_python_type(attrdef.value_desc): docstring[-1] += " " # markdown newline - docstring.append("") docstring.append(f" {attrdef.value_desc}") def_dict = {"attr": attrdef, "docstring": docstring} @@ -129,6 +236,7 @@ def gen_elements(): attr_docstrings = [ "`attrs`: ", " A list or dictionary of attributes for the element", + "", ] attr_list = [] @@ -139,7 +247,7 @@ def gen_elements(): def add_param(p): if p.name in attr_names: return - attr_docstrings.extend(p.docstrings) + attr_docstrings.extend(p.docstrings + [""]) attr_list.append(p.param) assign_list.append(p.assignment) attr_names.add(p.name) @@ -228,17 +336,17 @@ def add_param(p): " )", attr_assignment, ] - result.append("\n".join(template)) + result.append((fixed_name, "\n".join(template))) header = f"""from typing import Union, Literal, Optional -from .attributes import GlobalAttrs, {", ".join(attr_imports)} -from .base_attribute import BaseAttribute -from .base_element import BaseElement +from ..attributes import GlobalAttrs, {", ".join(attr_imports)} +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement # This file is generated by tools/generate_elements.py """ - return header + "\n\n".join(result) + return header, result # header + "\n\n".join(result) if __name__ == "__main__": @@ -250,18 +358,42 @@ def add_param(p): ) args = parser.parse_args() - elements = gen_elements() - default_output_path = get_path("generated/elements.py") - default_output_path.write_text(elements) + header, element_list = gen_elements() + el_names = [name for name, _ in element_list] + for name, element in element_list: + default_output_path = get_path(f"generated/elements/{name}_element.py") + default_output_path.write_text(f"{header}\n\n{element}") - print(f"Generated elements written to: {default_output_path}") + el_dir = get_path("generated/elements") + print(f"Generated elements written to: {el_dir}") if args.copy: - path_name = "./src/html_compose/elements.py" + path_name = "./src/html_compose/elements/" real_path = Path(path_name) if not real_path.exists(): real_path = Path("..") / path_name if not real_path.exists(): raise FileNotFoundError(f"Unable to find {path_name}") + for element in el_dir.glob("*.py"): + data = element.read_text() - real_path.write_text(elements) + path = Path(path_name) / element.name + path.write_text(data) print(f"Copied generated elements to: {real_path}") + init_data = [f'"""{elements_docstring()}\n"""'] + for name in el_names: + init_data.append(f"from .{name}_element import {name}") + + imports = ", ".join(map(lambda x: f"'{x}'", el_names)) + init_data.append( + "\n".join( + [ + "", + "import os", + "# hack: force PDOC to treat elements as submodules", + 'if not os.environ.get("PDOC_GENERATING", False):', + f" __all__ = [{imports}]", + ] + ) + ) + + (Path(path_name) / "__init__.py").write_text("\n".join(init_data)) diff --git a/tools/generated/elements.py b/tools/generated/elements.py deleted file mode 100644 index fd93419..0000000 --- a/tools/generated/elements.py +++ /dev/null @@ -1,23444 +0,0 @@ -from typing import Union, Literal, Optional - -from .attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs -from .base_attribute import BaseAttribute -from .base_element import BaseElement - -# This file is generated by tools/generate_elements.py - -class a(BaseElement): - """ - The 'a' element. - Description: Hyperlink - Categories: flow phrasing* interactive palpable - Parents: phrasing - Children: transparent* - Interface: HTMLAnchorElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a - """ # fmt: skip - tag = 'a' - categories = ['flow', 'phrasing*', 'interactive', 'palpable'] - class hint(GlobalAttrs, AnchorAttrs): - """ - Type hints for "a" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - download: Optional[str] = None, - href: Optional[str] = None, - hreflang: Optional[str] = None, - ping: Optional[Union[str, list]] = None, - referrerpolicy: Optional[str] = None, - rel: Optional[Union[str, list]] = None, - target: Optional[str] = None, - type: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'a' (Hyperlink) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `download` : - Whether to download the resource instead of navigating to it, and its filename if so - `href` : - Address of the hyperlink - - Valid URL potentially surrounded by spaces - `hreflang` : - Language of the linked resource - - Valid BCP 47 language tag - `ping` : - URLs to ping - `referrerpolicy` : - Referrer policy for fetches initiated by the element - - Referrer policy - `rel` : - Relationship between the location in the document containing the hyperlink and the destination resource - `target` : - Navigable for hyperlink navigation - - Valid navigable target name or keyword - `type` : - Hint for the type of the referenced resource - - Valid MIME type string - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "a", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (download is None or download is False): - self._process_attr("download", download) - if not (href is None or href is False): - self._process_attr("href", href) - if not (hreflang is None or hreflang is False): - self._process_attr("hreflang", hreflang) - if not (ping is None or ping is False): - self._process_attr("ping", ping) - if not (referrerpolicy is None or referrerpolicy is False): - self._process_attr("referrerpolicy", referrerpolicy) - if not (rel is None or rel is False): - self._process_attr("rel", rel) - if not (target is None or target is False): - self._process_attr("target", target) - if not (type is None or type is False): - self._process_attr("type", type) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class abbr(BaseElement): - """ - The 'abbr' element. - Description: Abbreviation - Categories: flow phrasing palpable - Parents: phrasing - Children: phrasing - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/abbr - """ # fmt: skip - tag = 'abbr' - categories = ['flow', 'phrasing', 'palpable'] - class hint(GlobalAttrs): - """ - Type hints for "abbr" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'abbr' (Abbreviation) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/abbr - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "abbr", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class address(BaseElement): - """ - The 'address' element. - Description: Contact information for a page or article element - Categories: flow palpable - Parents: flow - Children: flow* - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/address - """ # fmt: skip - tag = 'address' - categories = ['flow', 'palpable'] - class hint(GlobalAttrs): - """ - Type hints for "address" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'address' (Contact information for a page or article element) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/address - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "address", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class area(BaseElement): - """ - The 'area' element. - Description: Hyperlink or dead area on an image map - Categories: flow phrasing - Parents: phrasing* - Children: empty - Interface: HTMLAreaElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/area - """ # fmt: skip - tag = 'area' - categories = ['flow', 'phrasing'] - class hint(GlobalAttrs, AreaAttrs): - """ - Type hints for "area" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - alt: Optional[str] = None, - coords: Optional[str] = None, - download: Optional[str] = None, - href: Optional[str] = None, - ping: Optional[Union[str, list]] = None, - referrerpolicy: Optional[str] = None, - rel: Optional[Union[str, list]] = None, - shape: Optional[Union[str, Literal['circle', 'default', 'poly', 'rect']]] = None, - target: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'area' (Hyperlink or dead area on an image map) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/area - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `alt` : - Replacement text for use when images are not available - `coords` : - Coordinates for the shape to be created in an image map - - Valid list of floating-point numbers* - `download` : - Whether to download the resource instead of navigating to it, and its filename if so - `href` : - Address of the hyperlink - - Valid URL potentially surrounded by spaces - `ping` : - URLs to ping - `referrerpolicy` : - Referrer policy for fetches initiated by the element - - Referrer policy - `rel` : - Relationship between the location in the document containing the hyperlink and the destination resource - `shape` : - The kind of shape to be created in an image map - `target` : - Navigable for hyperlink navigation - - Valid navigable target name or keyword - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "area", - void_element=True, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (alt is None or alt is False): - self._process_attr("alt", alt) - if not (coords is None or coords is False): - self._process_attr("coords", coords) - if not (download is None or download is False): - self._process_attr("download", download) - if not (href is None or href is False): - self._process_attr("href", href) - if not (ping is None or ping is False): - self._process_attr("ping", ping) - if not (referrerpolicy is None or referrerpolicy is False): - self._process_attr("referrerpolicy", referrerpolicy) - if not (rel is None or rel is False): - self._process_attr("rel", rel) - if not (shape is None or shape is False): - self._process_attr("shape", shape) - if not (target is None or target is False): - self._process_attr("target", target) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class article(BaseElement): - """ - The 'article' element. - Description: Self-contained syndicatable or reusable composition - Categories: flow sectioning palpable - Parents: flow - Children: flow - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/article - """ # fmt: skip - tag = 'article' - categories = ['flow', 'sectioning', 'palpable'] - class hint(GlobalAttrs): - """ - Type hints for "article" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'article' (Self-contained syndicatable or reusable composition) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/article - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "article", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class aside(BaseElement): - """ - The 'aside' element. - Description: Sidebar for tangentially related content - Categories: flow sectioning palpable - Parents: flow - Children: flow - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/aside - """ # fmt: skip - tag = 'aside' - categories = ['flow', 'sectioning', 'palpable'] - class hint(GlobalAttrs): - """ - Type hints for "aside" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'aside' (Sidebar for tangentially related content) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/aside - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "aside", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class audio(BaseElement): - """ - The 'audio' element. - Description: Audio player - Categories: flow phrasing embedded interactive palpable* - Parents: phrasing - Children: source* track* transparent* - Interface: HTMLAudioElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio - """ # fmt: skip - tag = 'audio' - categories = ['flow', 'phrasing', 'embedded', 'interactive', 'palpable*'] - class hint(GlobalAttrs, AudioAttrs): - """ - Type hints for "audio" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - autoplay: Optional[Union[str, bool]] = None, - controls: Optional[Union[str, bool]] = None, - crossorigin: Optional[Union[str, Literal['anonymous', 'use-credentials']]] = None, - loop: Optional[Union[str, bool]] = None, - muted: Optional[Union[str, bool]] = None, - preload: Optional[Union[str, Literal['none', 'metadata', 'auto']]] = None, - src: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'audio' (Audio player) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `autoplay` : - Hint that the media resource can be started automatically when the page is loaded - `controls` : - Show user agent controls - `crossorigin` : - How the element handles crossorigin requests - `loop` : - Whether to loop the media resource - `muted` : - Whether to mute the media resource by default - `preload` : - Hints how much buffering the media resource will likely need - `src` : - Address of the resource - - Valid non-empty URL potentially surrounded by spaces - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "audio", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (autoplay is None or autoplay is False): - self._process_attr("autoplay", autoplay) - if not (controls is None or controls is False): - self._process_attr("controls", controls) - if not (crossorigin is None or crossorigin is False): - self._process_attr("crossorigin", crossorigin) - if not (loop is None or loop is False): - self._process_attr("loop", loop) - if not (muted is None or muted is False): - self._process_attr("muted", muted) - if not (preload is None or preload is False): - self._process_attr("preload", preload) - if not (src is None or src is False): - self._process_attr("src", src) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class b(BaseElement): - """ - The 'b' element. - Description: Keywords - Categories: flow phrasing palpable - Parents: phrasing - Children: phrasing - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/b - """ # fmt: skip - tag = 'b' - categories = ['flow', 'phrasing', 'palpable'] - class hint(GlobalAttrs): - """ - Type hints for "b" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'b' (Keywords) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/b - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "b", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class base(BaseElement): - """ - The 'base' element. - Description: Base URL and default target navigable for hyperlinks and forms - Categories: metadata - Parents: head - Children: empty - Interface: HTMLBaseElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base - """ # fmt: skip - tag = 'base' - categories = ['metadata'] - class hint(GlobalAttrs, BaseAttrs): - """ - Type hints for "base" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - href: Optional[str] = None, - target: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'base' (Base URL and default target navigable for hyperlinks and forms) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `href` : - Document base URL - - Valid URL potentially surrounded by spaces - `target` : - Default navigable for hyperlink navigation and form submission - - Valid navigable target name or keyword - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "base", - void_element=True, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (href is None or href is False): - self._process_attr("href", href) - if not (target is None or target is False): - self._process_attr("target", target) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class bdi(BaseElement): - """ - The 'bdi' element. - Description: Text directionality isolation - Categories: flow phrasing palpable - Parents: phrasing - Children: phrasing - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/bdi - """ # fmt: skip - tag = 'bdi' - categories = ['flow', 'phrasing', 'palpable'] - class hint(GlobalAttrs): - """ - Type hints for "bdi" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'bdi' (Text directionality isolation) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/bdi - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "bdi", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class bdo(BaseElement): - """ - The 'bdo' element. - Description: Text directionality formatting - Categories: flow phrasing palpable - Parents: phrasing - Children: phrasing - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/bdo - """ # fmt: skip - tag = 'bdo' - categories = ['flow', 'phrasing', 'palpable'] - class hint(GlobalAttrs): - """ - Type hints for "bdo" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'bdo' (Text directionality formatting) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/bdo - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "bdo", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class blockquote(BaseElement): - """ - The 'blockquote' element. - Description: A section quoted from another source - Categories: flow palpable - Parents: flow - Children: flow - Interface: HTMLQuoteElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/blockquote - """ # fmt: skip - tag = 'blockquote' - categories = ['flow', 'palpable'] - class hint(GlobalAttrs, BlockquoteAttrs): - """ - Type hints for "blockquote" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - cite: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'blockquote' (A section quoted from another source) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/blockquote - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `cite` : - Link to the source of the quotation or more information about the edit - - Valid URL potentially surrounded by spaces - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "blockquote", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (cite is None or cite is False): - self._process_attr("cite", cite) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class body(BaseElement): - """ - The 'body' element. - Description: Document body - Categories: none - Parents: html - Children: flow - Interface: HTMLBodyElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/body - """ # fmt: skip - tag = 'body' - categories = ['none'] - class hint(GlobalAttrs, BodyAttrs): - """ - Type hints for "body" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'body' (Document body) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/body - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "body", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class br(BaseElement): - """ - The 'br' element. - Description: Line break, e.g. in poem or postal address - Categories: flow phrasing - Parents: phrasing - Children: empty - Interface: HTMLBRElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/br - """ # fmt: skip - tag = 'br' - categories = ['flow', 'phrasing'] - class hint(GlobalAttrs): - """ - Type hints for "br" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'br' (Line break, e.g. in poem or postal address) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/br - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "br", - void_element=True, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class button(BaseElement): - """ - The 'button' element. - Description: Button control - Categories: flow phrasing interactive listed labelable submittable form-associated palpable - Parents: phrasing - Children: phrasing* - Interface: HTMLButtonElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button - """ # fmt: skip - tag = 'button' - categories = ['flow', 'phrasing', 'interactive', 'listed', 'labelable', 'submittable', 'form-associated', 'palpable'] - class hint(GlobalAttrs, ButtonAttrs): - """ - Type hints for "button" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - disabled: Optional[Union[str, bool]] = None, - form: Optional[str] = None, - formaction: Optional[str] = None, - formenctype: Optional[Union[str, Literal['application/x-www-form-urlencoded', 'multipart/form-data', 'text/plain']]] = None, - formmethod: Optional[Union[str, Literal['GET', 'POST', 'dialog']]] = None, - formnovalidate: Optional[Union[str, bool]] = None, - formtarget: Optional[str] = None, - name: Optional[str] = None, - popovertarget: Optional[str] = None, - popovertargetaction: Optional[Union[str, Literal['toggle', 'show', 'hide']]] = None, - type: Optional[Union[str, Literal['submit', 'reset', 'button']]] = None, - value: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'button' (Button control) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `disabled` : - Whether the form control is disabled - `form` : - Associates the element with a form element - - ID* - `formaction` : - URL to use for form submission - - Valid non-empty URL potentially surrounded by spaces - `formenctype` : - Entry list encoding type to use for form submission - `formmethod` : - Variant to use for form submission - `formnovalidate` : - Bypass form control validation for form submission - `formtarget` : - Navigable for form submission - - Valid navigable target name or keyword - `name` : - Name of the element to use for form submission and in the form.elements API - `popovertarget` : - Targets a popover element to toggle, show, or hide - - ID* - `popovertargetaction` : - Indicates whether a targeted popover element is to be toggled, shown, or hidden - `type` : - Type of button - `value` : - Value to be used for form submission - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "button", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (disabled is None or disabled is False): - self._process_attr("disabled", disabled) - if not (form is None or form is False): - self._process_attr("form", form) - if not (formaction is None or formaction is False): - self._process_attr("formaction", formaction) - if not (formenctype is None or formenctype is False): - self._process_attr("formenctype", formenctype) - if not (formmethod is None or formmethod is False): - self._process_attr("formmethod", formmethod) - if not (formnovalidate is None or formnovalidate is False): - self._process_attr("formnovalidate", formnovalidate) - if not (formtarget is None or formtarget is False): - self._process_attr("formtarget", formtarget) - if not (name is None or name is False): - self._process_attr("name", name) - if not (popovertarget is None or popovertarget is False): - self._process_attr("popovertarget", popovertarget) - if not (popovertargetaction is None or popovertargetaction is False): - self._process_attr("popovertargetaction", popovertargetaction) - if not (type is None or type is False): - self._process_attr("type", type) - if not (value is None or value is False): - self._process_attr("value", value) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class canvas(BaseElement): - """ - The 'canvas' element. - Description: Scriptable bitmap canvas - Categories: flow phrasing embedded palpable - Parents: phrasing - Children: transparent - Interface: HTMLCanvasElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas - """ # fmt: skip - tag = 'canvas' - categories = ['flow', 'phrasing', 'embedded', 'palpable'] - class hint(GlobalAttrs, CanvasAttrs): - """ - Type hints for "canvas" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - height: Optional[Union[str, int]] = None, - width: Optional[Union[str, int]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'canvas' (Scriptable bitmap canvas) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `height` : - Vertical dimension - `width` : - Horizontal dimension - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "canvas", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (height is None or height is False): - self._process_attr("height", height) - if not (width is None or width is False): - self._process_attr("width", width) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class caption(BaseElement): - """ - The 'caption' element. - Description: Table caption - Categories: none - Parents: table - Children: flow* - Interface: HTMLTableCaptionElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/caption - """ # fmt: skip - tag = 'caption' - categories = ['none'] - class hint(GlobalAttrs): - """ - Type hints for "caption" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'caption' (Table caption) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/caption - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "caption", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class cite(BaseElement): - """ - The 'cite' element. - Description: Title of a work - Categories: flow phrasing palpable - Parents: phrasing - Children: phrasing - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/cite - """ # fmt: skip - tag = 'cite' - categories = ['flow', 'phrasing', 'palpable'] - class hint(GlobalAttrs): - """ - Type hints for "cite" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'cite' (Title of a work) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/cite - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "cite", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class code(BaseElement): - """ - The 'code' element. - Description: Computer code - Categories: flow phrasing palpable - Parents: phrasing - Children: phrasing - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/code - """ # fmt: skip - tag = 'code' - categories = ['flow', 'phrasing', 'palpable'] - class hint(GlobalAttrs): - """ - Type hints for "code" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'code' (Computer code) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/code - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "code", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class col(BaseElement): - """ - The 'col' element. - Description: Table column - Categories: none - Parents: colgroup - Children: empty - Interface: HTMLTableColElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col - """ # fmt: skip - tag = 'col' - categories = ['none'] - class hint(GlobalAttrs, ColAttrs): - """ - Type hints for "col" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - span: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'col' (Table column) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `span` : - Number of columns spanned by the element - - Valid non-negative integer greater than zero - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "col", - void_element=True, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (span is None or span is False): - self._process_attr("span", span) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class colgroup(BaseElement): - """ - The 'colgroup' element. - Description: Group of columns in a table - Categories: none - Parents: table - Children: col* template* - Interface: HTMLTableColElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/colgroup - """ # fmt: skip - tag = 'colgroup' - categories = ['none'] - class hint(GlobalAttrs, ColgroupAttrs): - """ - Type hints for "colgroup" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - span: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'colgroup' (Group of columns in a table) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/colgroup - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `span` : - Number of columns spanned by the element - - Valid non-negative integer greater than zero - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "colgroup", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (span is None or span is False): - self._process_attr("span", span) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class data(BaseElement): - """ - The 'data' element. - Description: Machine-readable equivalent - Categories: flow phrasing palpable - Parents: phrasing - Children: phrasing - Interface: HTMLDataElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/data - """ # fmt: skip - tag = 'data' - categories = ['flow', 'phrasing', 'palpable'] - class hint(GlobalAttrs, DataAttrs): - """ - Type hints for "data" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - value: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'data' (Machine-readable equivalent) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/data - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `value` : - Machine-readable value - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "data", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (value is None or value is False): - self._process_attr("value", value) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class datalist(BaseElement): - """ - The 'datalist' element. - Description: Container for options for combo box control - Categories: flow phrasing - Parents: phrasing - Children: phrasing* option* script-supporting elements* - Interface: HTMLDataListElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/datalist - """ # fmt: skip - tag = 'datalist' - categories = ['flow', 'phrasing'] - class hint(GlobalAttrs): - """ - Type hints for "datalist" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'datalist' (Container for options for combo box control) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/datalist - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "datalist", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class dd(BaseElement): - """ - The 'dd' element. - Description: Content for corresponding dt element(s) - Categories: none - Parents: dl div* - Children: flow - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dd - """ # fmt: skip - tag = 'dd' - categories = ['none'] - class hint(GlobalAttrs): - """ - Type hints for "dd" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'dd' (Content for corresponding dt element(s)) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dd - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "dd", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class del_(BaseElement): - """ - The 'del' element. - Description: A removal from the document - Categories: flow phrasing* palpable - Parents: phrasing - Children: transparent - Interface: HTMLModElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/del - """ # fmt: skip - tag = 'del' - categories = ['flow', 'phrasing*', 'palpable'] - class hint(GlobalAttrs, DelAttrs): - """ - Type hints for "del" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - cite: Optional[str] = None, - datetime: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'del' (A removal from the document) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/del - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `cite` : - Link to the source of the quotation or more information about the edit - - Valid URL potentially surrounded by spaces - `datetime` : - Date and (optionally) time of the change - - Valid date string with optional time - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "del", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (cite is None or cite is False): - self._process_attr("cite", cite) - if not (datetime is None or datetime is False): - self._process_attr("datetime", datetime) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class details(BaseElement): - """ - The 'details' element. - Description: Disclosure control for hiding details - Categories: flow interactive palpable - Parents: flow - Children: summary* flow - Interface: HTMLDetailsElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details - """ # fmt: skip - tag = 'details' - categories = ['flow', 'interactive', 'palpable'] - class hint(GlobalAttrs, DetailsAttrs): - """ - Type hints for "details" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - name: Optional[str] = None, - open: Optional[Union[str, bool]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'details' (Disclosure control for hiding details) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `name` : - Name of group of mutually-exclusive details elements - `open` : - Whether the details are visible - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "details", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (name is None or name is False): - self._process_attr("name", name) - if not (open is None or open is False): - self._process_attr("open", open) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class dfn(BaseElement): - """ - The 'dfn' element. - Description: Defining instance - Categories: flow phrasing palpable - Parents: phrasing - Children: phrasing* - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dfn - """ # fmt: skip - tag = 'dfn' - categories = ['flow', 'phrasing', 'palpable'] - class hint(GlobalAttrs): - """ - Type hints for "dfn" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'dfn' (Defining instance) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dfn - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "dfn", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class dialog(BaseElement): - """ - The 'dialog' element. - Description: Dialog box or window - Categories: flow - Parents: flow - Children: flow - Interface: HTMLDialogElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog - """ # fmt: skip - tag = 'dialog' - categories = ['flow'] - class hint(GlobalAttrs, DialogAttrs): - """ - Type hints for "dialog" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - open: Optional[Union[str, bool]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'dialog' (Dialog box or window) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `open` : - Whether the dialog box is showing - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "dialog", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (open is None or open is False): - self._process_attr("open", open) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class div(BaseElement): - """ - The 'div' element. - Description: Generic flow container, or container for name-value groups in dl elements - Categories: flow palpable - Parents: flow dl - Children: flow - Interface: HTMLDivElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/div - """ # fmt: skip - tag = 'div' - categories = ['flow', 'palpable'] - class hint(GlobalAttrs): - """ - Type hints for "div" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'div' (Generic flow container, or container for name-value groups in dl elements) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/div - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "div", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class dl(BaseElement): - """ - The 'dl' element. - Description: Association list consisting of zero or more name-value groups - Categories: flow palpable - Parents: flow - Children: dt* dd* div* script-supporting elements - Interface: HTMLDListElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dl - """ # fmt: skip - tag = 'dl' - categories = ['flow', 'palpable'] - class hint(GlobalAttrs): - """ - Type hints for "dl" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'dl' (Association list consisting of zero or more name-value groups) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dl - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "dl", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class dt(BaseElement): - """ - The 'dt' element. - Description: Legend for corresponding dd element(s) - Categories: none - Parents: dl div* - Children: flow* - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dt - """ # fmt: skip - tag = 'dt' - categories = ['none'] - class hint(GlobalAttrs): - """ - Type hints for "dt" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'dt' (Legend for corresponding dd element(s)) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dt - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "dt", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class em(BaseElement): - """ - The 'em' element. - Description: Stress emphasis - Categories: flow phrasing palpable - Parents: phrasing - Children: phrasing - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/em - """ # fmt: skip - tag = 'em' - categories = ['flow', 'phrasing', 'palpable'] - class hint(GlobalAttrs): - """ - Type hints for "em" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'em' (Stress emphasis) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/em - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "em", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class embed(BaseElement): - """ - The 'embed' element. - Description: Plugin - Categories: flow phrasing embedded interactive palpable - Parents: phrasing - Children: empty - Interface: HTMLEmbedElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/embed - """ # fmt: skip - tag = 'embed' - categories = ['flow', 'phrasing', 'embedded', 'interactive', 'palpable'] - class hint(GlobalAttrs, EmbedAttrs): - """ - Type hints for "embed" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - height: Optional[Union[str, int]] = None, - src: Optional[str] = None, - type: Optional[str] = None, - width: Optional[Union[str, int]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'embed' (Plugin) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/embed - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `height` : - Vertical dimension - `src` : - Address of the resource - - Valid non-empty URL potentially surrounded by spaces - `type` : - Type of embedded resource - - Valid MIME type string - `width` : - Horizontal dimension - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "embed", - void_element=True, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (height is None or height is False): - self._process_attr("height", height) - if not (src is None or src is False): - self._process_attr("src", src) - if not (type is None or type is False): - self._process_attr("type", type) - if not (width is None or width is False): - self._process_attr("width", width) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class fieldset(BaseElement): - """ - The 'fieldset' element. - Description: Group of form controls - Categories: flow listed form-associated palpable - Parents: flow - Children: legend* flow - Interface: HTMLFieldSetElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fieldset - """ # fmt: skip - tag = 'fieldset' - categories = ['flow', 'listed', 'form-associated', 'palpable'] - class hint(GlobalAttrs, FieldsetAttrs): - """ - Type hints for "fieldset" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - disabled: Optional[Union[str, bool]] = None, - form: Optional[str] = None, - name: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'fieldset' (Group of form controls) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fieldset - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `disabled` : - Whether the descendant form controls, except any inside legend, are disabled - `form` : - Associates the element with a form element - - ID* - `name` : - Name of the element to use for form submission and in the form.elements API - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "fieldset", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (disabled is None or disabled is False): - self._process_attr("disabled", disabled) - if not (form is None or form is False): - self._process_attr("form", form) - if not (name is None or name is False): - self._process_attr("name", name) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class figcaption(BaseElement): - """ - The 'figcaption' element. - Description: Caption for figure - Categories: none - Parents: figure - Children: flow - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/figcaption - """ # fmt: skip - tag = 'figcaption' - categories = ['none'] - class hint(GlobalAttrs): - """ - Type hints for "figcaption" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'figcaption' (Caption for figure) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/figcaption - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "figcaption", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class figure(BaseElement): - """ - The 'figure' element. - Description: Figure with optional caption - Categories: flow palpable - Parents: flow - Children: figcaption* flow - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/figure - """ # fmt: skip - tag = 'figure' - categories = ['flow', 'palpable'] - class hint(GlobalAttrs): - """ - Type hints for "figure" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'figure' (Figure with optional caption) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/figure - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "figure", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class footer(BaseElement): - """ - The 'footer' element. - Description: Footer for a page or section - Categories: flow palpable - Parents: flow - Children: flow* - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/footer - """ # fmt: skip - tag = 'footer' - categories = ['flow', 'palpable'] - class hint(GlobalAttrs): - """ - Type hints for "footer" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'footer' (Footer for a page or section) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/footer - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "footer", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class form(BaseElement): - """ - The 'form' element. - Description: User-submittable form - Categories: flow palpable - Parents: flow - Children: flow* - Interface: HTMLFormElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form - """ # fmt: skip - tag = 'form' - categories = ['flow', 'palpable'] - class hint(GlobalAttrs, FormAttrs): - """ - Type hints for "form" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accept_charset: Optional[str] = None, - action: Optional[str] = None, - autocomplete: Optional[Union[str, Literal['on', 'off']]] = None, - enctype: Optional[Union[str, Literal['application/x-www-form-urlencoded', 'multipart/form-data', 'text/plain']]] = None, - method: Optional[Union[str, Literal['GET', 'POST', 'dialog']]] = None, - name: Optional[str] = None, - novalidate: Optional[Union[str, bool]] = None, - target: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'form' (User-submittable form) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accept_charset` : - Character encodings to use for form submission - - ASCII case-insensitive match for "UTF-8" - `action` : - URL to use for form submission - - Valid non-empty URL potentially surrounded by spaces - `autocomplete` : - Default setting for autofill feature for controls in the form - `enctype` : - Entry list encoding type to use for form submission - `method` : - Variant to use for form submission - `name` : - Name of form to use in the document.forms API - `novalidate` : - Bypass form control validation for form submission - `target` : - Navigable for form submission - - Valid navigable target name or keyword - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "form", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accept_charset is None or accept_charset is False): - self._process_attr("accept-charset", accept_charset) - if not (action is None or action is False): - self._process_attr("action", action) - if not (autocomplete is None or autocomplete is False): - self._process_attr("autocomplete", autocomplete) - if not (enctype is None or enctype is False): - self._process_attr("enctype", enctype) - if not (method is None or method is False): - self._process_attr("method", method) - if not (name is None or name is False): - self._process_attr("name", name) - if not (novalidate is None or novalidate is False): - self._process_attr("novalidate", novalidate) - if not (target is None or target is False): - self._process_attr("target", target) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class h1(BaseElement): - """ - The 'h1' element. - Description: Heading - Categories: flow heading palpable - Parents: legend summary flow - Children: phrasing - Interface: HTMLHeadingElement - Documentation: None - """ # fmt: skip - tag = 'h1' - categories = ['flow', 'heading', 'palpable'] - class hint(GlobalAttrs): - """ - Type hints for "h1" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'h1' (Heading) element. - Documentation: None - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "h1", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class h2(BaseElement): - """ - The 'h2' element. - Description: Heading - Categories: flow heading palpable - Parents: legend summary flow - Children: phrasing - Interface: HTMLHeadingElement - Documentation: None - """ # fmt: skip - tag = 'h2' - categories = ['flow', 'heading', 'palpable'] - class hint(GlobalAttrs): - """ - Type hints for "h2" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'h2' (Heading) element. - Documentation: None - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "h2", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class h3(BaseElement): - """ - The 'h3' element. - Description: Heading - Categories: flow heading palpable - Parents: legend summary flow - Children: phrasing - Interface: HTMLHeadingElement - Documentation: None - """ # fmt: skip - tag = 'h3' - categories = ['flow', 'heading', 'palpable'] - class hint(GlobalAttrs): - """ - Type hints for "h3" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'h3' (Heading) element. - Documentation: None - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "h3", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class h4(BaseElement): - """ - The 'h4' element. - Description: Heading - Categories: flow heading palpable - Parents: legend summary flow - Children: phrasing - Interface: HTMLHeadingElement - Documentation: None - """ # fmt: skip - tag = 'h4' - categories = ['flow', 'heading', 'palpable'] - class hint(GlobalAttrs): - """ - Type hints for "h4" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'h4' (Heading) element. - Documentation: None - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "h4", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class h5(BaseElement): - """ - The 'h5' element. - Description: Heading - Categories: flow heading palpable - Parents: legend summary flow - Children: phrasing - Interface: HTMLHeadingElement - Documentation: None - """ # fmt: skip - tag = 'h5' - categories = ['flow', 'heading', 'palpable'] - class hint(GlobalAttrs): - """ - Type hints for "h5" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'h5' (Heading) element. - Documentation: None - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "h5", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class h6(BaseElement): - """ - The 'h6' element. - Description: Heading - Categories: flow heading palpable - Parents: legend summary flow - Children: phrasing - Interface: HTMLHeadingElement - Documentation: None - """ # fmt: skip - tag = 'h6' - categories = ['flow', 'heading', 'palpable'] - class hint(GlobalAttrs): - """ - Type hints for "h6" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'h6' (Heading) element. - Documentation: None - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "h6", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class head(BaseElement): - """ - The 'head' element. - Description: Container for document metadata - Categories: none - Parents: html - Children: metadata content* - Interface: HTMLHeadElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/head - """ # fmt: skip - tag = 'head' - categories = ['none'] - class hint(GlobalAttrs): - """ - Type hints for "head" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'head' (Container for document metadata) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/head - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "head", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class header(BaseElement): - """ - The 'header' element. - Description: Introductory or navigational aids for a page or section - Categories: flow palpable - Parents: flow - Children: flow* - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/header - """ # fmt: skip - tag = 'header' - categories = ['flow', 'palpable'] - class hint(GlobalAttrs): - """ - Type hints for "header" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'header' (Introductory or navigational aids for a page or section) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/header - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "header", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class hgroup(BaseElement): - """ - The 'hgroup' element. - Description: Heading container - Categories: flow palpable - Parents: legend summary flow - Children: h1 h2 h3 h4 h5 h6 script-supporting elements - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/hgroup - """ # fmt: skip - tag = 'hgroup' - categories = ['flow', 'palpable'] - class hint(GlobalAttrs): - """ - Type hints for "hgroup" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'hgroup' (Heading container) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/hgroup - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "hgroup", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class hr(BaseElement): - """ - The 'hr' element. - Description: Thematic break - Categories: flow - Parents: flow - Children: empty - Interface: HTMLHRElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/hr - """ # fmt: skip - tag = 'hr' - categories = ['flow'] - class hint(GlobalAttrs): - """ - Type hints for "hr" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'hr' (Thematic break) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/hr - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "hr", - void_element=True, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class html(BaseElement): - """ - The 'html' element. - Description: Root element - Categories: none - Parents: none* - Children: head* body* - Interface: HTMLHtmlElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/html - """ # fmt: skip - tag = 'html' - categories = ['none'] - class hint(GlobalAttrs): - """ - Type hints for "html" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'html' (Root element) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/html - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "html", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class i(BaseElement): - """ - The 'i' element. - Description: Alternate voice - Categories: flow phrasing palpable - Parents: phrasing - Children: phrasing - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/i - """ # fmt: skip - tag = 'i' - categories = ['flow', 'phrasing', 'palpable'] - class hint(GlobalAttrs): - """ - Type hints for "i" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'i' (Alternate voice) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/i - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "i", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class iframe(BaseElement): - """ - The 'iframe' element. - Description: Child navigable - Categories: flow phrasing embedded interactive palpable - Parents: phrasing - Children: empty - Interface: HTMLIFrameElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe - """ # fmt: skip - tag = 'iframe' - categories = ['flow', 'phrasing', 'embedded', 'interactive', 'palpable'] - class hint(GlobalAttrs, IframeAttrs): - """ - Type hints for "iframe" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - allow: Optional[str] = None, - allowfullscreen: Optional[Union[str, bool]] = None, - height: Optional[Union[str, int]] = None, - loading: Optional[Union[str, Literal['lazy', 'eager']]] = None, - name: Optional[str] = None, - referrerpolicy: Optional[str] = None, - sandbox: Optional[Union[str, list]] = None, - src: Optional[str] = None, - srcdoc: Optional[str] = None, - width: Optional[Union[str, int]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'iframe' (Child navigable) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `allow` : - Permissions policy to be applied to the iframe's contents - - Serialized permissions policy - `allowfullscreen` : - Whether to allow the iframe's contents to use requestFullscreen() - `height` : - Vertical dimension - `loading` : - Used when determining loading deferral - `name` : - Name of content navigable - - Valid navigable target name or keyword - `referrerpolicy` : - Referrer policy for fetches initiated by the element - - Referrer policy - `sandbox` : - Security rules for nested content - `src` : - Address of the resource - - Valid non-empty URL potentially surrounded by spaces - `srcdoc` : - A document to render in the iframe - - The source of an iframe srcdoc document* - `width` : - Horizontal dimension - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "iframe", - void_element=True, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (allow is None or allow is False): - self._process_attr("allow", allow) - if not (allowfullscreen is None or allowfullscreen is False): - self._process_attr("allowfullscreen", allowfullscreen) - if not (height is None or height is False): - self._process_attr("height", height) - if not (loading is None or loading is False): - self._process_attr("loading", loading) - if not (name is None or name is False): - self._process_attr("name", name) - if not (referrerpolicy is None or referrerpolicy is False): - self._process_attr("referrerpolicy", referrerpolicy) - if not (sandbox is None or sandbox is False): - self._process_attr("sandbox", sandbox) - if not (src is None or src is False): - self._process_attr("src", src) - if not (srcdoc is None or srcdoc is False): - self._process_attr("srcdoc", srcdoc) - if not (width is None or width is False): - self._process_attr("width", width) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class img(BaseElement): - """ - The 'img' element. - Description: Image - Categories: flow phrasing embedded interactive* form-associated palpable - Parents: phrasing picture - Children: empty - Interface: HTMLImageElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img - """ # fmt: skip - tag = 'img' - categories = ['flow', 'phrasing', 'embedded', 'interactive*', 'form-associated', 'palpable'] - class hint(GlobalAttrs, ImgAttrs): - """ - Type hints for "img" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - alt: Optional[str] = None, - crossorigin: Optional[Union[str, Literal['anonymous', 'use-credentials']]] = None, - decoding: Optional[Union[str, Literal['sync', 'async', 'auto']]] = None, - fetchpriority: Optional[Union[str, Literal['auto', 'high', 'low']]] = None, - height: Optional[Union[str, int]] = None, - ismap: Optional[Union[str, bool]] = None, - loading: Optional[Union[str, Literal['lazy', 'eager']]] = None, - referrerpolicy: Optional[str] = None, - sizes: Optional[str] = None, - src: Optional[str] = None, - srcset: Optional[str] = None, - usemap: Optional[str] = None, - width: Optional[Union[str, int]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'img' (Image) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `alt` : - Replacement text for use when images are not available - `crossorigin` : - How the element handles crossorigin requests - `decoding` : - Decoding hint to use when processing this image for presentation - `fetchpriority` : - Sets the priority for fetches initiated by the element - `height` : - Vertical dimension - `ismap` : - Whether the image is a server-side image map - `loading` : - Used when determining loading deferral - `referrerpolicy` : - Referrer policy for fetches initiated by the element - - Referrer policy - `sizes` : - Image sizes for different page layouts - - Valid source size list - `src` : - Address of the resource - - Valid non-empty URL potentially surrounded by spaces - `srcset` : - Images to use in different situations, e.g., high-resolution displays, small monitors, etc. - - Comma-separated list of image candidate strings - `usemap` : - Name of image map to use - - Valid hash-name reference* - `width` : - Horizontal dimension - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "img", - void_element=True, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (alt is None or alt is False): - self._process_attr("alt", alt) - if not (crossorigin is None or crossorigin is False): - self._process_attr("crossorigin", crossorigin) - if not (decoding is None or decoding is False): - self._process_attr("decoding", decoding) - if not (fetchpriority is None or fetchpriority is False): - self._process_attr("fetchpriority", fetchpriority) - if not (height is None or height is False): - self._process_attr("height", height) - if not (ismap is None or ismap is False): - self._process_attr("ismap", ismap) - if not (loading is None or loading is False): - self._process_attr("loading", loading) - if not (referrerpolicy is None or referrerpolicy is False): - self._process_attr("referrerpolicy", referrerpolicy) - if not (sizes is None or sizes is False): - self._process_attr("sizes", sizes) - if not (src is None or src is False): - self._process_attr("src", src) - if not (srcset is None or srcset is False): - self._process_attr("srcset", srcset) - if not (usemap is None or usemap is False): - self._process_attr("usemap", usemap) - if not (width is None or width is False): - self._process_attr("width", width) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class input(BaseElement): # type: ignore[misc] - """ - The 'input' element. - Description: Form control - Categories: flow phrasing interactive* listed labelable submittable resettable form-associated palpable* - Parents: phrasing - Children: empty - Interface: HTMLInputElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input - """ # fmt: skip - tag = 'input' - categories = ['flow', 'phrasing', 'interactive*', 'listed', 'labelable', 'submittable', 'resettable', 'form-associated', 'palpable*'] - class hint(GlobalAttrs, InputAttrs): - """ - Type hints for "input" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accept: Optional[str] = None, - alpha: Optional[Union[str, bool]] = None, - alt: Optional[str] = None, - autocomplete: Optional[str] = None, - checked: Optional[Union[str, bool]] = None, - colorspace: Optional[Union[str, Literal['limited-srgb', 'display-p3']]] = None, - dirname: Optional[str] = None, - disabled: Optional[Union[str, bool]] = None, - form: Optional[str] = None, - formaction: Optional[str] = None, - formenctype: Optional[Union[str, Literal['application/x-www-form-urlencoded', 'multipart/form-data', 'text/plain']]] = None, - formmethod: Optional[Union[str, Literal['GET', 'POST', 'dialog']]] = None, - formnovalidate: Optional[Union[str, bool]] = None, - formtarget: Optional[str] = None, - height: Optional[Union[str, int]] = None, - list: Optional[str] = None, - max: Optional[str] = None, - maxlength: Optional[Union[str, int]] = None, - min: Optional[str] = None, - minlength: Optional[Union[str, int]] = None, - multiple: Optional[Union[str, bool]] = None, - name: Optional[str] = None, - pattern: Optional[str] = None, - placeholder: Optional[str] = None, - popovertarget: Optional[str] = None, - popovertargetaction: Optional[Union[str, Literal['toggle', 'show', 'hide']]] = None, - readonly: Optional[Union[str, bool]] = None, - required: Optional[Union[str, bool]] = None, - size: Optional[str] = None, - src: Optional[str] = None, - step: Optional[Union[str, float]] = None, - title: Optional[str] = None, - type: Optional[str] = None, - value: Optional[str] = None, - width: Optional[Union[str, int]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'input' (Form control) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accept` : - Hint for expected file type in file upload controls - - Set of comma-separated tokens* consisting of valid MIME type strings with no parameters or audio/*, video/*, or image/* - `alpha` : - Allow the color's alpha component to be set - `alt` : - Replacement text for use when images are not available - `autocomplete` : - Hint for form autofill feature - - Autofill field name and related tokens* - `checked` : - Whether the control is checked - `colorspace` : - The color space of the serialized color - `dirname` : - Name of form control to use for sending the element's directionality in form submission - `disabled` : - Whether the form control is disabled - `form` : - Associates the element with a form element - - ID* - `formaction` : - URL to use for form submission - - Valid non-empty URL potentially surrounded by spaces - `formenctype` : - Entry list encoding type to use for form submission - `formmethod` : - Variant to use for form submission - `formnovalidate` : - Bypass form control validation for form submission - `formtarget` : - Navigable for form submission - - Valid navigable target name or keyword - `height` : - Vertical dimension - `list` : - List of autocomplete options - - ID* - `max` : - Maximum value - - Varies* - `maxlength` : - Maximum length of value - `min` : - Minimum value - - Varies* - `minlength` : - Minimum length of value - `multiple` : - Whether to allow multiple values - `name` : - Name of the element to use for form submission and in the form.elements API - `pattern` : - Pattern to be matched by the form control's value - - Regular expression matching the JavaScript Pattern production - `placeholder` : - User-visible label to be placed within the form control - `popovertarget` : - Targets a popover element to toggle, show, or hide - - ID* - `popovertargetaction` : - Indicates whether a targeted popover element is to be toggled, shown, or hidden - `readonly` : - Whether to allow the value to be edited by the user - `required` : - Whether the control is required for form submission - `size` : - Size of the control - - Valid non-negative integer greater than zero - `src` : - Address of the resource - - Valid non-empty URL potentially surrounded by spaces - `step` : - Granularity to be matched by the form control's value - `title` : - Description of pattern (when used with pattern attribute) - `type` : - Type of form control - - input type keyword - `value` : - Value of the form control - - Varies* - `width` : - Horizontal dimension - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "input", - void_element=True, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accept is None or accept is False): - self._process_attr("accept", accept) - if not (alpha is None or alpha is False): - self._process_attr("alpha", alpha) - if not (alt is None or alt is False): - self._process_attr("alt", alt) - if not (autocomplete is None or autocomplete is False): - self._process_attr("autocomplete", autocomplete) - if not (checked is None or checked is False): - self._process_attr("checked", checked) - if not (colorspace is None or colorspace is False): - self._process_attr("colorspace", colorspace) - if not (dirname is None or dirname is False): - self._process_attr("dirname", dirname) - if not (disabled is None or disabled is False): - self._process_attr("disabled", disabled) - if not (form is None or form is False): - self._process_attr("form", form) - if not (formaction is None or formaction is False): - self._process_attr("formaction", formaction) - if not (formenctype is None or formenctype is False): - self._process_attr("formenctype", formenctype) - if not (formmethod is None or formmethod is False): - self._process_attr("formmethod", formmethod) - if not (formnovalidate is None or formnovalidate is False): - self._process_attr("formnovalidate", formnovalidate) - if not (formtarget is None or formtarget is False): - self._process_attr("formtarget", formtarget) - if not (height is None or height is False): - self._process_attr("height", height) - if not (list is None or list is False): - self._process_attr("list", list) - if not (max is None or max is False): - self._process_attr("max", max) - if not (maxlength is None or maxlength is False): - self._process_attr("maxlength", maxlength) - if not (min is None or min is False): - self._process_attr("min", min) - if not (minlength is None or minlength is False): - self._process_attr("minlength", minlength) - if not (multiple is None or multiple is False): - self._process_attr("multiple", multiple) - if not (name is None or name is False): - self._process_attr("name", name) - if not (pattern is None or pattern is False): - self._process_attr("pattern", pattern) - if not (placeholder is None or placeholder is False): - self._process_attr("placeholder", placeholder) - if not (popovertarget is None or popovertarget is False): - self._process_attr("popovertarget", popovertarget) - if not (popovertargetaction is None or popovertargetaction is False): - self._process_attr("popovertargetaction", popovertargetaction) - if not (readonly is None or readonly is False): - self._process_attr("readonly", readonly) - if not (required is None or required is False): - self._process_attr("required", required) - if not (size is None or size is False): - self._process_attr("size", size) - if not (src is None or src is False): - self._process_attr("src", src) - if not (step is None or step is False): - self._process_attr("step", step) - if not (title is None or title is False): - self._process_attr("title", title) - if not (type is None or type is False): - self._process_attr("type", type) - if not (value is None or value is False): - self._process_attr("value", value) - if not (width is None or width is False): - self._process_attr("width", width) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class ins(BaseElement): - """ - The 'ins' element. - Description: An addition to the document - Categories: flow phrasing* palpable - Parents: phrasing - Children: transparent - Interface: HTMLModElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ins - """ # fmt: skip - tag = 'ins' - categories = ['flow', 'phrasing*', 'palpable'] - class hint(GlobalAttrs, InsAttrs): - """ - Type hints for "ins" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - cite: Optional[str] = None, - datetime: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'ins' (An addition to the document) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ins - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `cite` : - Link to the source of the quotation or more information about the edit - - Valid URL potentially surrounded by spaces - `datetime` : - Date and (optionally) time of the change - - Valid date string with optional time - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "ins", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (cite is None or cite is False): - self._process_attr("cite", cite) - if not (datetime is None or datetime is False): - self._process_attr("datetime", datetime) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class kbd(BaseElement): - """ - The 'kbd' element. - Description: User input - Categories: flow phrasing palpable - Parents: phrasing - Children: phrasing - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/kbd - """ # fmt: skip - tag = 'kbd' - categories = ['flow', 'phrasing', 'palpable'] - class hint(GlobalAttrs): - """ - Type hints for "kbd" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'kbd' (User input) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/kbd - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "kbd", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class label(BaseElement): - """ - The 'label' element. - Description: Caption for a form control - Categories: flow phrasing interactive palpable - Parents: phrasing - Children: phrasing* - Interface: HTMLLabelElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label - """ # fmt: skip - tag = 'label' - categories = ['flow', 'phrasing', 'interactive', 'palpable'] - class hint(GlobalAttrs, LabelAttrs): - """ - Type hints for "label" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - for_: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'label' (Caption for a form control) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `for_` : - Associate the label with form control - - ID* - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "label", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (for_ is None or for_ is False): - self._process_attr("for", for_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class legend(BaseElement): - """ - The 'legend' element. - Description: Caption for fieldset - Categories: none - Parents: fieldset - Children: phrasing heading content - Interface: HTMLLegendElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/legend - """ # fmt: skip - tag = 'legend' - categories = ['none'] - class hint(GlobalAttrs): - """ - Type hints for "legend" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'legend' (Caption for fieldset) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/legend - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "legend", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class li(BaseElement): - """ - The 'li' element. - Description: List item - Categories: none - Parents: ol ul menu* - Children: flow - Interface: HTMLLIElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/li - """ # fmt: skip - tag = 'li' - categories = ['none'] - class hint(GlobalAttrs, LiAttrs): - """ - Type hints for "li" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - value: Optional[Union[str, int]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'li' (List item) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/li - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `value` : - Ordinal value of the list item - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "li", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (value is None or value is False): - self._process_attr("value", value) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class link(BaseElement): # type: ignore[misc] - """ - The 'link' element. - Description: Link metadata - Categories: metadata flow* phrasing* - Parents: head noscript* phrasing* - Children: empty - Interface: HTMLLinkElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link - """ # fmt: skip - tag = 'link' - categories = ['metadata', 'flow*', 'phrasing*'] - class hint(GlobalAttrs, LinkAttrs): - """ - Type hints for "link" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - as_: Optional[str] = None, - blocking: Optional[Union[str, list]] = None, - color: Optional[str] = None, - crossorigin: Optional[Union[str, Literal['anonymous', 'use-credentials']]] = None, - disabled: Optional[Union[str, bool]] = None, - fetchpriority: Optional[Union[str, Literal['auto', 'high', 'low']]] = None, - href: Optional[str] = None, - hreflang: Optional[str] = None, - imagesizes: Optional[str] = None, - imagesrcset: Optional[str] = None, - integrity: Optional[str] = None, - media: Optional[str] = None, - referrerpolicy: Optional[str] = None, - rel: Optional[Union[str, list]] = None, - sizes: Optional[Union[str, list]] = None, - title: Optional[str] = None, - type: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'link' (Link metadata) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `as_` : - Potential destination for a preload request (for rel="preload" and rel="modulepreload") - - Potential destination, for rel="preload"; script-like destination, for rel="modulepreload" - `blocking` : - Whether the element is potentially render-blocking - `color` : - Color to use when customizing a site's icon (for rel="mask-icon") - - CSS - `crossorigin` : - How the element handles crossorigin requests - `disabled` : - Whether the link is disabled - `fetchpriority` : - Sets the priority for fetches initiated by the element - `href` : - Address of the hyperlink - - Valid non-empty URL potentially surrounded by spaces - `hreflang` : - Language of the linked resource - - Valid BCP 47 language tag - `imagesizes` : - Image sizes for different page layouts (for rel="preload") - - Valid source size list - `imagesrcset` : - Images to use in different situations, e.g., high-resolution displays, small monitors, etc. (for rel="preload") - - Comma-separated list of image candidate strings - `integrity` : - Integrity metadata used in Subresource Integrity checks [SRI] - `media` : - Applicable media - - Valid media query list - `referrerpolicy` : - Referrer policy for fetches initiated by the element - - Referrer policy - `rel` : - Relationship between the document containing the hyperlink and the destination resource - `sizes` : - Sizes of the icons (for rel="icon") - `title` : - CSS style sheet set name - `title` : - Title of the link - `type` : - Hint for the type of the referenced resource - - Valid MIME type string - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "link", - void_element=True, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (as_ is None or as_ is False): - self._process_attr("as", as_) - if not (blocking is None or blocking is False): - self._process_attr("blocking", blocking) - if not (color is None or color is False): - self._process_attr("color", color) - if not (crossorigin is None or crossorigin is False): - self._process_attr("crossorigin", crossorigin) - if not (disabled is None or disabled is False): - self._process_attr("disabled", disabled) - if not (fetchpriority is None or fetchpriority is False): - self._process_attr("fetchpriority", fetchpriority) - if not (href is None or href is False): - self._process_attr("href", href) - if not (hreflang is None or hreflang is False): - self._process_attr("hreflang", hreflang) - if not (imagesizes is None or imagesizes is False): - self._process_attr("imagesizes", imagesizes) - if not (imagesrcset is None or imagesrcset is False): - self._process_attr("imagesrcset", imagesrcset) - if not (integrity is None or integrity is False): - self._process_attr("integrity", integrity) - if not (media is None or media is False): - self._process_attr("media", media) - if not (referrerpolicy is None or referrerpolicy is False): - self._process_attr("referrerpolicy", referrerpolicy) - if not (rel is None or rel is False): - self._process_attr("rel", rel) - if not (sizes is None or sizes is False): - self._process_attr("sizes", sizes) - if not (title is None or title is False): - self._process_attr("title", title) - if not (type is None or type is False): - self._process_attr("type", type) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class main(BaseElement): - """ - The 'main' element. - Description: Container for the dominant contents of the document - Categories: flow palpable - Parents: flow* - Children: flow - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/main - """ # fmt: skip - tag = 'main' - categories = ['flow', 'palpable'] - class hint(GlobalAttrs): - """ - Type hints for "main" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'main' (Container for the dominant contents of the document) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/main - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "main", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class map(BaseElement): - """ - The 'map' element. - Description: Image map - Categories: flow phrasing* palpable - Parents: phrasing - Children: transparent area* - Interface: HTMLMapElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/map - """ # fmt: skip - tag = 'map' - categories = ['flow', 'phrasing*', 'palpable'] - class hint(GlobalAttrs, MapAttrs): - """ - Type hints for "map" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - name: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'map' (Image map) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/map - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `name` : - Name of image map to reference from the usemap attribute - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "map", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (name is None or name is False): - self._process_attr("name", name) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class mark(BaseElement): - """ - The 'mark' element. - Description: Highlight - Categories: flow phrasing palpable - Parents: phrasing - Children: phrasing - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/mark - """ # fmt: skip - tag = 'mark' - categories = ['flow', 'phrasing', 'palpable'] - class hint(GlobalAttrs): - """ - Type hints for "mark" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'mark' (Highlight) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/mark - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "mark", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class menu(BaseElement): - """ - The 'menu' element. - Description: Menu of commands - Categories: flow palpable* - Parents: flow - Children: li script-supporting elements - Interface: HTMLMenuElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/menu - """ # fmt: skip - tag = 'menu' - categories = ['flow', 'palpable*'] - class hint(GlobalAttrs): - """ - Type hints for "menu" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'menu' (Menu of commands) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/menu - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "menu", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class meta(BaseElement): - """ - The 'meta' element. - Description: Text metadata - Categories: metadata flow* phrasing* - Parents: head noscript* phrasing* - Children: empty - Interface: HTMLMetaElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta - """ # fmt: skip - tag = 'meta' - categories = ['metadata', 'flow*', 'phrasing*'] - class hint(GlobalAttrs, MetaAttrs): - """ - Type hints for "meta" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - charset: Optional[Union[str, Literal['utf-8']]] = None, - content: Optional[str] = None, - http_equiv: Optional[Union[str, Literal['content-type', 'default-style', 'refresh', 'x-ua-compatible', 'content-security-policy']]] = None, - media: Optional[str] = None, - name: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'meta' (Text metadata) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `charset` : - Character encoding declaration - `content` : - Value of the element - `http_equiv` : - Pragma directive - `media` : - Applicable media - - Valid media query list - `name` : - Metadata name - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "meta", - void_element=True, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (charset is None or charset is False): - self._process_attr("charset", charset) - if not (content is None or content is False): - self._process_attr("content", content) - if not (http_equiv is None or http_equiv is False): - self._process_attr("http-equiv", http_equiv) - if not (media is None or media is False): - self._process_attr("media", media) - if not (name is None or name is False): - self._process_attr("name", name) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class meter(BaseElement): - """ - The 'meter' element. - Description: Gauge - Categories: flow phrasing labelable palpable - Parents: phrasing - Children: phrasing* - Interface: HTMLMeterElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meter - """ # fmt: skip - tag = 'meter' - categories = ['flow', 'phrasing', 'labelable', 'palpable'] - class hint(GlobalAttrs, MeterAttrs): - """ - Type hints for "meter" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - high: Optional[Union[str, float]] = None, - low: Optional[Union[str, float]] = None, - max: Optional[Union[str, float]] = None, - min: Optional[Union[str, float]] = None, - optimum: Optional[Union[str, float]] = None, - value: Optional[Union[str, float]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'meter' (Gauge) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meter - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `high` : - Low limit of high range - `low` : - High limit of low range - `max` : - Upper bound of range - `min` : - Lower bound of range - `optimum` : - Optimum value in gauge - `value` : - Current value of the element - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "meter", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (high is None or high is False): - self._process_attr("high", high) - if not (low is None or low is False): - self._process_attr("low", low) - if not (max is None or max is False): - self._process_attr("max", max) - if not (min is None or min is False): - self._process_attr("min", min) - if not (optimum is None or optimum is False): - self._process_attr("optimum", optimum) - if not (value is None or value is False): - self._process_attr("value", value) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class nav(BaseElement): - """ - The 'nav' element. - Description: Section with navigational links - Categories: flow sectioning palpable - Parents: flow - Children: flow - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/nav - """ # fmt: skip - tag = 'nav' - categories = ['flow', 'sectioning', 'palpable'] - class hint(GlobalAttrs): - """ - Type hints for "nav" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'nav' (Section with navigational links) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/nav - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "nav", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class noscript(BaseElement): - """ - The 'noscript' element. - Description: Fallback content for script - Categories: metadata flow phrasing - Parents: head* phrasing* - Children: varies* - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/noscript - """ # fmt: skip - tag = 'noscript' - categories = ['metadata', 'flow', 'phrasing'] - class hint(GlobalAttrs): - """ - Type hints for "noscript" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'noscript' (Fallback content for script) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/noscript - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "noscript", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class object(BaseElement): - """ - The 'object' element. - Description: Image, child navigable, or plugin - Categories: flow phrasing embedded interactive* listed form-associated palpable - Parents: phrasing - Children: transparent - Interface: HTMLObjectElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/object - """ # fmt: skip - tag = 'object' - categories = ['flow', 'phrasing', 'embedded', 'interactive*', 'listed', 'form-associated', 'palpable'] - class hint(GlobalAttrs, ObjectAttrs): - """ - Type hints for "object" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - data: Optional[str] = None, - form: Optional[str] = None, - height: Optional[Union[str, int]] = None, - name: Optional[str] = None, - type: Optional[str] = None, - width: Optional[Union[str, int]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'object' (Image, child navigable, or plugin) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/object - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `data` : - Address of the resource - - Valid non-empty URL potentially surrounded by spaces - `form` : - Associates the element with a form element - - ID* - `height` : - Vertical dimension - `name` : - Name of content navigable - - Valid navigable target name or keyword - `type` : - Type of embedded resource - - Valid MIME type string - `width` : - Horizontal dimension - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "object", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (data is None or data is False): - self._process_attr("data", data) - if not (form is None or form is False): - self._process_attr("form", form) - if not (height is None or height is False): - self._process_attr("height", height) - if not (name is None or name is False): - self._process_attr("name", name) - if not (type is None or type is False): - self._process_attr("type", type) - if not (width is None or width is False): - self._process_attr("width", width) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class ol(BaseElement): - """ - The 'ol' element. - Description: Ordered list - Categories: flow palpable* - Parents: flow - Children: li script-supporting elements - Interface: HTMLOListElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ol - """ # fmt: skip - tag = 'ol' - categories = ['flow', 'palpable*'] - class hint(GlobalAttrs, OlAttrs): - """ - Type hints for "ol" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - reversed: Optional[Union[str, bool]] = None, - start: Optional[Union[str, int]] = None, - type: Optional[Union[str, Literal['1', 'a', 'A', 'i', 'I']]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'ol' (Ordered list) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ol - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `reversed` : - Number the list backwards - `start` : - Starting value of the list - `type` : - Kind of list marker - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "ol", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (reversed is None or reversed is False): - self._process_attr("reversed", reversed) - if not (start is None or start is False): - self._process_attr("start", start) - if not (type is None or type is False): - self._process_attr("type", type) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class optgroup(BaseElement): - """ - The 'optgroup' element. - Description: Group of options in a list box - Categories: none - Parents: select - Children: option script-supporting elements - Interface: HTMLOptGroupElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/optgroup - """ # fmt: skip - tag = 'optgroup' - categories = ['none'] - class hint(GlobalAttrs, OptgroupAttrs): - """ - Type hints for "optgroup" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - disabled: Optional[Union[str, bool]] = None, - label: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'optgroup' (Group of options in a list box) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/optgroup - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `disabled` : - Whether the form control is disabled - `label` : - User-visible label - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "optgroup", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (disabled is None or disabled is False): - self._process_attr("disabled", disabled) - if not (label is None or label is False): - self._process_attr("label", label) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class option(BaseElement): - """ - The 'option' element. - Description: Option in a list box or combo box control - Categories: none - Parents: select datalist optgroup - Children: text* - Interface: HTMLOptionElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option - """ # fmt: skip - tag = 'option' - categories = ['none'] - class hint(GlobalAttrs, OptionAttrs): - """ - Type hints for "option" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - disabled: Optional[Union[str, bool]] = None, - label: Optional[str] = None, - selected: Optional[Union[str, bool]] = None, - value: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'option' (Option in a list box or combo box control) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `disabled` : - Whether the form control is disabled - `label` : - User-visible label - `selected` : - Whether the option is selected by default - `value` : - Value to be used for form submission - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "option", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (disabled is None or disabled is False): - self._process_attr("disabled", disabled) - if not (label is None or label is False): - self._process_attr("label", label) - if not (selected is None or selected is False): - self._process_attr("selected", selected) - if not (value is None or value is False): - self._process_attr("value", value) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class output(BaseElement): - """ - The 'output' element. - Description: Calculated output value - Categories: flow phrasing listed labelable resettable form-associated palpable - Parents: phrasing - Children: phrasing - Interface: HTMLOutputElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/output - """ # fmt: skip - tag = 'output' - categories = ['flow', 'phrasing', 'listed', 'labelable', 'resettable', 'form-associated', 'palpable'] - class hint(GlobalAttrs, OutputAttrs): - """ - Type hints for "output" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - for_: Optional[Union[str, list]] = None, - form: Optional[str] = None, - name: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'output' (Calculated output value) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/output - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `for_` : - Specifies controls from which the output was calculated - `form` : - Associates the element with a form element - - ID* - `name` : - Name of the element to use for form submission and in the form.elements API - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "output", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (for_ is None or for_ is False): - self._process_attr("for", for_) - if not (form is None or form is False): - self._process_attr("form", form) - if not (name is None or name is False): - self._process_attr("name", name) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class p(BaseElement): - """ - The 'p' element. - Description: Paragraph - Categories: flow palpable - Parents: flow - Children: phrasing - Interface: HTMLParagraphElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/p - """ # fmt: skip - tag = 'p' - categories = ['flow', 'palpable'] - class hint(GlobalAttrs): - """ - Type hints for "p" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'p' (Paragraph) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/p - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "p", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class picture(BaseElement): - """ - The 'picture' element. - Description: Image - Categories: flow phrasing embedded palpable - Parents: phrasing - Children: source* one img script-supporting elements - Interface: HTMLPictureElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture - """ # fmt: skip - tag = 'picture' - categories = ['flow', 'phrasing', 'embedded', 'palpable'] - class hint(GlobalAttrs): - """ - Type hints for "picture" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'picture' (Image) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "picture", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class pre(BaseElement): - """ - The 'pre' element. - Description: Block of preformatted text - Categories: flow palpable - Parents: flow - Children: phrasing - Interface: HTMLPreElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/pre - """ # fmt: skip - tag = 'pre' - categories = ['flow', 'palpable'] - class hint(GlobalAttrs): - """ - Type hints for "pre" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'pre' (Block of preformatted text) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/pre - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "pre", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class progress(BaseElement): - """ - The 'progress' element. - Description: Progress bar - Categories: flow phrasing labelable palpable - Parents: phrasing - Children: phrasing* - Interface: HTMLProgressElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/progress - """ # fmt: skip - tag = 'progress' - categories = ['flow', 'phrasing', 'labelable', 'palpable'] - class hint(GlobalAttrs, ProgressAttrs): - """ - Type hints for "progress" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - max: Optional[Union[str, float]] = None, - value: Optional[Union[str, float]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'progress' (Progress bar) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/progress - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `max` : - Upper bound of range - `value` : - Current value of the element - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "progress", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (max is None or max is False): - self._process_attr("max", max) - if not (value is None or value is False): - self._process_attr("value", value) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class q(BaseElement): - """ - The 'q' element. - Description: Quotation - Categories: flow phrasing palpable - Parents: phrasing - Children: phrasing - Interface: HTMLQuoteElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/q - """ # fmt: skip - tag = 'q' - categories = ['flow', 'phrasing', 'palpable'] - class hint(GlobalAttrs, QAttrs): - """ - Type hints for "q" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - cite: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'q' (Quotation) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/q - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `cite` : - Link to the source of the quotation or more information about the edit - - Valid URL potentially surrounded by spaces - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "q", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (cite is None or cite is False): - self._process_attr("cite", cite) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class rp(BaseElement): - """ - The 'rp' element. - Description: Parenthesis for ruby annotation text - Categories: none - Parents: ruby - Children: text - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/rp - """ # fmt: skip - tag = 'rp' - categories = ['none'] - class hint(GlobalAttrs): - """ - Type hints for "rp" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'rp' (Parenthesis for ruby annotation text) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/rp - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "rp", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class rt(BaseElement): - """ - The 'rt' element. - Description: Ruby annotation text - Categories: none - Parents: ruby - Children: phrasing - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/rt - """ # fmt: skip - tag = 'rt' - categories = ['none'] - class hint(GlobalAttrs): - """ - Type hints for "rt" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'rt' (Ruby annotation text) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/rt - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "rt", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class ruby(BaseElement): - """ - The 'ruby' element. - Description: Ruby annotation(s) - Categories: flow phrasing palpable - Parents: phrasing - Children: phrasing rt rp* - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ruby - """ # fmt: skip - tag = 'ruby' - categories = ['flow', 'phrasing', 'palpable'] - class hint(GlobalAttrs): - """ - Type hints for "ruby" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'ruby' (Ruby annotation(s)) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ruby - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "ruby", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class s(BaseElement): - """ - The 's' element. - Description: Inaccurate text - Categories: flow phrasing palpable - Parents: phrasing - Children: phrasing - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/s - """ # fmt: skip - tag = 's' - categories = ['flow', 'phrasing', 'palpable'] - class hint(GlobalAttrs): - """ - Type hints for "s" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 's' (Inaccurate text) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/s - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "s", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class samp(BaseElement): - """ - The 'samp' element. - Description: Computer output - Categories: flow phrasing palpable - Parents: phrasing - Children: phrasing - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/samp - """ # fmt: skip - tag = 'samp' - categories = ['flow', 'phrasing', 'palpable'] - class hint(GlobalAttrs): - """ - Type hints for "samp" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'samp' (Computer output) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/samp - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "samp", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class script(BaseElement): - """ - The 'script' element. - Description: Embedded script - Categories: metadata flow phrasing script-supporting - Parents: head phrasing script-supporting - Children: script, data, or script documentation* - Interface: HTMLScriptElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script - """ # fmt: skip - tag = 'script' - categories = ['metadata', 'flow', 'phrasing', 'script-supporting'] - class hint(GlobalAttrs, ScriptAttrs): - """ - Type hints for "script" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - async_: Optional[Union[str, bool]] = None, - blocking: Optional[Union[str, list]] = None, - crossorigin: Optional[Union[str, Literal['anonymous', 'use-credentials']]] = None, - defer: Optional[Union[str, bool]] = None, - fetchpriority: Optional[Union[str, Literal['auto', 'high', 'low']]] = None, - integrity: Optional[str] = None, - nomodule: Optional[Union[str, bool]] = None, - referrerpolicy: Optional[str] = None, - src: Optional[str] = None, - type: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'script' (Embedded script) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `async_` : - Execute script when available, without blocking while fetching - `blocking` : - Whether the element is potentially render-blocking - `crossorigin` : - How the element handles crossorigin requests - `defer` : - Defer script execution - `fetchpriority` : - Sets the priority for fetches initiated by the element - `integrity` : - Integrity metadata used in Subresource Integrity checks [SRI] - `nomodule` : - Prevents execution in user agents that support module scripts - `referrerpolicy` : - Referrer policy for fetches initiated by the element - - Referrer policy - `src` : - Address of the resource - - Valid non-empty URL potentially surrounded by spaces - `type` : - Type of script - - "module"; a valid MIME type string that is not a JavaScript MIME type essence match - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "script", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (async_ is None or async_ is False): - self._process_attr("async", async_) - if not (blocking is None or blocking is False): - self._process_attr("blocking", blocking) - if not (crossorigin is None or crossorigin is False): - self._process_attr("crossorigin", crossorigin) - if not (defer is None or defer is False): - self._process_attr("defer", defer) - if not (fetchpriority is None or fetchpriority is False): - self._process_attr("fetchpriority", fetchpriority) - if not (integrity is None or integrity is False): - self._process_attr("integrity", integrity) - if not (nomodule is None or nomodule is False): - self._process_attr("nomodule", nomodule) - if not (referrerpolicy is None or referrerpolicy is False): - self._process_attr("referrerpolicy", referrerpolicy) - if not (src is None or src is False): - self._process_attr("src", src) - if not (type is None or type is False): - self._process_attr("type", type) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class search(BaseElement): - """ - The 'search' element. - Description: Container for search controls - Categories: flow palpable - Parents: flow - Children: flow - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/search - """ # fmt: skip - tag = 'search' - categories = ['flow', 'palpable'] - class hint(GlobalAttrs): - """ - Type hints for "search" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'search' (Container for search controls) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/search - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "search", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class section(BaseElement): - """ - The 'section' element. - Description: Generic document or application section - Categories: flow sectioning palpable - Parents: flow - Children: flow - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/section - """ # fmt: skip - tag = 'section' - categories = ['flow', 'sectioning', 'palpable'] - class hint(GlobalAttrs): - """ - Type hints for "section" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'section' (Generic document or application section) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/section - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "section", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class select(BaseElement): - """ - The 'select' element. - Description: List box control - Categories: flow phrasing interactive listed labelable submittable resettable form-associated palpable - Parents: phrasing - Children: option optgroup script-supporting elements - Interface: HTMLSelectElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select - """ # fmt: skip - tag = 'select' - categories = ['flow', 'phrasing', 'interactive', 'listed', 'labelable', 'submittable', 'resettable', 'form-associated', 'palpable'] - class hint(GlobalAttrs, SelectAttrs): - """ - Type hints for "select" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - autocomplete: Optional[str] = None, - disabled: Optional[Union[str, bool]] = None, - form: Optional[str] = None, - multiple: Optional[Union[str, bool]] = None, - name: Optional[str] = None, - required: Optional[Union[str, bool]] = None, - size: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'select' (List box control) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `autocomplete` : - Hint for form autofill feature - - Autofill field name and related tokens* - `disabled` : - Whether the form control is disabled - `form` : - Associates the element with a form element - - ID* - `multiple` : - Whether to allow multiple values - `name` : - Name of the element to use for form submission and in the form.elements API - `required` : - Whether the control is required for form submission - `size` : - Size of the control - - Valid non-negative integer greater than zero - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "select", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (autocomplete is None or autocomplete is False): - self._process_attr("autocomplete", autocomplete) - if not (disabled is None or disabled is False): - self._process_attr("disabled", disabled) - if not (form is None or form is False): - self._process_attr("form", form) - if not (multiple is None or multiple is False): - self._process_attr("multiple", multiple) - if not (name is None or name is False): - self._process_attr("name", name) - if not (required is None or required is False): - self._process_attr("required", required) - if not (size is None or size is False): - self._process_attr("size", size) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class slot(BaseElement): - """ - The 'slot' element. - Description: Shadow tree slot - Categories: flow phrasing - Parents: phrasing - Children: transparent - Interface: HTMLSlotElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/slot - """ # fmt: skip - tag = 'slot' - categories = ['flow', 'phrasing'] - class hint(GlobalAttrs, SlotAttrs): - """ - Type hints for "slot" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - name: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'slot' (Shadow tree slot) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/slot - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `name` : - Name of shadow tree slot - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "slot", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (name is None or name is False): - self._process_attr("name", name) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class small(BaseElement): - """ - The 'small' element. - Description: Side comment - Categories: flow phrasing palpable - Parents: phrasing - Children: phrasing - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/small - """ # fmt: skip - tag = 'small' - categories = ['flow', 'phrasing', 'palpable'] - class hint(GlobalAttrs): - """ - Type hints for "small" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'small' (Side comment) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/small - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "small", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class source(BaseElement): - """ - The 'source' element. - Description: Image source for img or media source for video or audio - Categories: none - Parents: picture video audio - Children: empty - Interface: HTMLSourceElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source - """ # fmt: skip - tag = 'source' - categories = ['none'] - class hint(GlobalAttrs, SourceAttrs): - """ - Type hints for "source" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - height: Optional[Union[str, int]] = None, - media: Optional[str] = None, - sizes: Optional[str] = None, - src: Optional[str] = None, - srcset: Optional[str] = None, - type: Optional[str] = None, - width: Optional[Union[str, int]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'source' (Image source for img or media source for video or audio) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `height` : - Vertical dimension - `media` : - Applicable media - - Valid media query list - `sizes` : - Image sizes for different page layouts - - Valid source size list - `src` : - Address of the resource - - Valid non-empty URL potentially surrounded by spaces - `srcset` : - Images to use in different situations, e.g., high-resolution displays, small monitors, etc. - - Comma-separated list of image candidate strings - `type` : - Type of embedded resource - - Valid MIME type string - `width` : - Horizontal dimension - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "source", - void_element=True, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (height is None or height is False): - self._process_attr("height", height) - if not (media is None or media is False): - self._process_attr("media", media) - if not (sizes is None or sizes is False): - self._process_attr("sizes", sizes) - if not (src is None or src is False): - self._process_attr("src", src) - if not (srcset is None or srcset is False): - self._process_attr("srcset", srcset) - if not (type is None or type is False): - self._process_attr("type", type) - if not (width is None or width is False): - self._process_attr("width", width) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class span(BaseElement): - """ - The 'span' element. - Description: Generic phrasing container - Categories: flow phrasing palpable - Parents: phrasing - Children: phrasing - Interface: HTMLSpanElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/span - """ # fmt: skip - tag = 'span' - categories = ['flow', 'phrasing', 'palpable'] - class hint(GlobalAttrs): - """ - Type hints for "span" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'span' (Generic phrasing container) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/span - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "span", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class strong(BaseElement): - """ - The 'strong' element. - Description: Importance - Categories: flow phrasing palpable - Parents: phrasing - Children: phrasing - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/strong - """ # fmt: skip - tag = 'strong' - categories = ['flow', 'phrasing', 'palpable'] - class hint(GlobalAttrs): - """ - Type hints for "strong" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'strong' (Importance) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/strong - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "strong", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class style(BaseElement): # type: ignore[misc] - """ - The 'style' element. - Description: Embedded styling information - Categories: metadata - Parents: head noscript* - Children: text* - Interface: HTMLStyleElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/style - """ # fmt: skip - tag = 'style' - categories = ['metadata'] - class hint(GlobalAttrs, StyleAttrs): - """ - Type hints for "style" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - blocking: Optional[Union[str, list]] = None, - media: Optional[str] = None, - title: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'style' (Embedded styling information) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/style - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `blocking` : - Whether the element is potentially render-blocking - `media` : - Applicable media - - Valid media query list - `title` : - CSS style sheet set name - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "style", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (blocking is None or blocking is False): - self._process_attr("blocking", blocking) - if not (media is None or media is False): - self._process_attr("media", media) - if not (title is None or title is False): - self._process_attr("title", title) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class sub(BaseElement): - """ - The 'sub' element. - Description: Subscript - Categories: flow phrasing palpable - Parents: phrasing - Children: phrasing - Interface: HTMLElement - Documentation: None - """ # fmt: skip - tag = 'sub' - categories = ['flow', 'phrasing', 'palpable'] - class hint(GlobalAttrs): - """ - Type hints for "sub" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'sub' (Subscript) element. - Documentation: None - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "sub", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class summary(BaseElement): - """ - The 'summary' element. - Description: Caption for details - Categories: none - Parents: details - Children: phrasing heading content - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/summary - """ # fmt: skip - tag = 'summary' - categories = ['none'] - class hint(GlobalAttrs): - """ - Type hints for "summary" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'summary' (Caption for details) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/summary - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "summary", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class sup(BaseElement): - """ - The 'sup' element. - Description: Superscript - Categories: flow phrasing palpable - Parents: phrasing - Children: phrasing - Interface: HTMLElement - Documentation: None - """ # fmt: skip - tag = 'sup' - categories = ['flow', 'phrasing', 'palpable'] - class hint(GlobalAttrs): - """ - Type hints for "sup" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'sup' (Superscript) element. - Documentation: None - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "sup", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class svg(BaseElement): - """ - The 'svg' element. - Description: SVG root - Categories: flow phrasing embedded palpable - Parents: phrasing - Children: per [SVG] - Interface: SVGSVGElement - Documentation: None - """ # fmt: skip - tag = 'svg' - categories = ['flow', 'phrasing', 'embedded', 'palpable'] - class hint(GlobalAttrs): - """ - Type hints for "svg" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'svg' (SVG root) element. - Documentation: None - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "svg", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class table(BaseElement): - """ - The 'table' element. - Description: Table - Categories: flow palpable - Parents: flow - Children: caption* colgroup* thead* tbody* tfoot* tr* script-supporting elements - Interface: HTMLTableElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table - """ # fmt: skip - tag = 'table' - categories = ['flow', 'palpable'] - class hint(GlobalAttrs): - """ - Type hints for "table" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'table' (Table) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "table", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class tbody(BaseElement): - """ - The 'tbody' element. - Description: Group of rows in a table - Categories: none - Parents: table - Children: tr script-supporting elements - Interface: HTMLTableSectionElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tbody - """ # fmt: skip - tag = 'tbody' - categories = ['none'] - class hint(GlobalAttrs): - """ - Type hints for "tbody" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'tbody' (Group of rows in a table) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tbody - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "tbody", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class td(BaseElement): - """ - The 'td' element. - Description: Table cell - Categories: none - Parents: tr - Children: flow - Interface: HTMLTableCellElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td - """ # fmt: skip - tag = 'td' - categories = ['none'] - class hint(GlobalAttrs, TdAttrs): - """ - Type hints for "td" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - colspan: Optional[str] = None, - headers: Optional[Union[str, list]] = None, - rowspan: Optional[Union[str, int]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'td' (Table cell) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `colspan` : - Number of columns that the cell is to span - - Valid non-negative integer greater than zero - `headers` : - The header cells for this cell - `rowspan` : - Number of rows that the cell is to span - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "td", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (colspan is None or colspan is False): - self._process_attr("colspan", colspan) - if not (headers is None or headers is False): - self._process_attr("headers", headers) - if not (rowspan is None or rowspan is False): - self._process_attr("rowspan", rowspan) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class template(BaseElement): - """ - The 'template' element. - Description: Template - Categories: metadata flow phrasing script-supporting - Parents: metadata phrasing script-supporting colgroup* - Children: empty - Interface: HTMLTemplateElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/template - """ # fmt: skip - tag = 'template' - categories = ['metadata', 'flow', 'phrasing', 'script-supporting'] - class hint(GlobalAttrs, TemplateAttrs): - """ - Type hints for "template" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - shadowrootclonable: Optional[Union[str, bool]] = None, - shadowrootdelegatesfocus: Optional[Union[str, bool]] = None, - shadowrootmode: Optional[Union[str, Literal['open', 'closed']]] = None, - shadowrootserializable: Optional[Union[str, bool]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'template' (Template) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/template - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `shadowrootclonable` : - Sets clonable on a declarative shadow root - `shadowrootdelegatesfocus` : - Sets delegates focus on a declarative shadow root - `shadowrootmode` : - Enables streaming declarative shadow roots - `shadowrootserializable` : - Sets serializable on a declarative shadow root - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "template", - void_element=True, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (shadowrootclonable is None or shadowrootclonable is False): - self._process_attr("shadowrootclonable", shadowrootclonable) - if not (shadowrootdelegatesfocus is None or shadowrootdelegatesfocus is False): - self._process_attr("shadowrootdelegatesfocus", shadowrootdelegatesfocus) - if not (shadowrootmode is None or shadowrootmode is False): - self._process_attr("shadowrootmode", shadowrootmode) - if not (shadowrootserializable is None or shadowrootserializable is False): - self._process_attr("shadowrootserializable", shadowrootserializable) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class textarea(BaseElement): - """ - The 'textarea' element. - Description: Multiline text controls - Categories: flow phrasing interactive listed labelable submittable resettable form-associated palpable - Parents: phrasing - Children: text - Interface: HTMLTextAreaElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea - """ # fmt: skip - tag = 'textarea' - categories = ['flow', 'phrasing', 'interactive', 'listed', 'labelable', 'submittable', 'resettable', 'form-associated', 'palpable'] - class hint(GlobalAttrs, TextareaAttrs): - """ - Type hints for "textarea" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - autocomplete: Optional[str] = None, - cols: Optional[str] = None, - dirname: Optional[str] = None, - disabled: Optional[Union[str, bool]] = None, - form: Optional[str] = None, - maxlength: Optional[Union[str, int]] = None, - minlength: Optional[Union[str, int]] = None, - name: Optional[str] = None, - placeholder: Optional[str] = None, - readonly: Optional[Union[str, bool]] = None, - required: Optional[Union[str, bool]] = None, - rows: Optional[str] = None, - wrap: Optional[Union[str, Literal['soft', 'hard']]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'textarea' (Multiline text controls) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `autocomplete` : - Hint for form autofill feature - - Autofill field name and related tokens* - `cols` : - Maximum number of characters per line - - Valid non-negative integer greater than zero - `dirname` : - Name of form control to use for sending the element's directionality in form submission - `disabled` : - Whether the form control is disabled - `form` : - Associates the element with a form element - - ID* - `maxlength` : - Maximum length of value - `minlength` : - Minimum length of value - `name` : - Name of the element to use for form submission and in the form.elements API - `placeholder` : - User-visible label to be placed within the form control - `readonly` : - Whether to allow the value to be edited by the user - `required` : - Whether the control is required for form submission - `rows` : - Number of lines to show - - Valid non-negative integer greater than zero - `wrap` : - How the value of the form control is to be wrapped for form submission - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "textarea", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (autocomplete is None or autocomplete is False): - self._process_attr("autocomplete", autocomplete) - if not (cols is None or cols is False): - self._process_attr("cols", cols) - if not (dirname is None or dirname is False): - self._process_attr("dirname", dirname) - if not (disabled is None or disabled is False): - self._process_attr("disabled", disabled) - if not (form is None or form is False): - self._process_attr("form", form) - if not (maxlength is None or maxlength is False): - self._process_attr("maxlength", maxlength) - if not (minlength is None or minlength is False): - self._process_attr("minlength", minlength) - if not (name is None or name is False): - self._process_attr("name", name) - if not (placeholder is None or placeholder is False): - self._process_attr("placeholder", placeholder) - if not (readonly is None or readonly is False): - self._process_attr("readonly", readonly) - if not (required is None or required is False): - self._process_attr("required", required) - if not (rows is None or rows is False): - self._process_attr("rows", rows) - if not (wrap is None or wrap is False): - self._process_attr("wrap", wrap) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class tfoot(BaseElement): - """ - The 'tfoot' element. - Description: Group of footer rows in a table - Categories: none - Parents: table - Children: tr script-supporting elements - Interface: HTMLTableSectionElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tfoot - """ # fmt: skip - tag = 'tfoot' - categories = ['none'] - class hint(GlobalAttrs): - """ - Type hints for "tfoot" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'tfoot' (Group of footer rows in a table) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tfoot - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "tfoot", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class th(BaseElement): - """ - The 'th' element. - Description: Table header cell - Categories: interactive* - Parents: tr - Children: flow* - Interface: HTMLTableCellElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th - """ # fmt: skip - tag = 'th' - categories = ['interactive*'] - class hint(GlobalAttrs, ThAttrs): - """ - Type hints for "th" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - abbr: Optional[str] = None, - colspan: Optional[str] = None, - headers: Optional[Union[str, list]] = None, - rowspan: Optional[Union[str, int]] = None, - scope: Optional[Union[str, Literal['row', 'col', 'rowgroup', 'colgroup']]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'th' (Table header cell) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `abbr` : - Alternative label to use for the header cell when referencing the cell in other contexts - `colspan` : - Number of columns that the cell is to span - - Valid non-negative integer greater than zero - `headers` : - The header cells for this cell - `rowspan` : - Number of rows that the cell is to span - `scope` : - Specifies which cells the header cell applies to - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "th", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (abbr is None or abbr is False): - self._process_attr("abbr", abbr) - if not (colspan is None or colspan is False): - self._process_attr("colspan", colspan) - if not (headers is None or headers is False): - self._process_attr("headers", headers) - if not (rowspan is None or rowspan is False): - self._process_attr("rowspan", rowspan) - if not (scope is None or scope is False): - self._process_attr("scope", scope) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class thead(BaseElement): - """ - The 'thead' element. - Description: Group of heading rows in a table - Categories: none - Parents: table - Children: tr script-supporting elements - Interface: HTMLTableSectionElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/thead - """ # fmt: skip - tag = 'thead' - categories = ['none'] - class hint(GlobalAttrs): - """ - Type hints for "thead" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'thead' (Group of heading rows in a table) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/thead - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "thead", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class time(BaseElement): - """ - The 'time' element. - Description: Machine-readable equivalent of date- or time-related data - Categories: flow phrasing palpable - Parents: phrasing - Children: phrasing - Interface: HTMLTimeElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/time - """ # fmt: skip - tag = 'time' - categories = ['flow', 'phrasing', 'palpable'] - class hint(GlobalAttrs, TimeAttrs): - """ - Type hints for "time" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - datetime: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'time' (Machine-readable equivalent of date- or time-related data) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/time - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `datetime` : - Machine-readable value - - Valid month string, valid date string, valid yearless date string, valid time string, valid local date and time string, valid time-zone offset string, valid global date and time string, valid week string, valid non-negative integer, or valid duration string - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "time", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (datetime is None or datetime is False): - self._process_attr("datetime", datetime) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class title(BaseElement): - """ - The 'title' element. - Description: Document title - Categories: metadata - Parents: head - Children: text* - Interface: HTMLTitleElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/title - """ # fmt: skip - tag = 'title' - categories = ['metadata'] - class hint(GlobalAttrs): - """ - Type hints for "title" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'title' (Document title) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/title - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "title", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class tr(BaseElement): - """ - The 'tr' element. - Description: Table row - Categories: none - Parents: table thead tbody tfoot - Children: th* td script-supporting elements - Interface: HTMLTableRowElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tr - """ # fmt: skip - tag = 'tr' - categories = ['none'] - class hint(GlobalAttrs): - """ - Type hints for "tr" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'tr' (Table row) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tr - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "tr", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class track(BaseElement): - """ - The 'track' element. - Description: Timed text track - Categories: none - Parents: audio video - Children: empty - Interface: HTMLTrackElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/track - """ # fmt: skip - tag = 'track' - categories = ['none'] - class hint(GlobalAttrs, TrackAttrs): - """ - Type hints for "track" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - default: Optional[Union[str, bool]] = None, - kind: Optional[Union[str, Literal['subtitles', 'captions', 'descriptions', 'chapters', 'metadata']]] = None, - label: Optional[str] = None, - src: Optional[str] = None, - srclang: Optional[str] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'track' (Timed text track) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/track - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `default` : - Enable the track if no other text track is more suitable - `kind` : - The type of text track - `label` : - User-visible label - `src` : - Address of the resource - - Valid non-empty URL potentially surrounded by spaces - `srclang` : - Language of the text track - - Valid BCP 47 language tag - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "track", - void_element=True, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (default is None or default is False): - self._process_attr("default", default) - if not (kind is None or kind is False): - self._process_attr("kind", kind) - if not (label is None or label is False): - self._process_attr("label", label) - if not (src is None or src is False): - self._process_attr("src", src) - if not (srclang is None or srclang is False): - self._process_attr("srclang", srclang) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class u(BaseElement): - """ - The 'u' element. - Description: Unarticulated annotation - Categories: flow phrasing palpable - Parents: phrasing - Children: phrasing - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/u - """ # fmt: skip - tag = 'u' - categories = ['flow', 'phrasing', 'palpable'] - class hint(GlobalAttrs): - """ - Type hints for "u" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'u' (Unarticulated annotation) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/u - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "u", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class ul(BaseElement): - """ - The 'ul' element. - Description: List - Categories: flow palpable* - Parents: flow - Children: li script-supporting elements - Interface: HTMLUListElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ul - """ # fmt: skip - tag = 'ul' - categories = ['flow', 'palpable*'] - class hint(GlobalAttrs): - """ - Type hints for "ul" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'ul' (List) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ul - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "ul", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class var(BaseElement): - """ - The 'var' element. - Description: Variable - Categories: flow phrasing palpable - Parents: phrasing - Children: phrasing - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/var - """ # fmt: skip - tag = 'var' - categories = ['flow', 'phrasing', 'palpable'] - class hint(GlobalAttrs): - """ - Type hints for "var" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'var' (Variable) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/var - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "var", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class video(BaseElement): - """ - The 'video' element. - Description: Video player - Categories: flow phrasing embedded interactive palpable - Parents: phrasing - Children: source* track* transparent* - Interface: HTMLVideoElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video - """ # fmt: skip - tag = 'video' - categories = ['flow', 'phrasing', 'embedded', 'interactive', 'palpable'] - class hint(GlobalAttrs, VideoAttrs): - """ - Type hints for "video" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - autoplay: Optional[Union[str, bool]] = None, - controls: Optional[Union[str, bool]] = None, - crossorigin: Optional[Union[str, Literal['anonymous', 'use-credentials']]] = None, - height: Optional[Union[str, int]] = None, - loop: Optional[Union[str, bool]] = None, - muted: Optional[Union[str, bool]] = None, - playsinline: Optional[Union[str, bool]] = None, - poster: Optional[str] = None, - preload: Optional[Union[str, Literal['none', 'metadata', 'auto']]] = None, - src: Optional[str] = None, - width: Optional[Union[str, int]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'video' (Video player) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `autoplay` : - Hint that the media resource can be started automatically when the page is loaded - `controls` : - Show user agent controls - `crossorigin` : - How the element handles crossorigin requests - `height` : - Vertical dimension - `loop` : - Whether to loop the media resource - `muted` : - Whether to mute the media resource by default - `playsinline` : - Encourage the user agent to display video content within the element's playback area - `poster` : - Poster frame to show prior to video playback - - Valid non-empty URL potentially surrounded by spaces - `preload` : - Hints how much buffering the media resource will likely need - `src` : - Address of the resource - - Valid non-empty URL potentially surrounded by spaces - `width` : - Horizontal dimension - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "video", - void_element=False, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (autoplay is None or autoplay is False): - self._process_attr("autoplay", autoplay) - if not (controls is None or controls is False): - self._process_attr("controls", controls) - if not (crossorigin is None or crossorigin is False): - self._process_attr("crossorigin", crossorigin) - if not (height is None or height is False): - self._process_attr("height", height) - if not (loop is None or loop is False): - self._process_attr("loop", loop) - if not (muted is None or muted is False): - self._process_attr("muted", muted) - if not (playsinline is None or playsinline is False): - self._process_attr("playsinline", playsinline) - if not (poster is None or poster is False): - self._process_attr("poster", poster) - if not (preload is None or preload is False): - self._process_attr("preload", preload) - if not (src is None or src is False): - self._process_attr("src", src) - if not (width is None or width is False): - self._process_attr("width", width) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) - - -class wbr(BaseElement): - """ - The 'wbr' element. - Description: Line breaking opportunity - Categories: flow phrasing - Parents: phrasing - Children: empty - Interface: HTMLElement - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/wbr - """ # fmt: skip - tag = 'wbr' - categories = ['flow', 'phrasing'] - class hint(GlobalAttrs): - """ - Type hints for "wbr" attrs - This class holds functions which return BaseAttributes - Which you can add to your element attrs - """ # fmt: skip - pass - _ = hint - def __init__( - self, - attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, - id: Optional[str] = None, - class_: Optional[Union[str, list]] = None, - accesskey: Optional[Union[str, list]] = None, - autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, - autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, - autofocus: Optional[Union[str, bool]] = None, - contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, - dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, - draggable: Optional[Union[str, Literal['true', 'false']]] = None, - enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, - hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, - inert: Optional[Union[str, bool]] = None, - inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, - is_: Optional[str] = None, - itemid: Optional[str] = None, - itemprop: Optional[Union[str, list]] = None, - itemref: Optional[Union[str, list]] = None, - itemscope: Optional[Union[str, bool]] = None, - itemtype: Optional[Union[str, list]] = None, - lang: Optional[str] = None, - nonce: Optional[str] = None, - popover: Optional[Union[str, Literal['auto', 'manual']]] = None, - slot: Optional[str] = None, - spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, - style: Optional[str] = None, - tabindex: Optional[Union[str, int]] = None, - title: Optional[str] = None, - translate: Optional[Union[str, Literal['yes', 'no']]] = None, - writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, - children: Optional[list] = None - ) -> None: - """ - Initialize 'wbr' (Line breaking opportunity) element. - Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/wbr - - Parameters - ---------- - `attrs`: - A list or dictionary of attributes for the element - `id` : - The element's ID - `class_` : - Classes to which the element belongs - `accesskey` : - Keyboard shortcut to activate or focus element - `autocapitalize` : - Recommended autocapitalization behavior (for supported input methods) - `autocorrect` : - Recommended autocorrection behavior (for supported input methods) - `autofocus` : - Automatically focus the element when the page is loaded - `contenteditable` : - Whether the element is editable - `dir` : - The text directionality of the element - `draggable` : - Whether the element is draggable - `enterkeyhint` : - Hint for selecting an enter key action - `hidden` : - Whether the element is relevant - `inert` : - Whether the element is inert. - `inputmode` : - Hint for selecting an input modality - `is_` : - Creates a customized built-in element - - Valid custom element name of a defined customized built-in element - `itemid` : - Global identifier for a microdata item - - Valid URL potentially surrounded by spaces - `itemprop` : - Property names of a microdata item - `itemref` : - Referenced elements - `itemscope` : - Introduces a microdata item - `itemtype` : - Item types of a microdata item - `lang` : - Language of the element - - Valid BCP 47 language tag or the empty string - `nonce` : - Cryptographic nonce used in Content Security Policy checks [CSP] - `popover` : - Makes the element a popover element - `slot` : - The element's desired slot - `spellcheck` : - Whether the element is to have its spelling and grammar checked - `style` : - Presentational and formatting instructions - - CSS declarations* - `tabindex` : - Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation - `title` : - Advisory information for the element - `translate` : - Whether the element is to be translated when the page is localized - `writingsuggestions` : - Whether the element can offer writing suggestions or not. - """ #fmt: skip - super().__init__( - "wbr", - void_element=True, - attrs=attrs, - children=children - ) - if not (id is None or id is False): - self._process_attr("id", id) - if not (class_ is None or class_ is False): - self._process_attr("class", class_) - if not (accesskey is None or accesskey is False): - self._process_attr("accesskey", accesskey) - if not (autocapitalize is None or autocapitalize is False): - self._process_attr("autocapitalize", autocapitalize) - if not (autocorrect is None or autocorrect is False): - self._process_attr("autocorrect", autocorrect) - if not (autofocus is None or autofocus is False): - self._process_attr("autofocus", autofocus) - if not (contenteditable is None or contenteditable is False): - self._process_attr("contenteditable", contenteditable) - if not (dir is None or dir is False): - self._process_attr("dir", dir) - if not (draggable is None or draggable is False): - self._process_attr("draggable", draggable) - if not (enterkeyhint is None or enterkeyhint is False): - self._process_attr("enterkeyhint", enterkeyhint) - if not (hidden is None or hidden is False): - self._process_attr("hidden", hidden) - if not (inert is None or inert is False): - self._process_attr("inert", inert) - if not (inputmode is None or inputmode is False): - self._process_attr("inputmode", inputmode) - if not (is_ is None or is_ is False): - self._process_attr("is", is_) - if not (itemid is None or itemid is False): - self._process_attr("itemid", itemid) - if not (itemprop is None or itemprop is False): - self._process_attr("itemprop", itemprop) - if not (itemref is None or itemref is False): - self._process_attr("itemref", itemref) - if not (itemscope is None or itemscope is False): - self._process_attr("itemscope", itemscope) - if not (itemtype is None or itemtype is False): - self._process_attr("itemtype", itemtype) - if not (lang is None or lang is False): - self._process_attr("lang", lang) - if not (nonce is None or nonce is False): - self._process_attr("nonce", nonce) - if not (popover is None or popover is False): - self._process_attr("popover", popover) - if not (slot is None or slot is False): - self._process_attr("slot", slot) - if not (spellcheck is None or spellcheck is False): - self._process_attr("spellcheck", spellcheck) - if not (style is None or style is False): - self._process_attr("style", style) - if not (tabindex is None or tabindex is False): - self._process_attr("tabindex", tabindex) - if not (title is None or title is False): - self._process_attr("title", title) - if not (translate is None or translate is False): - self._process_attr("translate", translate) - if not (writingsuggestions is None or writingsuggestions is False): - self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/a_element.py b/tools/generated/elements/a_element.py new file mode 100644 index 0000000..52d0e36 --- /dev/null +++ b/tools/generated/elements/a_element.py @@ -0,0 +1,282 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class a(BaseElement): + """ + The 'a' element. + Description: Hyperlink + Categories: flow phrasing* interactive palpable + Parents: phrasing + Children: transparent* + Interface: HTMLAnchorElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a + """ # fmt: skip + tag = 'a' + categories = ['flow', 'phrasing*', 'interactive', 'palpable'] + class hint(GlobalAttrs, AnchorAttrs): + """ + Type hints for "a" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + download: Optional[str] = None, + href: Optional[str] = None, + hreflang: Optional[str] = None, + ping: Optional[Union[str, list]] = None, + referrerpolicy: Optional[str] = None, + rel: Optional[Union[str, list]] = None, + target: Optional[str] = None, + type: Optional[str] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'a' (Hyperlink) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `download` : + Whether to download the resource instead of navigating to it, and its filename if so + + `href` : + Address of the hyperlink + Valid URL potentially surrounded by spaces + + `hreflang` : + Language of the linked resource + Valid BCP 47 language tag + + `ping` : + URLs to ping + + `referrerpolicy` : + Referrer policy for fetches initiated by the element + Referrer policy + + `rel` : + Relationship between the location in the document containing the hyperlink and the destination resource + + `target` : + Navigable for hyperlink navigation + Valid navigable target name or keyword + + `type` : + Hint for the type of the referenced resource + Valid MIME type string + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "a", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (download is None or download is False): + self._process_attr("download", download) + if not (href is None or href is False): + self._process_attr("href", href) + if not (hreflang is None or hreflang is False): + self._process_attr("hreflang", hreflang) + if not (ping is None or ping is False): + self._process_attr("ping", ping) + if not (referrerpolicy is None or referrerpolicy is False): + self._process_attr("referrerpolicy", referrerpolicy) + if not (rel is None or rel is False): + self._process_attr("rel", rel) + if not (target is None or target is False): + self._process_attr("target", target) + if not (type is None or type is False): + self._process_attr("type", type) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/abbr_element.py b/tools/generated/elements/abbr_element.py new file mode 100644 index 0000000..92461d6 --- /dev/null +++ b/tools/generated/elements/abbr_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class abbr(BaseElement): + """ + The 'abbr' element. + Description: Abbreviation + Categories: flow phrasing palpable + Parents: phrasing + Children: phrasing + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/abbr + """ # fmt: skip + tag = 'abbr' + categories = ['flow', 'phrasing', 'palpable'] + class hint(GlobalAttrs): + """ + Type hints for "abbr" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'abbr' (Abbreviation) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/abbr + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "abbr", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/address_element.py b/tools/generated/elements/address_element.py new file mode 100644 index 0000000..7abda67 --- /dev/null +++ b/tools/generated/elements/address_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class address(BaseElement): + """ + The 'address' element. + Description: Contact information for a page or article element + Categories: flow palpable + Parents: flow + Children: flow* + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/address + """ # fmt: skip + tag = 'address' + categories = ['flow', 'palpable'] + class hint(GlobalAttrs): + """ + Type hints for "address" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'address' (Contact information for a page or article element) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/address + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "address", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/area_element.py b/tools/generated/elements/area_element.py new file mode 100644 index 0000000..4de1fa1 --- /dev/null +++ b/tools/generated/elements/area_element.py @@ -0,0 +1,287 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class area(BaseElement): + """ + The 'area' element. + Description: Hyperlink or dead area on an image map + Categories: flow phrasing + Parents: phrasing* + Children: empty + Interface: HTMLAreaElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/area + """ # fmt: skip + tag = 'area' + categories = ['flow', 'phrasing'] + class hint(GlobalAttrs, AreaAttrs): + """ + Type hints for "area" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + alt: Optional[str] = None, + coords: Optional[str] = None, + download: Optional[str] = None, + href: Optional[str] = None, + ping: Optional[Union[str, list]] = None, + referrerpolicy: Optional[str] = None, + rel: Optional[Union[str, list]] = None, + shape: Optional[Union[str, Literal['circle', 'default', 'poly', 'rect']]] = None, + target: Optional[str] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'area' (Hyperlink or dead area on an image map) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/area + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `alt` : + Replacement text for use when images are not available + + `coords` : + Coordinates for the shape to be created in an image map + Valid list of floating-point numbers* + + `download` : + Whether to download the resource instead of navigating to it, and its filename if so + + `href` : + Address of the hyperlink + Valid URL potentially surrounded by spaces + + `ping` : + URLs to ping + + `referrerpolicy` : + Referrer policy for fetches initiated by the element + Referrer policy + + `rel` : + Relationship between the location in the document containing the hyperlink and the destination resource + + `shape` : + The kind of shape to be created in an image map + + `target` : + Navigable for hyperlink navigation + Valid navigable target name or keyword + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "area", + void_element=True, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (alt is None or alt is False): + self._process_attr("alt", alt) + if not (coords is None or coords is False): + self._process_attr("coords", coords) + if not (download is None or download is False): + self._process_attr("download", download) + if not (href is None or href is False): + self._process_attr("href", href) + if not (ping is None or ping is False): + self._process_attr("ping", ping) + if not (referrerpolicy is None or referrerpolicy is False): + self._process_attr("referrerpolicy", referrerpolicy) + if not (rel is None or rel is False): + self._process_attr("rel", rel) + if not (shape is None or shape is False): + self._process_attr("shape", shape) + if not (target is None or target is False): + self._process_attr("target", target) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/article_element.py b/tools/generated/elements/article_element.py new file mode 100644 index 0000000..9676cef --- /dev/null +++ b/tools/generated/elements/article_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class article(BaseElement): + """ + The 'article' element. + Description: Self-contained syndicatable or reusable composition + Categories: flow sectioning palpable + Parents: flow + Children: flow + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/article + """ # fmt: skip + tag = 'article' + categories = ['flow', 'sectioning', 'palpable'] + class hint(GlobalAttrs): + """ + Type hints for "article" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'article' (Self-contained syndicatable or reusable composition) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/article + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "article", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/aside_element.py b/tools/generated/elements/aside_element.py new file mode 100644 index 0000000..ecd622a --- /dev/null +++ b/tools/generated/elements/aside_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class aside(BaseElement): + """ + The 'aside' element. + Description: Sidebar for tangentially related content + Categories: flow sectioning palpable + Parents: flow + Children: flow + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/aside + """ # fmt: skip + tag = 'aside' + categories = ['flow', 'sectioning', 'palpable'] + class hint(GlobalAttrs): + """ + Type hints for "aside" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'aside' (Sidebar for tangentially related content) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/aside + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "aside", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/audio_element.py b/tools/generated/elements/audio_element.py new file mode 100644 index 0000000..dce7808 --- /dev/null +++ b/tools/generated/elements/audio_element.py @@ -0,0 +1,272 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class audio(BaseElement): + """ + The 'audio' element. + Description: Audio player + Categories: flow phrasing embedded interactive palpable* + Parents: phrasing + Children: source* track* transparent* + Interface: HTMLAudioElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio + """ # fmt: skip + tag = 'audio' + categories = ['flow', 'phrasing', 'embedded', 'interactive', 'palpable*'] + class hint(GlobalAttrs, AudioAttrs): + """ + Type hints for "audio" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + autoplay: Optional[Union[str, bool]] = None, + controls: Optional[Union[str, bool]] = None, + crossorigin: Optional[Union[str, Literal['anonymous', 'use-credentials']]] = None, + loop: Optional[Union[str, bool]] = None, + muted: Optional[Union[str, bool]] = None, + preload: Optional[Union[str, Literal['none', 'metadata', 'auto']]] = None, + src: Optional[str] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'audio' (Audio player) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `autoplay` : + Hint that the media resource can be started automatically when the page is loaded + + `controls` : + Show user agent controls + + `crossorigin` : + How the element handles crossorigin requests + + `loop` : + Whether to loop the media resource + + `muted` : + Whether to mute the media resource by default + + `preload` : + Hints how much buffering the media resource will likely need + + `src` : + Address of the resource + Valid non-empty URL potentially surrounded by spaces + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "audio", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (autoplay is None or autoplay is False): + self._process_attr("autoplay", autoplay) + if not (controls is None or controls is False): + self._process_attr("controls", controls) + if not (crossorigin is None or crossorigin is False): + self._process_attr("crossorigin", crossorigin) + if not (loop is None or loop is False): + self._process_attr("loop", loop) + if not (muted is None or muted is False): + self._process_attr("muted", muted) + if not (preload is None or preload is False): + self._process_attr("preload", preload) + if not (src is None or src is False): + self._process_attr("src", src) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/b_element.py b/tools/generated/elements/b_element.py new file mode 100644 index 0000000..23700c2 --- /dev/null +++ b/tools/generated/elements/b_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class b(BaseElement): + """ + The 'b' element. + Description: Keywords + Categories: flow phrasing palpable + Parents: phrasing + Children: phrasing + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/b + """ # fmt: skip + tag = 'b' + categories = ['flow', 'phrasing', 'palpable'] + class hint(GlobalAttrs): + """ + Type hints for "b" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'b' (Keywords) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/b + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "b", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/base_element.py b/tools/generated/elements/base_element.py new file mode 100644 index 0000000..dcfb8b8 --- /dev/null +++ b/tools/generated/elements/base_element.py @@ -0,0 +1,243 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class base(BaseElement): + """ + The 'base' element. + Description: Base URL and default target navigable for hyperlinks and forms + Categories: metadata + Parents: head + Children: empty + Interface: HTMLBaseElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base + """ # fmt: skip + tag = 'base' + categories = ['metadata'] + class hint(GlobalAttrs, BaseAttrs): + """ + Type hints for "base" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + href: Optional[str] = None, + target: Optional[str] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'base' (Base URL and default target navigable for hyperlinks and forms) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `href` : + Document base URL + Valid URL potentially surrounded by spaces + + `target` : + Default navigable for hyperlink navigation and form submission + Valid navigable target name or keyword + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "base", + void_element=True, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (href is None or href is False): + self._process_attr("href", href) + if not (target is None or target is False): + self._process_attr("target", target) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/bdi_element.py b/tools/generated/elements/bdi_element.py new file mode 100644 index 0000000..2e9000d --- /dev/null +++ b/tools/generated/elements/bdi_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class bdi(BaseElement): + """ + The 'bdi' element. + Description: Text directionality isolation + Categories: flow phrasing palpable + Parents: phrasing + Children: phrasing + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/bdi + """ # fmt: skip + tag = 'bdi' + categories = ['flow', 'phrasing', 'palpable'] + class hint(GlobalAttrs): + """ + Type hints for "bdi" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'bdi' (Text directionality isolation) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/bdi + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "bdi", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/bdo_element.py b/tools/generated/elements/bdo_element.py new file mode 100644 index 0000000..d5c3acb --- /dev/null +++ b/tools/generated/elements/bdo_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class bdo(BaseElement): + """ + The 'bdo' element. + Description: Text directionality formatting + Categories: flow phrasing palpable + Parents: phrasing + Children: phrasing + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/bdo + """ # fmt: skip + tag = 'bdo' + categories = ['flow', 'phrasing', 'palpable'] + class hint(GlobalAttrs): + """ + Type hints for "bdo" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'bdo' (Text directionality formatting) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/bdo + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "bdo", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/blockquote_element.py b/tools/generated/elements/blockquote_element.py new file mode 100644 index 0000000..fffff34 --- /dev/null +++ b/tools/generated/elements/blockquote_element.py @@ -0,0 +1,236 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class blockquote(BaseElement): + """ + The 'blockquote' element. + Description: A section quoted from another source + Categories: flow palpable + Parents: flow + Children: flow + Interface: HTMLQuoteElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/blockquote + """ # fmt: skip + tag = 'blockquote' + categories = ['flow', 'palpable'] + class hint(GlobalAttrs, BlockquoteAttrs): + """ + Type hints for "blockquote" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + cite: Optional[str] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'blockquote' (A section quoted from another source) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/blockquote + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `cite` : + Link to the source of the quotation or more information about the edit + Valid URL potentially surrounded by spaces + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "blockquote", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (cite is None or cite is False): + self._process_attr("cite", cite) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/body_element.py b/tools/generated/elements/body_element.py new file mode 100644 index 0000000..60c2be2 --- /dev/null +++ b/tools/generated/elements/body_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class body(BaseElement): + """ + The 'body' element. + Description: Document body + Categories: none + Parents: html + Children: flow + Interface: HTMLBodyElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/body + """ # fmt: skip + tag = 'body' + categories = ['none'] + class hint(GlobalAttrs, BodyAttrs): + """ + Type hints for "body" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'body' (Document body) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/body + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "body", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/br_element.py b/tools/generated/elements/br_element.py new file mode 100644 index 0000000..5b150d1 --- /dev/null +++ b/tools/generated/elements/br_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class br(BaseElement): + """ + The 'br' element. + Description: Line break, e.g. in poem or postal address + Categories: flow phrasing + Parents: phrasing + Children: empty + Interface: HTMLBRElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/br + """ # fmt: skip + tag = 'br' + categories = ['flow', 'phrasing'] + class hint(GlobalAttrs): + """ + Type hints for "br" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'br' (Line break, e.g. in poem or postal address) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/br + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "br", + void_element=True, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/button_element.py b/tools/generated/elements/button_element.py new file mode 100644 index 0000000..e7c9329 --- /dev/null +++ b/tools/generated/elements/button_element.py @@ -0,0 +1,305 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class button(BaseElement): + """ + The 'button' element. + Description: Button control + Categories: flow phrasing interactive listed labelable submittable form-associated palpable + Parents: phrasing + Children: phrasing* + Interface: HTMLButtonElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button + """ # fmt: skip + tag = 'button' + categories = ['flow', 'phrasing', 'interactive', 'listed', 'labelable', 'submittable', 'form-associated', 'palpable'] + class hint(GlobalAttrs, ButtonAttrs): + """ + Type hints for "button" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + disabled: Optional[Union[str, bool]] = None, + form: Optional[str] = None, + formaction: Optional[str] = None, + formenctype: Optional[Union[str, Literal['application/x-www-form-urlencoded', 'multipart/form-data', 'text/plain']]] = None, + formmethod: Optional[Union[str, Literal['GET', 'POST', 'dialog']]] = None, + formnovalidate: Optional[Union[str, bool]] = None, + formtarget: Optional[str] = None, + name: Optional[str] = None, + popovertarget: Optional[str] = None, + popovertargetaction: Optional[Union[str, Literal['toggle', 'show', 'hide']]] = None, + type: Optional[Union[str, Literal['submit', 'reset', 'button']]] = None, + value: Optional[str] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'button' (Button control) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `disabled` : + Whether the form control is disabled + + `form` : + Associates the element with a form element + ID* + + `formaction` : + URL to use for form submission + Valid non-empty URL potentially surrounded by spaces + + `formenctype` : + Entry list encoding type to use for form submission + + `formmethod` : + Variant to use for form submission + + `formnovalidate` : + Bypass form control validation for form submission + + `formtarget` : + Navigable for form submission + Valid navigable target name or keyword + + `name` : + Name of the element to use for form submission and in the form.elements API + + `popovertarget` : + Targets a popover element to toggle, show, or hide + ID* + + `popovertargetaction` : + Indicates whether a targeted popover element is to be toggled, shown, or hidden + + `type` : + Type of button + + `value` : + Value to be used for form submission + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "button", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (disabled is None or disabled is False): + self._process_attr("disabled", disabled) + if not (form is None or form is False): + self._process_attr("form", form) + if not (formaction is None or formaction is False): + self._process_attr("formaction", formaction) + if not (formenctype is None or formenctype is False): + self._process_attr("formenctype", formenctype) + if not (formmethod is None or formmethod is False): + self._process_attr("formmethod", formmethod) + if not (formnovalidate is None or formnovalidate is False): + self._process_attr("formnovalidate", formnovalidate) + if not (formtarget is None or formtarget is False): + self._process_attr("formtarget", formtarget) + if not (name is None or name is False): + self._process_attr("name", name) + if not (popovertarget is None or popovertarget is False): + self._process_attr("popovertarget", popovertarget) + if not (popovertargetaction is None or popovertargetaction is False): + self._process_attr("popovertargetaction", popovertargetaction) + if not (type is None or type is False): + self._process_attr("type", type) + if not (value is None or value is False): + self._process_attr("value", value) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/canvas_element.py b/tools/generated/elements/canvas_element.py new file mode 100644 index 0000000..11a0bef --- /dev/null +++ b/tools/generated/elements/canvas_element.py @@ -0,0 +1,241 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class canvas(BaseElement): + """ + The 'canvas' element. + Description: Scriptable bitmap canvas + Categories: flow phrasing embedded palpable + Parents: phrasing + Children: transparent + Interface: HTMLCanvasElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas + """ # fmt: skip + tag = 'canvas' + categories = ['flow', 'phrasing', 'embedded', 'palpable'] + class hint(GlobalAttrs, CanvasAttrs): + """ + Type hints for "canvas" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + height: Optional[Union[str, int]] = None, + width: Optional[Union[str, int]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'canvas' (Scriptable bitmap canvas) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `height` : + Vertical dimension + + `width` : + Horizontal dimension + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "canvas", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (height is None or height is False): + self._process_attr("height", height) + if not (width is None or width is False): + self._process_attr("width", width) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/caption_element.py b/tools/generated/elements/caption_element.py new file mode 100644 index 0000000..bba2f18 --- /dev/null +++ b/tools/generated/elements/caption_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class caption(BaseElement): + """ + The 'caption' element. + Description: Table caption + Categories: none + Parents: table + Children: flow* + Interface: HTMLTableCaptionElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/caption + """ # fmt: skip + tag = 'caption' + categories = ['none'] + class hint(GlobalAttrs): + """ + Type hints for "caption" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'caption' (Table caption) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/caption + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "caption", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/cite_element.py b/tools/generated/elements/cite_element.py new file mode 100644 index 0000000..d4d2b95 --- /dev/null +++ b/tools/generated/elements/cite_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class cite(BaseElement): + """ + The 'cite' element. + Description: Title of a work + Categories: flow phrasing palpable + Parents: phrasing + Children: phrasing + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/cite + """ # fmt: skip + tag = 'cite' + categories = ['flow', 'phrasing', 'palpable'] + class hint(GlobalAttrs): + """ + Type hints for "cite" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'cite' (Title of a work) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/cite + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "cite", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/code_element.py b/tools/generated/elements/code_element.py new file mode 100644 index 0000000..a4d10be --- /dev/null +++ b/tools/generated/elements/code_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class code(BaseElement): + """ + The 'code' element. + Description: Computer code + Categories: flow phrasing palpable + Parents: phrasing + Children: phrasing + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/code + """ # fmt: skip + tag = 'code' + categories = ['flow', 'phrasing', 'palpable'] + class hint(GlobalAttrs): + """ + Type hints for "code" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'code' (Computer code) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/code + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "code", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/col_element.py b/tools/generated/elements/col_element.py new file mode 100644 index 0000000..1fda04d --- /dev/null +++ b/tools/generated/elements/col_element.py @@ -0,0 +1,236 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class col(BaseElement): + """ + The 'col' element. + Description: Table column + Categories: none + Parents: colgroup + Children: empty + Interface: HTMLTableColElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col + """ # fmt: skip + tag = 'col' + categories = ['none'] + class hint(GlobalAttrs, ColAttrs): + """ + Type hints for "col" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + span: Optional[str] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'col' (Table column) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `span` : + Number of columns spanned by the element + Valid non-negative integer greater than zero + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "col", + void_element=True, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (span is None or span is False): + self._process_attr("span", span) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/colgroup_element.py b/tools/generated/elements/colgroup_element.py new file mode 100644 index 0000000..2d8b159 --- /dev/null +++ b/tools/generated/elements/colgroup_element.py @@ -0,0 +1,236 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class colgroup(BaseElement): + """ + The 'colgroup' element. + Description: Group of columns in a table + Categories: none + Parents: table + Children: col* template* + Interface: HTMLTableColElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/colgroup + """ # fmt: skip + tag = 'colgroup' + categories = ['none'] + class hint(GlobalAttrs, ColgroupAttrs): + """ + Type hints for "colgroup" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + span: Optional[str] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'colgroup' (Group of columns in a table) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/colgroup + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `span` : + Number of columns spanned by the element + Valid non-negative integer greater than zero + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "colgroup", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (span is None or span is False): + self._process_attr("span", span) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/data_element.py b/tools/generated/elements/data_element.py new file mode 100644 index 0000000..aec219f --- /dev/null +++ b/tools/generated/elements/data_element.py @@ -0,0 +1,235 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class data(BaseElement): + """ + The 'data' element. + Description: Machine-readable equivalent + Categories: flow phrasing palpable + Parents: phrasing + Children: phrasing + Interface: HTMLDataElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/data + """ # fmt: skip + tag = 'data' + categories = ['flow', 'phrasing', 'palpable'] + class hint(GlobalAttrs, DataAttrs): + """ + Type hints for "data" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + value: Optional[str] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'data' (Machine-readable equivalent) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/data + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `value` : + Machine-readable value + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "data", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (value is None or value is False): + self._process_attr("value", value) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/datalist_element.py b/tools/generated/elements/datalist_element.py new file mode 100644 index 0000000..a78cb09 --- /dev/null +++ b/tools/generated/elements/datalist_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class datalist(BaseElement): + """ + The 'datalist' element. + Description: Container for options for combo box control + Categories: flow phrasing + Parents: phrasing + Children: phrasing* option* script-supporting elements* + Interface: HTMLDataListElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/datalist + """ # fmt: skip + tag = 'datalist' + categories = ['flow', 'phrasing'] + class hint(GlobalAttrs): + """ + Type hints for "datalist" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'datalist' (Container for options for combo box control) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/datalist + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "datalist", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/dd_element.py b/tools/generated/elements/dd_element.py new file mode 100644 index 0000000..50a2e24 --- /dev/null +++ b/tools/generated/elements/dd_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class dd(BaseElement): + """ + The 'dd' element. + Description: Content for corresponding dt element(s) + Categories: none + Parents: dl div* + Children: flow + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dd + """ # fmt: skip + tag = 'dd' + categories = ['none'] + class hint(GlobalAttrs): + """ + Type hints for "dd" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'dd' (Content for corresponding dt element(s)) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dd + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "dd", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/del__element.py b/tools/generated/elements/del__element.py new file mode 100644 index 0000000..f1618da --- /dev/null +++ b/tools/generated/elements/del__element.py @@ -0,0 +1,243 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class del_(BaseElement): + """ + The 'del' element. + Description: A removal from the document + Categories: flow phrasing* palpable + Parents: phrasing + Children: transparent + Interface: HTMLModElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/del + """ # fmt: skip + tag = 'del' + categories = ['flow', 'phrasing*', 'palpable'] + class hint(GlobalAttrs, DelAttrs): + """ + Type hints for "del" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + cite: Optional[str] = None, + datetime: Optional[str] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'del' (A removal from the document) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/del + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `cite` : + Link to the source of the quotation or more information about the edit + Valid URL potentially surrounded by spaces + + `datetime` : + Date and (optionally) time of the change + Valid date string with optional time + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "del", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (cite is None or cite is False): + self._process_attr("cite", cite) + if not (datetime is None or datetime is False): + self._process_attr("datetime", datetime) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/details_element.py b/tools/generated/elements/details_element.py new file mode 100644 index 0000000..7b2c9f4 --- /dev/null +++ b/tools/generated/elements/details_element.py @@ -0,0 +1,241 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class details(BaseElement): + """ + The 'details' element. + Description: Disclosure control for hiding details + Categories: flow interactive palpable + Parents: flow + Children: summary* flow + Interface: HTMLDetailsElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details + """ # fmt: skip + tag = 'details' + categories = ['flow', 'interactive', 'palpable'] + class hint(GlobalAttrs, DetailsAttrs): + """ + Type hints for "details" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + name: Optional[str] = None, + open: Optional[Union[str, bool]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'details' (Disclosure control for hiding details) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `name` : + Name of group of mutually-exclusive details elements + + `open` : + Whether the details are visible + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "details", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (name is None or name is False): + self._process_attr("name", name) + if not (open is None or open is False): + self._process_attr("open", open) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/dfn_element.py b/tools/generated/elements/dfn_element.py new file mode 100644 index 0000000..1b2f95b --- /dev/null +++ b/tools/generated/elements/dfn_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class dfn(BaseElement): + """ + The 'dfn' element. + Description: Defining instance + Categories: flow phrasing palpable + Parents: phrasing + Children: phrasing* + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dfn + """ # fmt: skip + tag = 'dfn' + categories = ['flow', 'phrasing', 'palpable'] + class hint(GlobalAttrs): + """ + Type hints for "dfn" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'dfn' (Defining instance) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dfn + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "dfn", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/dialog_element.py b/tools/generated/elements/dialog_element.py new file mode 100644 index 0000000..92c9670 --- /dev/null +++ b/tools/generated/elements/dialog_element.py @@ -0,0 +1,235 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class dialog(BaseElement): + """ + The 'dialog' element. + Description: Dialog box or window + Categories: flow + Parents: flow + Children: flow + Interface: HTMLDialogElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog + """ # fmt: skip + tag = 'dialog' + categories = ['flow'] + class hint(GlobalAttrs, DialogAttrs): + """ + Type hints for "dialog" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + open: Optional[Union[str, bool]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'dialog' (Dialog box or window) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `open` : + Whether the dialog box is showing + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "dialog", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (open is None or open is False): + self._process_attr("open", open) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/div_element.py b/tools/generated/elements/div_element.py new file mode 100644 index 0000000..d9d58d9 --- /dev/null +++ b/tools/generated/elements/div_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class div(BaseElement): + """ + The 'div' element. + Description: Generic flow container, or container for name-value groups in dl elements + Categories: flow palpable + Parents: flow dl + Children: flow + Interface: HTMLDivElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/div + """ # fmt: skip + tag = 'div' + categories = ['flow', 'palpable'] + class hint(GlobalAttrs): + """ + Type hints for "div" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'div' (Generic flow container, or container for name-value groups in dl elements) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/div + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "div", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/dl_element.py b/tools/generated/elements/dl_element.py new file mode 100644 index 0000000..7041630 --- /dev/null +++ b/tools/generated/elements/dl_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class dl(BaseElement): + """ + The 'dl' element. + Description: Association list consisting of zero or more name-value groups + Categories: flow palpable + Parents: flow + Children: dt* dd* div* script-supporting elements + Interface: HTMLDListElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dl + """ # fmt: skip + tag = 'dl' + categories = ['flow', 'palpable'] + class hint(GlobalAttrs): + """ + Type hints for "dl" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'dl' (Association list consisting of zero or more name-value groups) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dl + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "dl", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/dt_element.py b/tools/generated/elements/dt_element.py new file mode 100644 index 0000000..adfcc38 --- /dev/null +++ b/tools/generated/elements/dt_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class dt(BaseElement): + """ + The 'dt' element. + Description: Legend for corresponding dd element(s) + Categories: none + Parents: dl div* + Children: flow* + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dt + """ # fmt: skip + tag = 'dt' + categories = ['none'] + class hint(GlobalAttrs): + """ + Type hints for "dt" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'dt' (Legend for corresponding dd element(s)) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dt + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "dt", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/em_element.py b/tools/generated/elements/em_element.py new file mode 100644 index 0000000..fd40076 --- /dev/null +++ b/tools/generated/elements/em_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class em(BaseElement): + """ + The 'em' element. + Description: Stress emphasis + Categories: flow phrasing palpable + Parents: phrasing + Children: phrasing + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/em + """ # fmt: skip + tag = 'em' + categories = ['flow', 'phrasing', 'palpable'] + class hint(GlobalAttrs): + """ + Type hints for "em" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'em' (Stress emphasis) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/em + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "em", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/embed_element.py b/tools/generated/elements/embed_element.py new file mode 100644 index 0000000..5d2bd20 --- /dev/null +++ b/tools/generated/elements/embed_element.py @@ -0,0 +1,255 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class embed(BaseElement): + """ + The 'embed' element. + Description: Plugin + Categories: flow phrasing embedded interactive palpable + Parents: phrasing + Children: empty + Interface: HTMLEmbedElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/embed + """ # fmt: skip + tag = 'embed' + categories = ['flow', 'phrasing', 'embedded', 'interactive', 'palpable'] + class hint(GlobalAttrs, EmbedAttrs): + """ + Type hints for "embed" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + height: Optional[Union[str, int]] = None, + src: Optional[str] = None, + type: Optional[str] = None, + width: Optional[Union[str, int]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'embed' (Plugin) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/embed + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `height` : + Vertical dimension + + `src` : + Address of the resource + Valid non-empty URL potentially surrounded by spaces + + `type` : + Type of embedded resource + Valid MIME type string + + `width` : + Horizontal dimension + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "embed", + void_element=True, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (height is None or height is False): + self._process_attr("height", height) + if not (src is None or src is False): + self._process_attr("src", src) + if not (type is None or type is False): + self._process_attr("type", type) + if not (width is None or width is False): + self._process_attr("width", width) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/fieldset_element.py b/tools/generated/elements/fieldset_element.py new file mode 100644 index 0000000..04ca89a --- /dev/null +++ b/tools/generated/elements/fieldset_element.py @@ -0,0 +1,248 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class fieldset(BaseElement): + """ + The 'fieldset' element. + Description: Group of form controls + Categories: flow listed form-associated palpable + Parents: flow + Children: legend* flow + Interface: HTMLFieldSetElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fieldset + """ # fmt: skip + tag = 'fieldset' + categories = ['flow', 'listed', 'form-associated', 'palpable'] + class hint(GlobalAttrs, FieldsetAttrs): + """ + Type hints for "fieldset" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + disabled: Optional[Union[str, bool]] = None, + form: Optional[str] = None, + name: Optional[str] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'fieldset' (Group of form controls) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fieldset + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `disabled` : + Whether the descendant form controls, except any inside legend, are disabled + + `form` : + Associates the element with a form element + ID* + + `name` : + Name of the element to use for form submission and in the form.elements API + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "fieldset", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (disabled is None or disabled is False): + self._process_attr("disabled", disabled) + if not (form is None or form is False): + self._process_attr("form", form) + if not (name is None or name is False): + self._process_attr("name", name) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/figcaption_element.py b/tools/generated/elements/figcaption_element.py new file mode 100644 index 0000000..95bddc1 --- /dev/null +++ b/tools/generated/elements/figcaption_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class figcaption(BaseElement): + """ + The 'figcaption' element. + Description: Caption for figure + Categories: none + Parents: figure + Children: flow + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/figcaption + """ # fmt: skip + tag = 'figcaption' + categories = ['none'] + class hint(GlobalAttrs): + """ + Type hints for "figcaption" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'figcaption' (Caption for figure) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/figcaption + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "figcaption", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/figure_element.py b/tools/generated/elements/figure_element.py new file mode 100644 index 0000000..9f5cfb9 --- /dev/null +++ b/tools/generated/elements/figure_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class figure(BaseElement): + """ + The 'figure' element. + Description: Figure with optional caption + Categories: flow palpable + Parents: flow + Children: figcaption* flow + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/figure + """ # fmt: skip + tag = 'figure' + categories = ['flow', 'palpable'] + class hint(GlobalAttrs): + """ + Type hints for "figure" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'figure' (Figure with optional caption) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/figure + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "figure", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/footer_element.py b/tools/generated/elements/footer_element.py new file mode 100644 index 0000000..9f7e927 --- /dev/null +++ b/tools/generated/elements/footer_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class footer(BaseElement): + """ + The 'footer' element. + Description: Footer for a page or section + Categories: flow palpable + Parents: flow + Children: flow* + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/footer + """ # fmt: skip + tag = 'footer' + categories = ['flow', 'palpable'] + class hint(GlobalAttrs): + """ + Type hints for "footer" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'footer' (Footer for a page or section) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/footer + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "footer", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/form_element.py b/tools/generated/elements/form_element.py new file mode 100644 index 0000000..4e71713 --- /dev/null +++ b/tools/generated/elements/form_element.py @@ -0,0 +1,280 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class form(BaseElement): + """ + The 'form' element. + Description: User-submittable form + Categories: flow palpable + Parents: flow + Children: flow* + Interface: HTMLFormElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form + """ # fmt: skip + tag = 'form' + categories = ['flow', 'palpable'] + class hint(GlobalAttrs, FormAttrs): + """ + Type hints for "form" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accept_charset: Optional[str] = None, + action: Optional[str] = None, + autocomplete: Optional[Union[str, Literal['on', 'off']]] = None, + enctype: Optional[Union[str, Literal['application/x-www-form-urlencoded', 'multipart/form-data', 'text/plain']]] = None, + method: Optional[Union[str, Literal['GET', 'POST', 'dialog']]] = None, + name: Optional[str] = None, + novalidate: Optional[Union[str, bool]] = None, + target: Optional[str] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'form' (User-submittable form) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accept_charset` : + Character encodings to use for form submission + ASCII case-insensitive match for "UTF-8" + + `action` : + URL to use for form submission + Valid non-empty URL potentially surrounded by spaces + + `autocomplete` : + Default setting for autofill feature for controls in the form + + `enctype` : + Entry list encoding type to use for form submission + + `method` : + Variant to use for form submission + + `name` : + Name of form to use in the document.forms API + + `novalidate` : + Bypass form control validation for form submission + + `target` : + Navigable for form submission + Valid navigable target name or keyword + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "form", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accept_charset is None or accept_charset is False): + self._process_attr("accept-charset", accept_charset) + if not (action is None or action is False): + self._process_attr("action", action) + if not (autocomplete is None or autocomplete is False): + self._process_attr("autocomplete", autocomplete) + if not (enctype is None or enctype is False): + self._process_attr("enctype", enctype) + if not (method is None or method is False): + self._process_attr("method", method) + if not (name is None or name is False): + self._process_attr("name", name) + if not (novalidate is None or novalidate is False): + self._process_attr("novalidate", novalidate) + if not (target is None or target is False): + self._process_attr("target", target) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/h1_element.py b/tools/generated/elements/h1_element.py new file mode 100644 index 0000000..4916707 --- /dev/null +++ b/tools/generated/elements/h1_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class h1(BaseElement): + """ + The 'h1' element. + Description: Heading + Categories: flow heading palpable + Parents: legend summary flow + Children: phrasing + Interface: HTMLHeadingElement + Documentation: None + """ # fmt: skip + tag = 'h1' + categories = ['flow', 'heading', 'palpable'] + class hint(GlobalAttrs): + """ + Type hints for "h1" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'h1' (Heading) element. + Documentation: None + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "h1", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/h2_element.py b/tools/generated/elements/h2_element.py new file mode 100644 index 0000000..cfaf800 --- /dev/null +++ b/tools/generated/elements/h2_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class h2(BaseElement): + """ + The 'h2' element. + Description: Heading + Categories: flow heading palpable + Parents: legend summary flow + Children: phrasing + Interface: HTMLHeadingElement + Documentation: None + """ # fmt: skip + tag = 'h2' + categories = ['flow', 'heading', 'palpable'] + class hint(GlobalAttrs): + """ + Type hints for "h2" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'h2' (Heading) element. + Documentation: None + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "h2", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/h3_element.py b/tools/generated/elements/h3_element.py new file mode 100644 index 0000000..cb3c40e --- /dev/null +++ b/tools/generated/elements/h3_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class h3(BaseElement): + """ + The 'h3' element. + Description: Heading + Categories: flow heading palpable + Parents: legend summary flow + Children: phrasing + Interface: HTMLHeadingElement + Documentation: None + """ # fmt: skip + tag = 'h3' + categories = ['flow', 'heading', 'palpable'] + class hint(GlobalAttrs): + """ + Type hints for "h3" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'h3' (Heading) element. + Documentation: None + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "h3", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/h4_element.py b/tools/generated/elements/h4_element.py new file mode 100644 index 0000000..78faa6d --- /dev/null +++ b/tools/generated/elements/h4_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class h4(BaseElement): + """ + The 'h4' element. + Description: Heading + Categories: flow heading palpable + Parents: legend summary flow + Children: phrasing + Interface: HTMLHeadingElement + Documentation: None + """ # fmt: skip + tag = 'h4' + categories = ['flow', 'heading', 'palpable'] + class hint(GlobalAttrs): + """ + Type hints for "h4" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'h4' (Heading) element. + Documentation: None + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "h4", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/h5_element.py b/tools/generated/elements/h5_element.py new file mode 100644 index 0000000..081bbdb --- /dev/null +++ b/tools/generated/elements/h5_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class h5(BaseElement): + """ + The 'h5' element. + Description: Heading + Categories: flow heading palpable + Parents: legend summary flow + Children: phrasing + Interface: HTMLHeadingElement + Documentation: None + """ # fmt: skip + tag = 'h5' + categories = ['flow', 'heading', 'palpable'] + class hint(GlobalAttrs): + """ + Type hints for "h5" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'h5' (Heading) element. + Documentation: None + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "h5", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/h6_element.py b/tools/generated/elements/h6_element.py new file mode 100644 index 0000000..d2640af --- /dev/null +++ b/tools/generated/elements/h6_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class h6(BaseElement): + """ + The 'h6' element. + Description: Heading + Categories: flow heading palpable + Parents: legend summary flow + Children: phrasing + Interface: HTMLHeadingElement + Documentation: None + """ # fmt: skip + tag = 'h6' + categories = ['flow', 'heading', 'palpable'] + class hint(GlobalAttrs): + """ + Type hints for "h6" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'h6' (Heading) element. + Documentation: None + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "h6", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/head_element.py b/tools/generated/elements/head_element.py new file mode 100644 index 0000000..9863122 --- /dev/null +++ b/tools/generated/elements/head_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class head(BaseElement): + """ + The 'head' element. + Description: Container for document metadata + Categories: none + Parents: html + Children: metadata content* + Interface: HTMLHeadElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/head + """ # fmt: skip + tag = 'head' + categories = ['none'] + class hint(GlobalAttrs): + """ + Type hints for "head" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'head' (Container for document metadata) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/head + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "head", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/header_element.py b/tools/generated/elements/header_element.py new file mode 100644 index 0000000..f781b3c --- /dev/null +++ b/tools/generated/elements/header_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class header(BaseElement): + """ + The 'header' element. + Description: Introductory or navigational aids for a page or section + Categories: flow palpable + Parents: flow + Children: flow* + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/header + """ # fmt: skip + tag = 'header' + categories = ['flow', 'palpable'] + class hint(GlobalAttrs): + """ + Type hints for "header" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'header' (Introductory or navigational aids for a page or section) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/header + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "header", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/hgroup_element.py b/tools/generated/elements/hgroup_element.py new file mode 100644 index 0000000..ebbbe31 --- /dev/null +++ b/tools/generated/elements/hgroup_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class hgroup(BaseElement): + """ + The 'hgroup' element. + Description: Heading container + Categories: flow palpable + Parents: legend summary flow + Children: h1 h2 h3 h4 h5 h6 script-supporting elements + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/hgroup + """ # fmt: skip + tag = 'hgroup' + categories = ['flow', 'palpable'] + class hint(GlobalAttrs): + """ + Type hints for "hgroup" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'hgroup' (Heading container) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/hgroup + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "hgroup", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/hr_element.py b/tools/generated/elements/hr_element.py new file mode 100644 index 0000000..078e6d3 --- /dev/null +++ b/tools/generated/elements/hr_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class hr(BaseElement): + """ + The 'hr' element. + Description: Thematic break + Categories: flow + Parents: flow + Children: empty + Interface: HTMLHRElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/hr + """ # fmt: skip + tag = 'hr' + categories = ['flow'] + class hint(GlobalAttrs): + """ + Type hints for "hr" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'hr' (Thematic break) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/hr + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "hr", + void_element=True, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/html_element.py b/tools/generated/elements/html_element.py new file mode 100644 index 0000000..9d8eb83 --- /dev/null +++ b/tools/generated/elements/html_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class html(BaseElement): + """ + The 'html' element. + Description: Root element + Categories: none + Parents: none* + Children: head* body* + Interface: HTMLHtmlElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/html + """ # fmt: skip + tag = 'html' + categories = ['none'] + class hint(GlobalAttrs): + """ + Type hints for "html" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'html' (Root element) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/html + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "html", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/i_element.py b/tools/generated/elements/i_element.py new file mode 100644 index 0000000..fd2039c --- /dev/null +++ b/tools/generated/elements/i_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class i(BaseElement): + """ + The 'i' element. + Description: Alternate voice + Categories: flow phrasing palpable + Parents: phrasing + Children: phrasing + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/i + """ # fmt: skip + tag = 'i' + categories = ['flow', 'phrasing', 'palpable'] + class hint(GlobalAttrs): + """ + Type hints for "i" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'i' (Alternate voice) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/i + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "i", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/iframe_element.py b/tools/generated/elements/iframe_element.py new file mode 100644 index 0000000..7370d35 --- /dev/null +++ b/tools/generated/elements/iframe_element.py @@ -0,0 +1,294 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class iframe(BaseElement): + """ + The 'iframe' element. + Description: Child navigable + Categories: flow phrasing embedded interactive palpable + Parents: phrasing + Children: empty + Interface: HTMLIFrameElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe + """ # fmt: skip + tag = 'iframe' + categories = ['flow', 'phrasing', 'embedded', 'interactive', 'palpable'] + class hint(GlobalAttrs, IframeAttrs): + """ + Type hints for "iframe" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + allow: Optional[str] = None, + allowfullscreen: Optional[Union[str, bool]] = None, + height: Optional[Union[str, int]] = None, + loading: Optional[Union[str, Literal['lazy', 'eager']]] = None, + name: Optional[str] = None, + referrerpolicy: Optional[str] = None, + sandbox: Optional[Union[str, list]] = None, + src: Optional[str] = None, + srcdoc: Optional[str] = None, + width: Optional[Union[str, int]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'iframe' (Child navigable) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `allow` : + Permissions policy to be applied to the iframe's contents + Serialized permissions policy + + `allowfullscreen` : + Whether to allow the iframe's contents to use requestFullscreen() + + `height` : + Vertical dimension + + `loading` : + Used when determining loading deferral + + `name` : + Name of content navigable + Valid navigable target name or keyword + + `referrerpolicy` : + Referrer policy for fetches initiated by the element + Referrer policy + + `sandbox` : + Security rules for nested content + + `src` : + Address of the resource + Valid non-empty URL potentially surrounded by spaces + + `srcdoc` : + A document to render in the iframe + The source of an iframe srcdoc document* + + `width` : + Horizontal dimension + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "iframe", + void_element=True, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (allow is None or allow is False): + self._process_attr("allow", allow) + if not (allowfullscreen is None or allowfullscreen is False): + self._process_attr("allowfullscreen", allowfullscreen) + if not (height is None or height is False): + self._process_attr("height", height) + if not (loading is None or loading is False): + self._process_attr("loading", loading) + if not (name is None or name is False): + self._process_attr("name", name) + if not (referrerpolicy is None or referrerpolicy is False): + self._process_attr("referrerpolicy", referrerpolicy) + if not (sandbox is None or sandbox is False): + self._process_attr("sandbox", sandbox) + if not (src is None or src is False): + self._process_attr("src", src) + if not (srcdoc is None or srcdoc is False): + self._process_attr("srcdoc", srcdoc) + if not (width is None or width is False): + self._process_attr("width", width) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/img_element.py b/tools/generated/elements/img_element.py new file mode 100644 index 0000000..b23a769 --- /dev/null +++ b/tools/generated/elements/img_element.py @@ -0,0 +1,312 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class img(BaseElement): + """ + The 'img' element. + Description: Image + Categories: flow phrasing embedded interactive* form-associated palpable + Parents: phrasing picture + Children: empty + Interface: HTMLImageElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img + """ # fmt: skip + tag = 'img' + categories = ['flow', 'phrasing', 'embedded', 'interactive*', 'form-associated', 'palpable'] + class hint(GlobalAttrs, ImgAttrs): + """ + Type hints for "img" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + alt: Optional[str] = None, + crossorigin: Optional[Union[str, Literal['anonymous', 'use-credentials']]] = None, + decoding: Optional[Union[str, Literal['sync', 'async', 'auto']]] = None, + fetchpriority: Optional[Union[str, Literal['auto', 'high', 'low']]] = None, + height: Optional[Union[str, int]] = None, + ismap: Optional[Union[str, bool]] = None, + loading: Optional[Union[str, Literal['lazy', 'eager']]] = None, + referrerpolicy: Optional[str] = None, + sizes: Optional[str] = None, + src: Optional[str] = None, + srcset: Optional[str] = None, + usemap: Optional[str] = None, + width: Optional[Union[str, int]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'img' (Image) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `alt` : + Replacement text for use when images are not available + + `crossorigin` : + How the element handles crossorigin requests + + `decoding` : + Decoding hint to use when processing this image for presentation + + `fetchpriority` : + Sets the priority for fetches initiated by the element + + `height` : + Vertical dimension + + `ismap` : + Whether the image is a server-side image map + + `loading` : + Used when determining loading deferral + + `referrerpolicy` : + Referrer policy for fetches initiated by the element + Referrer policy + + `sizes` : + Image sizes for different page layouts + Valid source size list + + `src` : + Address of the resource + Valid non-empty URL potentially surrounded by spaces + + `srcset` : + Images to use in different situations, e.g., high-resolution displays, small monitors, etc. + Comma-separated list of image candidate strings + + `usemap` : + Name of image map to use + Valid hash-name reference* + + `width` : + Horizontal dimension + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "img", + void_element=True, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (alt is None or alt is False): + self._process_attr("alt", alt) + if not (crossorigin is None or crossorigin is False): + self._process_attr("crossorigin", crossorigin) + if not (decoding is None or decoding is False): + self._process_attr("decoding", decoding) + if not (fetchpriority is None or fetchpriority is False): + self._process_attr("fetchpriority", fetchpriority) + if not (height is None or height is False): + self._process_attr("height", height) + if not (ismap is None or ismap is False): + self._process_attr("ismap", ismap) + if not (loading is None or loading is False): + self._process_attr("loading", loading) + if not (referrerpolicy is None or referrerpolicy is False): + self._process_attr("referrerpolicy", referrerpolicy) + if not (sizes is None or sizes is False): + self._process_attr("sizes", sizes) + if not (src is None or src is False): + self._process_attr("src", src) + if not (srcset is None or srcset is False): + self._process_attr("srcset", srcset) + if not (usemap is None or usemap is False): + self._process_attr("usemap", usemap) + if not (width is None or width is False): + self._process_attr("width", width) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/input_element.py b/tools/generated/elements/input_element.py new file mode 100644 index 0000000..ff345be --- /dev/null +++ b/tools/generated/elements/input_element.py @@ -0,0 +1,447 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class input(BaseElement): # type: ignore[misc] + """ + The 'input' element. + Description: Form control + Categories: flow phrasing interactive* listed labelable submittable resettable form-associated palpable* + Parents: phrasing + Children: empty + Interface: HTMLInputElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input + """ # fmt: skip + tag = 'input' + categories = ['flow', 'phrasing', 'interactive*', 'listed', 'labelable', 'submittable', 'resettable', 'form-associated', 'palpable*'] + class hint(GlobalAttrs, InputAttrs): + """ + Type hints for "input" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accept: Optional[str] = None, + alpha: Optional[Union[str, bool]] = None, + alt: Optional[str] = None, + autocomplete: Optional[str] = None, + checked: Optional[Union[str, bool]] = None, + colorspace: Optional[Union[str, Literal['limited-srgb', 'display-p3']]] = None, + dirname: Optional[str] = None, + disabled: Optional[Union[str, bool]] = None, + form: Optional[str] = None, + formaction: Optional[str] = None, + formenctype: Optional[Union[str, Literal['application/x-www-form-urlencoded', 'multipart/form-data', 'text/plain']]] = None, + formmethod: Optional[Union[str, Literal['GET', 'POST', 'dialog']]] = None, + formnovalidate: Optional[Union[str, bool]] = None, + formtarget: Optional[str] = None, + height: Optional[Union[str, int]] = None, + list: Optional[str] = None, + max: Optional[str] = None, + maxlength: Optional[Union[str, int]] = None, + min: Optional[str] = None, + minlength: Optional[Union[str, int]] = None, + multiple: Optional[Union[str, bool]] = None, + name: Optional[str] = None, + pattern: Optional[str] = None, + placeholder: Optional[str] = None, + popovertarget: Optional[str] = None, + popovertargetaction: Optional[Union[str, Literal['toggle', 'show', 'hide']]] = None, + readonly: Optional[Union[str, bool]] = None, + required: Optional[Union[str, bool]] = None, + size: Optional[str] = None, + src: Optional[str] = None, + step: Optional[Union[str, float]] = None, + title: Optional[str] = None, + type: Optional[str] = None, + value: Optional[str] = None, + width: Optional[Union[str, int]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'input' (Form control) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accept` : + Hint for expected file type in file upload controls + Set of comma-separated tokens* consisting of valid MIME type strings with no parameters or audio/*, video/*, or image/* + + `alpha` : + Allow the color's alpha component to be set + + `alt` : + Replacement text for use when images are not available + + `autocomplete` : + Hint for form autofill feature + Autofill field name and related tokens* + + `checked` : + Whether the control is checked + + `colorspace` : + The color space of the serialized color + + `dirname` : + Name of form control to use for sending the element's directionality in form submission + + `disabled` : + Whether the form control is disabled + + `form` : + Associates the element with a form element + ID* + + `formaction` : + URL to use for form submission + Valid non-empty URL potentially surrounded by spaces + + `formenctype` : + Entry list encoding type to use for form submission + + `formmethod` : + Variant to use for form submission + + `formnovalidate` : + Bypass form control validation for form submission + + `formtarget` : + Navigable for form submission + Valid navigable target name or keyword + + `height` : + Vertical dimension + + `list` : + List of autocomplete options + ID* + + `max` : + Maximum value + Varies* + + `maxlength` : + Maximum length of value + + `min` : + Minimum value + Varies* + + `minlength` : + Minimum length of value + + `multiple` : + Whether to allow multiple values + + `name` : + Name of the element to use for form submission and in the form.elements API + + `pattern` : + Pattern to be matched by the form control's value + Regular expression matching the JavaScript Pattern production + + `placeholder` : + User-visible label to be placed within the form control + + `popovertarget` : + Targets a popover element to toggle, show, or hide + ID* + + `popovertargetaction` : + Indicates whether a targeted popover element is to be toggled, shown, or hidden + + `readonly` : + Whether to allow the value to be edited by the user + + `required` : + Whether the control is required for form submission + + `size` : + Size of the control + Valid non-negative integer greater than zero + + `src` : + Address of the resource + Valid non-empty URL potentially surrounded by spaces + + `step` : + Granularity to be matched by the form control's value + + `title` : + Description of pattern (when used with pattern attribute) + + `type` : + Type of form control + input type keyword + + `value` : + Value of the form control + Varies* + + `width` : + Horizontal dimension + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "input", + void_element=True, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accept is None or accept is False): + self._process_attr("accept", accept) + if not (alpha is None or alpha is False): + self._process_attr("alpha", alpha) + if not (alt is None or alt is False): + self._process_attr("alt", alt) + if not (autocomplete is None or autocomplete is False): + self._process_attr("autocomplete", autocomplete) + if not (checked is None or checked is False): + self._process_attr("checked", checked) + if not (colorspace is None or colorspace is False): + self._process_attr("colorspace", colorspace) + if not (dirname is None or dirname is False): + self._process_attr("dirname", dirname) + if not (disabled is None or disabled is False): + self._process_attr("disabled", disabled) + if not (form is None or form is False): + self._process_attr("form", form) + if not (formaction is None or formaction is False): + self._process_attr("formaction", formaction) + if not (formenctype is None or formenctype is False): + self._process_attr("formenctype", formenctype) + if not (formmethod is None or formmethod is False): + self._process_attr("formmethod", formmethod) + if not (formnovalidate is None or formnovalidate is False): + self._process_attr("formnovalidate", formnovalidate) + if not (formtarget is None or formtarget is False): + self._process_attr("formtarget", formtarget) + if not (height is None or height is False): + self._process_attr("height", height) + if not (list is None or list is False): + self._process_attr("list", list) + if not (max is None or max is False): + self._process_attr("max", max) + if not (maxlength is None or maxlength is False): + self._process_attr("maxlength", maxlength) + if not (min is None or min is False): + self._process_attr("min", min) + if not (minlength is None or minlength is False): + self._process_attr("minlength", minlength) + if not (multiple is None or multiple is False): + self._process_attr("multiple", multiple) + if not (name is None or name is False): + self._process_attr("name", name) + if not (pattern is None or pattern is False): + self._process_attr("pattern", pattern) + if not (placeholder is None or placeholder is False): + self._process_attr("placeholder", placeholder) + if not (popovertarget is None or popovertarget is False): + self._process_attr("popovertarget", popovertarget) + if not (popovertargetaction is None or popovertargetaction is False): + self._process_attr("popovertargetaction", popovertargetaction) + if not (readonly is None or readonly is False): + self._process_attr("readonly", readonly) + if not (required is None or required is False): + self._process_attr("required", required) + if not (size is None or size is False): + self._process_attr("size", size) + if not (src is None or src is False): + self._process_attr("src", src) + if not (step is None or step is False): + self._process_attr("step", step) + if not (title is None or title is False): + self._process_attr("title", title) + if not (type is None or type is False): + self._process_attr("type", type) + if not (value is None or value is False): + self._process_attr("value", value) + if not (width is None or width is False): + self._process_attr("width", width) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/ins_element.py b/tools/generated/elements/ins_element.py new file mode 100644 index 0000000..1a1557b --- /dev/null +++ b/tools/generated/elements/ins_element.py @@ -0,0 +1,243 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class ins(BaseElement): + """ + The 'ins' element. + Description: An addition to the document + Categories: flow phrasing* palpable + Parents: phrasing + Children: transparent + Interface: HTMLModElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ins + """ # fmt: skip + tag = 'ins' + categories = ['flow', 'phrasing*', 'palpable'] + class hint(GlobalAttrs, InsAttrs): + """ + Type hints for "ins" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + cite: Optional[str] = None, + datetime: Optional[str] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'ins' (An addition to the document) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ins + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `cite` : + Link to the source of the quotation or more information about the edit + Valid URL potentially surrounded by spaces + + `datetime` : + Date and (optionally) time of the change + Valid date string with optional time + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "ins", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (cite is None or cite is False): + self._process_attr("cite", cite) + if not (datetime is None or datetime is False): + self._process_attr("datetime", datetime) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/kbd_element.py b/tools/generated/elements/kbd_element.py new file mode 100644 index 0000000..7ce63bb --- /dev/null +++ b/tools/generated/elements/kbd_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class kbd(BaseElement): + """ + The 'kbd' element. + Description: User input + Categories: flow phrasing palpable + Parents: phrasing + Children: phrasing + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/kbd + """ # fmt: skip + tag = 'kbd' + categories = ['flow', 'phrasing', 'palpable'] + class hint(GlobalAttrs): + """ + Type hints for "kbd" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'kbd' (User input) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/kbd + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "kbd", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/label_element.py b/tools/generated/elements/label_element.py new file mode 100644 index 0000000..5249326 --- /dev/null +++ b/tools/generated/elements/label_element.py @@ -0,0 +1,236 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class label(BaseElement): + """ + The 'label' element. + Description: Caption for a form control + Categories: flow phrasing interactive palpable + Parents: phrasing + Children: phrasing* + Interface: HTMLLabelElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label + """ # fmt: skip + tag = 'label' + categories = ['flow', 'phrasing', 'interactive', 'palpable'] + class hint(GlobalAttrs, LabelAttrs): + """ + Type hints for "label" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + for_: Optional[str] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'label' (Caption for a form control) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `for_` : + Associate the label with form control + ID* + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "label", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (for_ is None or for_ is False): + self._process_attr("for", for_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/legend_element.py b/tools/generated/elements/legend_element.py new file mode 100644 index 0000000..32f1ff0 --- /dev/null +++ b/tools/generated/elements/legend_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class legend(BaseElement): + """ + The 'legend' element. + Description: Caption for fieldset + Categories: none + Parents: fieldset + Children: phrasing heading content + Interface: HTMLLegendElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/legend + """ # fmt: skip + tag = 'legend' + categories = ['none'] + class hint(GlobalAttrs): + """ + Type hints for "legend" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'legend' (Caption for fieldset) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/legend + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "legend", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/li_element.py b/tools/generated/elements/li_element.py new file mode 100644 index 0000000..aaca2fc --- /dev/null +++ b/tools/generated/elements/li_element.py @@ -0,0 +1,235 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class li(BaseElement): + """ + The 'li' element. + Description: List item + Categories: none + Parents: ol ul menu* + Children: flow + Interface: HTMLLIElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/li + """ # fmt: skip + tag = 'li' + categories = ['none'] + class hint(GlobalAttrs, LiAttrs): + """ + Type hints for "li" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + value: Optional[Union[str, int]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'li' (List item) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/li + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `value` : + Ordinal value of the list item + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "li", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (value is None or value is False): + self._process_attr("value", value) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/link_element.py b/tools/generated/elements/link_element.py new file mode 100644 index 0000000..664ba6a --- /dev/null +++ b/tools/generated/elements/link_element.py @@ -0,0 +1,336 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class link(BaseElement): # type: ignore[misc] + """ + The 'link' element. + Description: Link metadata + Categories: metadata flow* phrasing* + Parents: head noscript* phrasing* + Children: empty + Interface: HTMLLinkElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link + """ # fmt: skip + tag = 'link' + categories = ['metadata', 'flow*', 'phrasing*'] + class hint(GlobalAttrs, LinkAttrs): + """ + Type hints for "link" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + as_: Optional[str] = None, + blocking: Optional[Union[str, list]] = None, + color: Optional[str] = None, + crossorigin: Optional[Union[str, Literal['anonymous', 'use-credentials']]] = None, + disabled: Optional[Union[str, bool]] = None, + fetchpriority: Optional[Union[str, Literal['auto', 'high', 'low']]] = None, + href: Optional[str] = None, + hreflang: Optional[str] = None, + imagesizes: Optional[str] = None, + imagesrcset: Optional[str] = None, + integrity: Optional[str] = None, + media: Optional[str] = None, + referrerpolicy: Optional[str] = None, + rel: Optional[Union[str, list]] = None, + sizes: Optional[Union[str, list]] = None, + title: Optional[str] = None, + type: Optional[str] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'link' (Link metadata) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `as_` : + Potential destination for a preload request (for rel="preload" and rel="modulepreload") + Potential destination, for rel="preload"; script-like destination, for rel="modulepreload" + + `blocking` : + Whether the element is potentially render-blocking + + `color` : + Color to use when customizing a site's icon (for rel="mask-icon") + CSS + + `crossorigin` : + How the element handles crossorigin requests + + `disabled` : + Whether the link is disabled + + `fetchpriority` : + Sets the priority for fetches initiated by the element + + `href` : + Address of the hyperlink + Valid non-empty URL potentially surrounded by spaces + + `hreflang` : + Language of the linked resource + Valid BCP 47 language tag + + `imagesizes` : + Image sizes for different page layouts (for rel="preload") + Valid source size list + + `imagesrcset` : + Images to use in different situations, e.g., high-resolution displays, small monitors, etc. (for rel="preload") + Comma-separated list of image candidate strings + + `integrity` : + Integrity metadata used in Subresource Integrity checks [SRI] + + `media` : + Applicable media + Valid media query list + + `referrerpolicy` : + Referrer policy for fetches initiated by the element + Referrer policy + + `rel` : + Relationship between the document containing the hyperlink and the destination resource + + `sizes` : + Sizes of the icons (for rel="icon") + + `title` : + CSS style sheet set name + `title` : + Title of the link + + `type` : + Hint for the type of the referenced resource + Valid MIME type string + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "link", + void_element=True, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (as_ is None or as_ is False): + self._process_attr("as", as_) + if not (blocking is None or blocking is False): + self._process_attr("blocking", blocking) + if not (color is None or color is False): + self._process_attr("color", color) + if not (crossorigin is None or crossorigin is False): + self._process_attr("crossorigin", crossorigin) + if not (disabled is None or disabled is False): + self._process_attr("disabled", disabled) + if not (fetchpriority is None or fetchpriority is False): + self._process_attr("fetchpriority", fetchpriority) + if not (href is None or href is False): + self._process_attr("href", href) + if not (hreflang is None or hreflang is False): + self._process_attr("hreflang", hreflang) + if not (imagesizes is None or imagesizes is False): + self._process_attr("imagesizes", imagesizes) + if not (imagesrcset is None or imagesrcset is False): + self._process_attr("imagesrcset", imagesrcset) + if not (integrity is None or integrity is False): + self._process_attr("integrity", integrity) + if not (media is None or media is False): + self._process_attr("media", media) + if not (referrerpolicy is None or referrerpolicy is False): + self._process_attr("referrerpolicy", referrerpolicy) + if not (rel is None or rel is False): + self._process_attr("rel", rel) + if not (sizes is None or sizes is False): + self._process_attr("sizes", sizes) + if not (title is None or title is False): + self._process_attr("title", title) + if not (type is None or type is False): + self._process_attr("type", type) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/main_element.py b/tools/generated/elements/main_element.py new file mode 100644 index 0000000..53d3d8e --- /dev/null +++ b/tools/generated/elements/main_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class main(BaseElement): + """ + The 'main' element. + Description: Container for the dominant contents of the document + Categories: flow palpable + Parents: flow* + Children: flow + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/main + """ # fmt: skip + tag = 'main' + categories = ['flow', 'palpable'] + class hint(GlobalAttrs): + """ + Type hints for "main" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'main' (Container for the dominant contents of the document) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/main + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "main", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/map_element.py b/tools/generated/elements/map_element.py new file mode 100644 index 0000000..a04a52e --- /dev/null +++ b/tools/generated/elements/map_element.py @@ -0,0 +1,235 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class map(BaseElement): + """ + The 'map' element. + Description: Image map + Categories: flow phrasing* palpable + Parents: phrasing + Children: transparent area* + Interface: HTMLMapElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/map + """ # fmt: skip + tag = 'map' + categories = ['flow', 'phrasing*', 'palpable'] + class hint(GlobalAttrs, MapAttrs): + """ + Type hints for "map" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + name: Optional[str] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'map' (Image map) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/map + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `name` : + Name of image map to reference from the usemap attribute + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "map", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (name is None or name is False): + self._process_attr("name", name) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/mark_element.py b/tools/generated/elements/mark_element.py new file mode 100644 index 0000000..834fe87 --- /dev/null +++ b/tools/generated/elements/mark_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class mark(BaseElement): + """ + The 'mark' element. + Description: Highlight + Categories: flow phrasing palpable + Parents: phrasing + Children: phrasing + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/mark + """ # fmt: skip + tag = 'mark' + categories = ['flow', 'phrasing', 'palpable'] + class hint(GlobalAttrs): + """ + Type hints for "mark" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'mark' (Highlight) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/mark + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "mark", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/menu_element.py b/tools/generated/elements/menu_element.py new file mode 100644 index 0000000..c467f01 --- /dev/null +++ b/tools/generated/elements/menu_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class menu(BaseElement): + """ + The 'menu' element. + Description: Menu of commands + Categories: flow palpable* + Parents: flow + Children: li script-supporting elements + Interface: HTMLMenuElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/menu + """ # fmt: skip + tag = 'menu' + categories = ['flow', 'palpable*'] + class hint(GlobalAttrs): + """ + Type hints for "menu" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'menu' (Menu of commands) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/menu + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "menu", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/meta_element.py b/tools/generated/elements/meta_element.py new file mode 100644 index 0000000..8594995 --- /dev/null +++ b/tools/generated/elements/meta_element.py @@ -0,0 +1,260 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class meta(BaseElement): + """ + The 'meta' element. + Description: Text metadata + Categories: metadata flow* phrasing* + Parents: head noscript* phrasing* + Children: empty + Interface: HTMLMetaElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta + """ # fmt: skip + tag = 'meta' + categories = ['metadata', 'flow*', 'phrasing*'] + class hint(GlobalAttrs, MetaAttrs): + """ + Type hints for "meta" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + charset: Optional[Union[str, Literal['utf-8']]] = None, + content: Optional[str] = None, + http_equiv: Optional[Union[str, Literal['content-type', 'default-style', 'refresh', 'x-ua-compatible', 'content-security-policy']]] = None, + media: Optional[str] = None, + name: Optional[str] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'meta' (Text metadata) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `charset` : + Character encoding declaration + + `content` : + Value of the element + + `http_equiv` : + Pragma directive + + `media` : + Applicable media + Valid media query list + + `name` : + Metadata name + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "meta", + void_element=True, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (charset is None or charset is False): + self._process_attr("charset", charset) + if not (content is None or content is False): + self._process_attr("content", content) + if not (http_equiv is None or http_equiv is False): + self._process_attr("http-equiv", http_equiv) + if not (media is None or media is False): + self._process_attr("media", media) + if not (name is None or name is False): + self._process_attr("name", name) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/meter_element.py b/tools/generated/elements/meter_element.py new file mode 100644 index 0000000..7db471e --- /dev/null +++ b/tools/generated/elements/meter_element.py @@ -0,0 +1,265 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class meter(BaseElement): + """ + The 'meter' element. + Description: Gauge + Categories: flow phrasing labelable palpable + Parents: phrasing + Children: phrasing* + Interface: HTMLMeterElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meter + """ # fmt: skip + tag = 'meter' + categories = ['flow', 'phrasing', 'labelable', 'palpable'] + class hint(GlobalAttrs, MeterAttrs): + """ + Type hints for "meter" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + high: Optional[Union[str, float]] = None, + low: Optional[Union[str, float]] = None, + max: Optional[Union[str, float]] = None, + min: Optional[Union[str, float]] = None, + optimum: Optional[Union[str, float]] = None, + value: Optional[Union[str, float]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'meter' (Gauge) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meter + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `high` : + Low limit of high range + + `low` : + High limit of low range + + `max` : + Upper bound of range + + `min` : + Lower bound of range + + `optimum` : + Optimum value in gauge + + `value` : + Current value of the element + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "meter", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (high is None or high is False): + self._process_attr("high", high) + if not (low is None or low is False): + self._process_attr("low", low) + if not (max is None or max is False): + self._process_attr("max", max) + if not (min is None or min is False): + self._process_attr("min", min) + if not (optimum is None or optimum is False): + self._process_attr("optimum", optimum) + if not (value is None or value is False): + self._process_attr("value", value) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/nav_element.py b/tools/generated/elements/nav_element.py new file mode 100644 index 0000000..420c604 --- /dev/null +++ b/tools/generated/elements/nav_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class nav(BaseElement): + """ + The 'nav' element. + Description: Section with navigational links + Categories: flow sectioning palpable + Parents: flow + Children: flow + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/nav + """ # fmt: skip + tag = 'nav' + categories = ['flow', 'sectioning', 'palpable'] + class hint(GlobalAttrs): + """ + Type hints for "nav" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'nav' (Section with navigational links) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/nav + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "nav", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/noscript_element.py b/tools/generated/elements/noscript_element.py new file mode 100644 index 0000000..e421a74 --- /dev/null +++ b/tools/generated/elements/noscript_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class noscript(BaseElement): + """ + The 'noscript' element. + Description: Fallback content for script + Categories: metadata flow phrasing + Parents: head* phrasing* + Children: varies* + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/noscript + """ # fmt: skip + tag = 'noscript' + categories = ['metadata', 'flow', 'phrasing'] + class hint(GlobalAttrs): + """ + Type hints for "noscript" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'noscript' (Fallback content for script) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/noscript + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "noscript", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/object_element.py b/tools/generated/elements/object_element.py new file mode 100644 index 0000000..6d5b2e1 --- /dev/null +++ b/tools/generated/elements/object_element.py @@ -0,0 +1,269 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class object(BaseElement): + """ + The 'object' element. + Description: Image, child navigable, or plugin + Categories: flow phrasing embedded interactive* listed form-associated palpable + Parents: phrasing + Children: transparent + Interface: HTMLObjectElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/object + """ # fmt: skip + tag = 'object' + categories = ['flow', 'phrasing', 'embedded', 'interactive*', 'listed', 'form-associated', 'palpable'] + class hint(GlobalAttrs, ObjectAttrs): + """ + Type hints for "object" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + data: Optional[str] = None, + form: Optional[str] = None, + height: Optional[Union[str, int]] = None, + name: Optional[str] = None, + type: Optional[str] = None, + width: Optional[Union[str, int]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'object' (Image, child navigable, or plugin) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/object + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `data` : + Address of the resource + Valid non-empty URL potentially surrounded by spaces + + `form` : + Associates the element with a form element + ID* + + `height` : + Vertical dimension + + `name` : + Name of content navigable + Valid navigable target name or keyword + + `type` : + Type of embedded resource + Valid MIME type string + + `width` : + Horizontal dimension + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "object", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (data is None or data is False): + self._process_attr("data", data) + if not (form is None or form is False): + self._process_attr("form", form) + if not (height is None or height is False): + self._process_attr("height", height) + if not (name is None or name is False): + self._process_attr("name", name) + if not (type is None or type is False): + self._process_attr("type", type) + if not (width is None or width is False): + self._process_attr("width", width) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/ol_element.py b/tools/generated/elements/ol_element.py new file mode 100644 index 0000000..ab324a2 --- /dev/null +++ b/tools/generated/elements/ol_element.py @@ -0,0 +1,247 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class ol(BaseElement): + """ + The 'ol' element. + Description: Ordered list + Categories: flow palpable* + Parents: flow + Children: li script-supporting elements + Interface: HTMLOListElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ol + """ # fmt: skip + tag = 'ol' + categories = ['flow', 'palpable*'] + class hint(GlobalAttrs, OlAttrs): + """ + Type hints for "ol" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + reversed: Optional[Union[str, bool]] = None, + start: Optional[Union[str, int]] = None, + type: Optional[Union[str, Literal['1', 'a', 'A', 'i', 'I']]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'ol' (Ordered list) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ol + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `reversed` : + Number the list backwards + + `start` : + Starting value of the list + + `type` : + Kind of list marker + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "ol", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (reversed is None or reversed is False): + self._process_attr("reversed", reversed) + if not (start is None or start is False): + self._process_attr("start", start) + if not (type is None or type is False): + self._process_attr("type", type) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/optgroup_element.py b/tools/generated/elements/optgroup_element.py new file mode 100644 index 0000000..78cd8a8 --- /dev/null +++ b/tools/generated/elements/optgroup_element.py @@ -0,0 +1,241 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class optgroup(BaseElement): + """ + The 'optgroup' element. + Description: Group of options in a list box + Categories: none + Parents: select + Children: option script-supporting elements + Interface: HTMLOptGroupElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/optgroup + """ # fmt: skip + tag = 'optgroup' + categories = ['none'] + class hint(GlobalAttrs, OptgroupAttrs): + """ + Type hints for "optgroup" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + disabled: Optional[Union[str, bool]] = None, + label: Optional[str] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'optgroup' (Group of options in a list box) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/optgroup + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `disabled` : + Whether the form control is disabled + + `label` : + User-visible label + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "optgroup", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (disabled is None or disabled is False): + self._process_attr("disabled", disabled) + if not (label is None or label is False): + self._process_attr("label", label) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/option_element.py b/tools/generated/elements/option_element.py new file mode 100644 index 0000000..76babf7 --- /dev/null +++ b/tools/generated/elements/option_element.py @@ -0,0 +1,253 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class option(BaseElement): + """ + The 'option' element. + Description: Option in a list box or combo box control + Categories: none + Parents: select datalist optgroup + Children: text* + Interface: HTMLOptionElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option + """ # fmt: skip + tag = 'option' + categories = ['none'] + class hint(GlobalAttrs, OptionAttrs): + """ + Type hints for "option" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + disabled: Optional[Union[str, bool]] = None, + label: Optional[str] = None, + selected: Optional[Union[str, bool]] = None, + value: Optional[str] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'option' (Option in a list box or combo box control) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `disabled` : + Whether the form control is disabled + + `label` : + User-visible label + + `selected` : + Whether the option is selected by default + + `value` : + Value to be used for form submission + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "option", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (disabled is None or disabled is False): + self._process_attr("disabled", disabled) + if not (label is None or label is False): + self._process_attr("label", label) + if not (selected is None or selected is False): + self._process_attr("selected", selected) + if not (value is None or value is False): + self._process_attr("value", value) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/output_element.py b/tools/generated/elements/output_element.py new file mode 100644 index 0000000..8c9710a --- /dev/null +++ b/tools/generated/elements/output_element.py @@ -0,0 +1,248 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class output(BaseElement): + """ + The 'output' element. + Description: Calculated output value + Categories: flow phrasing listed labelable resettable form-associated palpable + Parents: phrasing + Children: phrasing + Interface: HTMLOutputElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/output + """ # fmt: skip + tag = 'output' + categories = ['flow', 'phrasing', 'listed', 'labelable', 'resettable', 'form-associated', 'palpable'] + class hint(GlobalAttrs, OutputAttrs): + """ + Type hints for "output" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + for_: Optional[Union[str, list]] = None, + form: Optional[str] = None, + name: Optional[str] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'output' (Calculated output value) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/output + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `for_` : + Specifies controls from which the output was calculated + + `form` : + Associates the element with a form element + ID* + + `name` : + Name of the element to use for form submission and in the form.elements API + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "output", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (for_ is None or for_ is False): + self._process_attr("for", for_) + if not (form is None or form is False): + self._process_attr("form", form) + if not (name is None or name is False): + self._process_attr("name", name) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/p_element.py b/tools/generated/elements/p_element.py new file mode 100644 index 0000000..516d6a0 --- /dev/null +++ b/tools/generated/elements/p_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class p(BaseElement): + """ + The 'p' element. + Description: Paragraph + Categories: flow palpable + Parents: flow + Children: phrasing + Interface: HTMLParagraphElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/p + """ # fmt: skip + tag = 'p' + categories = ['flow', 'palpable'] + class hint(GlobalAttrs): + """ + Type hints for "p" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'p' (Paragraph) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/p + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "p", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/picture_element.py b/tools/generated/elements/picture_element.py new file mode 100644 index 0000000..64f56f4 --- /dev/null +++ b/tools/generated/elements/picture_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class picture(BaseElement): + """ + The 'picture' element. + Description: Image + Categories: flow phrasing embedded palpable + Parents: phrasing + Children: source* one img script-supporting elements + Interface: HTMLPictureElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture + """ # fmt: skip + tag = 'picture' + categories = ['flow', 'phrasing', 'embedded', 'palpable'] + class hint(GlobalAttrs): + """ + Type hints for "picture" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'picture' (Image) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "picture", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/pre_element.py b/tools/generated/elements/pre_element.py new file mode 100644 index 0000000..acefa75 --- /dev/null +++ b/tools/generated/elements/pre_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class pre(BaseElement): + """ + The 'pre' element. + Description: Block of preformatted text + Categories: flow palpable + Parents: flow + Children: phrasing + Interface: HTMLPreElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/pre + """ # fmt: skip + tag = 'pre' + categories = ['flow', 'palpable'] + class hint(GlobalAttrs): + """ + Type hints for "pre" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'pre' (Block of preformatted text) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/pre + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "pre", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/progress_element.py b/tools/generated/elements/progress_element.py new file mode 100644 index 0000000..a4942b6 --- /dev/null +++ b/tools/generated/elements/progress_element.py @@ -0,0 +1,241 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class progress(BaseElement): + """ + The 'progress' element. + Description: Progress bar + Categories: flow phrasing labelable palpable + Parents: phrasing + Children: phrasing* + Interface: HTMLProgressElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/progress + """ # fmt: skip + tag = 'progress' + categories = ['flow', 'phrasing', 'labelable', 'palpable'] + class hint(GlobalAttrs, ProgressAttrs): + """ + Type hints for "progress" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + max: Optional[Union[str, float]] = None, + value: Optional[Union[str, float]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'progress' (Progress bar) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/progress + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `max` : + Upper bound of range + + `value` : + Current value of the element + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "progress", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (max is None or max is False): + self._process_attr("max", max) + if not (value is None or value is False): + self._process_attr("value", value) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/q_element.py b/tools/generated/elements/q_element.py new file mode 100644 index 0000000..329b3b7 --- /dev/null +++ b/tools/generated/elements/q_element.py @@ -0,0 +1,236 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class q(BaseElement): + """ + The 'q' element. + Description: Quotation + Categories: flow phrasing palpable + Parents: phrasing + Children: phrasing + Interface: HTMLQuoteElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/q + """ # fmt: skip + tag = 'q' + categories = ['flow', 'phrasing', 'palpable'] + class hint(GlobalAttrs, QAttrs): + """ + Type hints for "q" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + cite: Optional[str] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'q' (Quotation) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/q + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `cite` : + Link to the source of the quotation or more information about the edit + Valid URL potentially surrounded by spaces + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "q", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (cite is None or cite is False): + self._process_attr("cite", cite) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/rp_element.py b/tools/generated/elements/rp_element.py new file mode 100644 index 0000000..14b36bc --- /dev/null +++ b/tools/generated/elements/rp_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class rp(BaseElement): + """ + The 'rp' element. + Description: Parenthesis for ruby annotation text + Categories: none + Parents: ruby + Children: text + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/rp + """ # fmt: skip + tag = 'rp' + categories = ['none'] + class hint(GlobalAttrs): + """ + Type hints for "rp" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'rp' (Parenthesis for ruby annotation text) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/rp + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "rp", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/rt_element.py b/tools/generated/elements/rt_element.py new file mode 100644 index 0000000..3d99111 --- /dev/null +++ b/tools/generated/elements/rt_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class rt(BaseElement): + """ + The 'rt' element. + Description: Ruby annotation text + Categories: none + Parents: ruby + Children: phrasing + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/rt + """ # fmt: skip + tag = 'rt' + categories = ['none'] + class hint(GlobalAttrs): + """ + Type hints for "rt" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'rt' (Ruby annotation text) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/rt + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "rt", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/ruby_element.py b/tools/generated/elements/ruby_element.py new file mode 100644 index 0000000..5c1ff49 --- /dev/null +++ b/tools/generated/elements/ruby_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class ruby(BaseElement): + """ + The 'ruby' element. + Description: Ruby annotation(s) + Categories: flow phrasing palpable + Parents: phrasing + Children: phrasing rt rp* + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ruby + """ # fmt: skip + tag = 'ruby' + categories = ['flow', 'phrasing', 'palpable'] + class hint(GlobalAttrs): + """ + Type hints for "ruby" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'ruby' (Ruby annotation(s)) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ruby + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "ruby", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/s_element.py b/tools/generated/elements/s_element.py new file mode 100644 index 0000000..37f39b3 --- /dev/null +++ b/tools/generated/elements/s_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class s(BaseElement): + """ + The 's' element. + Description: Inaccurate text + Categories: flow phrasing palpable + Parents: phrasing + Children: phrasing + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/s + """ # fmt: skip + tag = 's' + categories = ['flow', 'phrasing', 'palpable'] + class hint(GlobalAttrs): + """ + Type hints for "s" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 's' (Inaccurate text) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/s + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "s", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/samp_element.py b/tools/generated/elements/samp_element.py new file mode 100644 index 0000000..9f57c34 --- /dev/null +++ b/tools/generated/elements/samp_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class samp(BaseElement): + """ + The 'samp' element. + Description: Computer output + Categories: flow phrasing palpable + Parents: phrasing + Children: phrasing + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/samp + """ # fmt: skip + tag = 'samp' + categories = ['flow', 'phrasing', 'palpable'] + class hint(GlobalAttrs): + """ + Type hints for "samp" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'samp' (Computer output) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/samp + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "samp", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/script_element.py b/tools/generated/elements/script_element.py new file mode 100644 index 0000000..ef88618 --- /dev/null +++ b/tools/generated/elements/script_element.py @@ -0,0 +1,292 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class script(BaseElement): + """ + The 'script' element. + Description: Embedded script + Categories: metadata flow phrasing script-supporting + Parents: head phrasing script-supporting + Children: script, data, or script documentation* + Interface: HTMLScriptElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script + """ # fmt: skip + tag = 'script' + categories = ['metadata', 'flow', 'phrasing', 'script-supporting'] + class hint(GlobalAttrs, ScriptAttrs): + """ + Type hints for "script" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + async_: Optional[Union[str, bool]] = None, + blocking: Optional[Union[str, list]] = None, + crossorigin: Optional[Union[str, Literal['anonymous', 'use-credentials']]] = None, + defer: Optional[Union[str, bool]] = None, + fetchpriority: Optional[Union[str, Literal['auto', 'high', 'low']]] = None, + integrity: Optional[str] = None, + nomodule: Optional[Union[str, bool]] = None, + referrerpolicy: Optional[str] = None, + src: Optional[str] = None, + type: Optional[str] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'script' (Embedded script) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `async_` : + Execute script when available, without blocking while fetching + + `blocking` : + Whether the element is potentially render-blocking + + `crossorigin` : + How the element handles crossorigin requests + + `defer` : + Defer script execution + + `fetchpriority` : + Sets the priority for fetches initiated by the element + + `integrity` : + Integrity metadata used in Subresource Integrity checks [SRI] + + `nomodule` : + Prevents execution in user agents that support module scripts + + `referrerpolicy` : + Referrer policy for fetches initiated by the element + Referrer policy + + `src` : + Address of the resource + Valid non-empty URL potentially surrounded by spaces + + `type` : + Type of script + "module"; a valid MIME type string that is not a JavaScript MIME type essence match + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "script", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (async_ is None or async_ is False): + self._process_attr("async", async_) + if not (blocking is None or blocking is False): + self._process_attr("blocking", blocking) + if not (crossorigin is None or crossorigin is False): + self._process_attr("crossorigin", crossorigin) + if not (defer is None or defer is False): + self._process_attr("defer", defer) + if not (fetchpriority is None or fetchpriority is False): + self._process_attr("fetchpriority", fetchpriority) + if not (integrity is None or integrity is False): + self._process_attr("integrity", integrity) + if not (nomodule is None or nomodule is False): + self._process_attr("nomodule", nomodule) + if not (referrerpolicy is None or referrerpolicy is False): + self._process_attr("referrerpolicy", referrerpolicy) + if not (src is None or src is False): + self._process_attr("src", src) + if not (type is None or type is False): + self._process_attr("type", type) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/search_element.py b/tools/generated/elements/search_element.py new file mode 100644 index 0000000..d4f1a12 --- /dev/null +++ b/tools/generated/elements/search_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class search(BaseElement): + """ + The 'search' element. + Description: Container for search controls + Categories: flow palpable + Parents: flow + Children: flow + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/search + """ # fmt: skip + tag = 'search' + categories = ['flow', 'palpable'] + class hint(GlobalAttrs): + """ + Type hints for "search" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'search' (Container for search controls) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/search + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "search", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/section_element.py b/tools/generated/elements/section_element.py new file mode 100644 index 0000000..7548e07 --- /dev/null +++ b/tools/generated/elements/section_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class section(BaseElement): + """ + The 'section' element. + Description: Generic document or application section + Categories: flow sectioning palpable + Parents: flow + Children: flow + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/section + """ # fmt: skip + tag = 'section' + categories = ['flow', 'sectioning', 'palpable'] + class hint(GlobalAttrs): + """ + Type hints for "section" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'section' (Generic document or application section) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/section + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "section", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/select_element.py b/tools/generated/elements/select_element.py new file mode 100644 index 0000000..62ccf8e --- /dev/null +++ b/tools/generated/elements/select_element.py @@ -0,0 +1,274 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class select(BaseElement): + """ + The 'select' element. + Description: List box control + Categories: flow phrasing interactive listed labelable submittable resettable form-associated palpable + Parents: phrasing + Children: option optgroup script-supporting elements + Interface: HTMLSelectElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select + """ # fmt: skip + tag = 'select' + categories = ['flow', 'phrasing', 'interactive', 'listed', 'labelable', 'submittable', 'resettable', 'form-associated', 'palpable'] + class hint(GlobalAttrs, SelectAttrs): + """ + Type hints for "select" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + autocomplete: Optional[str] = None, + disabled: Optional[Union[str, bool]] = None, + form: Optional[str] = None, + multiple: Optional[Union[str, bool]] = None, + name: Optional[str] = None, + required: Optional[Union[str, bool]] = None, + size: Optional[str] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'select' (List box control) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `autocomplete` : + Hint for form autofill feature + Autofill field name and related tokens* + + `disabled` : + Whether the form control is disabled + + `form` : + Associates the element with a form element + ID* + + `multiple` : + Whether to allow multiple values + + `name` : + Name of the element to use for form submission and in the form.elements API + + `required` : + Whether the control is required for form submission + + `size` : + Size of the control + Valid non-negative integer greater than zero + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "select", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (autocomplete is None or autocomplete is False): + self._process_attr("autocomplete", autocomplete) + if not (disabled is None or disabled is False): + self._process_attr("disabled", disabled) + if not (form is None or form is False): + self._process_attr("form", form) + if not (multiple is None or multiple is False): + self._process_attr("multiple", multiple) + if not (name is None or name is False): + self._process_attr("name", name) + if not (required is None or required is False): + self._process_attr("required", required) + if not (size is None or size is False): + self._process_attr("size", size) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/slot_element.py b/tools/generated/elements/slot_element.py new file mode 100644 index 0000000..6650708 --- /dev/null +++ b/tools/generated/elements/slot_element.py @@ -0,0 +1,235 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class slot(BaseElement): + """ + The 'slot' element. + Description: Shadow tree slot + Categories: flow phrasing + Parents: phrasing + Children: transparent + Interface: HTMLSlotElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/slot + """ # fmt: skip + tag = 'slot' + categories = ['flow', 'phrasing'] + class hint(GlobalAttrs, SlotAttrs): + """ + Type hints for "slot" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + name: Optional[str] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'slot' (Shadow tree slot) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/slot + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `name` : + Name of shadow tree slot + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "slot", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (name is None or name is False): + self._process_attr("name", name) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/small_element.py b/tools/generated/elements/small_element.py new file mode 100644 index 0000000..ff2998a --- /dev/null +++ b/tools/generated/elements/small_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class small(BaseElement): + """ + The 'small' element. + Description: Side comment + Categories: flow phrasing palpable + Parents: phrasing + Children: phrasing + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/small + """ # fmt: skip + tag = 'small' + categories = ['flow', 'phrasing', 'palpable'] + class hint(GlobalAttrs): + """ + Type hints for "small" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'small' (Side comment) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/small + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "small", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/source_element.py b/tools/generated/elements/source_element.py new file mode 100644 index 0000000..c6cc75b --- /dev/null +++ b/tools/generated/elements/source_element.py @@ -0,0 +1,276 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class source(BaseElement): + """ + The 'source' element. + Description: Image source for img or media source for video or audio + Categories: none + Parents: picture video audio + Children: empty + Interface: HTMLSourceElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source + """ # fmt: skip + tag = 'source' + categories = ['none'] + class hint(GlobalAttrs, SourceAttrs): + """ + Type hints for "source" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + height: Optional[Union[str, int]] = None, + media: Optional[str] = None, + sizes: Optional[str] = None, + src: Optional[str] = None, + srcset: Optional[str] = None, + type: Optional[str] = None, + width: Optional[Union[str, int]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'source' (Image source for img or media source for video or audio) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `height` : + Vertical dimension + + `media` : + Applicable media + Valid media query list + + `sizes` : + Image sizes for different page layouts + Valid source size list + + `src` : + Address of the resource + Valid non-empty URL potentially surrounded by spaces + + `srcset` : + Images to use in different situations, e.g., high-resolution displays, small monitors, etc. + Comma-separated list of image candidate strings + + `type` : + Type of embedded resource + Valid MIME type string + + `width` : + Horizontal dimension + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "source", + void_element=True, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (height is None or height is False): + self._process_attr("height", height) + if not (media is None or media is False): + self._process_attr("media", media) + if not (sizes is None or sizes is False): + self._process_attr("sizes", sizes) + if not (src is None or src is False): + self._process_attr("src", src) + if not (srcset is None or srcset is False): + self._process_attr("srcset", srcset) + if not (type is None or type is False): + self._process_attr("type", type) + if not (width is None or width is False): + self._process_attr("width", width) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/span_element.py b/tools/generated/elements/span_element.py new file mode 100644 index 0000000..ff188b4 --- /dev/null +++ b/tools/generated/elements/span_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class span(BaseElement): + """ + The 'span' element. + Description: Generic phrasing container + Categories: flow phrasing palpable + Parents: phrasing + Children: phrasing + Interface: HTMLSpanElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/span + """ # fmt: skip + tag = 'span' + categories = ['flow', 'phrasing', 'palpable'] + class hint(GlobalAttrs): + """ + Type hints for "span" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'span' (Generic phrasing container) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/span + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "span", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/strong_element.py b/tools/generated/elements/strong_element.py new file mode 100644 index 0000000..7c8e5ab --- /dev/null +++ b/tools/generated/elements/strong_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class strong(BaseElement): + """ + The 'strong' element. + Description: Importance + Categories: flow phrasing palpable + Parents: phrasing + Children: phrasing + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/strong + """ # fmt: skip + tag = 'strong' + categories = ['flow', 'phrasing', 'palpable'] + class hint(GlobalAttrs): + """ + Type hints for "strong" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'strong' (Importance) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/strong + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "strong", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/style_element.py b/tools/generated/elements/style_element.py new file mode 100644 index 0000000..483ba22 --- /dev/null +++ b/tools/generated/elements/style_element.py @@ -0,0 +1,242 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class style(BaseElement): # type: ignore[misc] + """ + The 'style' element. + Description: Embedded styling information + Categories: metadata + Parents: head noscript* + Children: text* + Interface: HTMLStyleElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/style + """ # fmt: skip + tag = 'style' + categories = ['metadata'] + class hint(GlobalAttrs, StyleAttrs): + """ + Type hints for "style" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + blocking: Optional[Union[str, list]] = None, + media: Optional[str] = None, + title: Optional[str] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'style' (Embedded styling information) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/style + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `blocking` : + Whether the element is potentially render-blocking + + `media` : + Applicable media + Valid media query list + + `title` : + CSS style sheet set name + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "style", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (blocking is None or blocking is False): + self._process_attr("blocking", blocking) + if not (media is None or media is False): + self._process_attr("media", media) + if not (title is None or title is False): + self._process_attr("title", title) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/sub_element.py b/tools/generated/elements/sub_element.py new file mode 100644 index 0000000..d830281 --- /dev/null +++ b/tools/generated/elements/sub_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class sub(BaseElement): + """ + The 'sub' element. + Description: Subscript + Categories: flow phrasing palpable + Parents: phrasing + Children: phrasing + Interface: HTMLElement + Documentation: None + """ # fmt: skip + tag = 'sub' + categories = ['flow', 'phrasing', 'palpable'] + class hint(GlobalAttrs): + """ + Type hints for "sub" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'sub' (Subscript) element. + Documentation: None + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "sub", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/summary_element.py b/tools/generated/elements/summary_element.py new file mode 100644 index 0000000..91bed6a --- /dev/null +++ b/tools/generated/elements/summary_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class summary(BaseElement): + """ + The 'summary' element. + Description: Caption for details + Categories: none + Parents: details + Children: phrasing heading content + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/summary + """ # fmt: skip + tag = 'summary' + categories = ['none'] + class hint(GlobalAttrs): + """ + Type hints for "summary" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'summary' (Caption for details) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/summary + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "summary", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/sup_element.py b/tools/generated/elements/sup_element.py new file mode 100644 index 0000000..a4cf24a --- /dev/null +++ b/tools/generated/elements/sup_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class sup(BaseElement): + """ + The 'sup' element. + Description: Superscript + Categories: flow phrasing palpable + Parents: phrasing + Children: phrasing + Interface: HTMLElement + Documentation: None + """ # fmt: skip + tag = 'sup' + categories = ['flow', 'phrasing', 'palpable'] + class hint(GlobalAttrs): + """ + Type hints for "sup" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'sup' (Superscript) element. + Documentation: None + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "sup", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/svg_element.py b/tools/generated/elements/svg_element.py new file mode 100644 index 0000000..5cfe933 --- /dev/null +++ b/tools/generated/elements/svg_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class svg(BaseElement): + """ + The 'svg' element. + Description: SVG root + Categories: flow phrasing embedded palpable + Parents: phrasing + Children: per [SVG] + Interface: SVGSVGElement + Documentation: None + """ # fmt: skip + tag = 'svg' + categories = ['flow', 'phrasing', 'embedded', 'palpable'] + class hint(GlobalAttrs): + """ + Type hints for "svg" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'svg' (SVG root) element. + Documentation: None + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "svg", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/table_element.py b/tools/generated/elements/table_element.py new file mode 100644 index 0000000..4020d77 --- /dev/null +++ b/tools/generated/elements/table_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class table(BaseElement): + """ + The 'table' element. + Description: Table + Categories: flow palpable + Parents: flow + Children: caption* colgroup* thead* tbody* tfoot* tr* script-supporting elements + Interface: HTMLTableElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table + """ # fmt: skip + tag = 'table' + categories = ['flow', 'palpable'] + class hint(GlobalAttrs): + """ + Type hints for "table" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'table' (Table) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "table", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/tbody_element.py b/tools/generated/elements/tbody_element.py new file mode 100644 index 0000000..93f0672 --- /dev/null +++ b/tools/generated/elements/tbody_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class tbody(BaseElement): + """ + The 'tbody' element. + Description: Group of rows in a table + Categories: none + Parents: table + Children: tr script-supporting elements + Interface: HTMLTableSectionElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tbody + """ # fmt: skip + tag = 'tbody' + categories = ['none'] + class hint(GlobalAttrs): + """ + Type hints for "tbody" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'tbody' (Group of rows in a table) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tbody + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "tbody", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/td_element.py b/tools/generated/elements/td_element.py new file mode 100644 index 0000000..8a2a3c6 --- /dev/null +++ b/tools/generated/elements/td_element.py @@ -0,0 +1,248 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class td(BaseElement): + """ + The 'td' element. + Description: Table cell + Categories: none + Parents: tr + Children: flow + Interface: HTMLTableCellElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td + """ # fmt: skip + tag = 'td' + categories = ['none'] + class hint(GlobalAttrs, TdAttrs): + """ + Type hints for "td" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + colspan: Optional[str] = None, + headers: Optional[Union[str, list]] = None, + rowspan: Optional[Union[str, int]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'td' (Table cell) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `colspan` : + Number of columns that the cell is to span + Valid non-negative integer greater than zero + + `headers` : + The header cells for this cell + + `rowspan` : + Number of rows that the cell is to span + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "td", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (colspan is None or colspan is False): + self._process_attr("colspan", colspan) + if not (headers is None or headers is False): + self._process_attr("headers", headers) + if not (rowspan is None or rowspan is False): + self._process_attr("rowspan", rowspan) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/template_element.py b/tools/generated/elements/template_element.py new file mode 100644 index 0000000..7fa3e1c --- /dev/null +++ b/tools/generated/elements/template_element.py @@ -0,0 +1,253 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class template(BaseElement): + """ + The 'template' element. + Description: Template + Categories: metadata flow phrasing script-supporting + Parents: metadata phrasing script-supporting colgroup* + Children: empty + Interface: HTMLTemplateElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/template + """ # fmt: skip + tag = 'template' + categories = ['metadata', 'flow', 'phrasing', 'script-supporting'] + class hint(GlobalAttrs, TemplateAttrs): + """ + Type hints for "template" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + shadowrootclonable: Optional[Union[str, bool]] = None, + shadowrootdelegatesfocus: Optional[Union[str, bool]] = None, + shadowrootmode: Optional[Union[str, Literal['open', 'closed']]] = None, + shadowrootserializable: Optional[Union[str, bool]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'template' (Template) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/template + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `shadowrootclonable` : + Sets clonable on a declarative shadow root + + `shadowrootdelegatesfocus` : + Sets delegates focus on a declarative shadow root + + `shadowrootmode` : + Enables streaming declarative shadow roots + + `shadowrootserializable` : + Sets serializable on a declarative shadow root + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "template", + void_element=True, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (shadowrootclonable is None or shadowrootclonable is False): + self._process_attr("shadowrootclonable", shadowrootclonable) + if not (shadowrootdelegatesfocus is None or shadowrootdelegatesfocus is False): + self._process_attr("shadowrootdelegatesfocus", shadowrootdelegatesfocus) + if not (shadowrootmode is None or shadowrootmode is False): + self._process_attr("shadowrootmode", shadowrootmode) + if not (shadowrootserializable is None or shadowrootserializable is False): + self._process_attr("shadowrootserializable", shadowrootserializable) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/textarea_element.py b/tools/generated/elements/textarea_element.py new file mode 100644 index 0000000..4380a21 --- /dev/null +++ b/tools/generated/elements/textarea_element.py @@ -0,0 +1,311 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class textarea(BaseElement): + """ + The 'textarea' element. + Description: Multiline text controls + Categories: flow phrasing interactive listed labelable submittable resettable form-associated palpable + Parents: phrasing + Children: text + Interface: HTMLTextAreaElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea + """ # fmt: skip + tag = 'textarea' + categories = ['flow', 'phrasing', 'interactive', 'listed', 'labelable', 'submittable', 'resettable', 'form-associated', 'palpable'] + class hint(GlobalAttrs, TextareaAttrs): + """ + Type hints for "textarea" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + autocomplete: Optional[str] = None, + cols: Optional[str] = None, + dirname: Optional[str] = None, + disabled: Optional[Union[str, bool]] = None, + form: Optional[str] = None, + maxlength: Optional[Union[str, int]] = None, + minlength: Optional[Union[str, int]] = None, + name: Optional[str] = None, + placeholder: Optional[str] = None, + readonly: Optional[Union[str, bool]] = None, + required: Optional[Union[str, bool]] = None, + rows: Optional[str] = None, + wrap: Optional[Union[str, Literal['soft', 'hard']]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'textarea' (Multiline text controls) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `autocomplete` : + Hint for form autofill feature + Autofill field name and related tokens* + + `cols` : + Maximum number of characters per line + Valid non-negative integer greater than zero + + `dirname` : + Name of form control to use for sending the element's directionality in form submission + + `disabled` : + Whether the form control is disabled + + `form` : + Associates the element with a form element + ID* + + `maxlength` : + Maximum length of value + + `minlength` : + Minimum length of value + + `name` : + Name of the element to use for form submission and in the form.elements API + + `placeholder` : + User-visible label to be placed within the form control + + `readonly` : + Whether to allow the value to be edited by the user + + `required` : + Whether the control is required for form submission + + `rows` : + Number of lines to show + Valid non-negative integer greater than zero + + `wrap` : + How the value of the form control is to be wrapped for form submission + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "textarea", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (autocomplete is None or autocomplete is False): + self._process_attr("autocomplete", autocomplete) + if not (cols is None or cols is False): + self._process_attr("cols", cols) + if not (dirname is None or dirname is False): + self._process_attr("dirname", dirname) + if not (disabled is None or disabled is False): + self._process_attr("disabled", disabled) + if not (form is None or form is False): + self._process_attr("form", form) + if not (maxlength is None or maxlength is False): + self._process_attr("maxlength", maxlength) + if not (minlength is None or minlength is False): + self._process_attr("minlength", minlength) + if not (name is None or name is False): + self._process_attr("name", name) + if not (placeholder is None or placeholder is False): + self._process_attr("placeholder", placeholder) + if not (readonly is None or readonly is False): + self._process_attr("readonly", readonly) + if not (required is None or required is False): + self._process_attr("required", required) + if not (rows is None or rows is False): + self._process_attr("rows", rows) + if not (wrap is None or wrap is False): + self._process_attr("wrap", wrap) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/tfoot_element.py b/tools/generated/elements/tfoot_element.py new file mode 100644 index 0000000..a1e0512 --- /dev/null +++ b/tools/generated/elements/tfoot_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class tfoot(BaseElement): + """ + The 'tfoot' element. + Description: Group of footer rows in a table + Categories: none + Parents: table + Children: tr script-supporting elements + Interface: HTMLTableSectionElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tfoot + """ # fmt: skip + tag = 'tfoot' + categories = ['none'] + class hint(GlobalAttrs): + """ + Type hints for "tfoot" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'tfoot' (Group of footer rows in a table) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tfoot + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "tfoot", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/th_element.py b/tools/generated/elements/th_element.py new file mode 100644 index 0000000..ea9f6f8 --- /dev/null +++ b/tools/generated/elements/th_element.py @@ -0,0 +1,260 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class th(BaseElement): + """ + The 'th' element. + Description: Table header cell + Categories: interactive* + Parents: tr + Children: flow* + Interface: HTMLTableCellElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th + """ # fmt: skip + tag = 'th' + categories = ['interactive*'] + class hint(GlobalAttrs, ThAttrs): + """ + Type hints for "th" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + abbr: Optional[str] = None, + colspan: Optional[str] = None, + headers: Optional[Union[str, list]] = None, + rowspan: Optional[Union[str, int]] = None, + scope: Optional[Union[str, Literal['row', 'col', 'rowgroup', 'colgroup']]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'th' (Table header cell) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `abbr` : + Alternative label to use for the header cell when referencing the cell in other contexts + + `colspan` : + Number of columns that the cell is to span + Valid non-negative integer greater than zero + + `headers` : + The header cells for this cell + + `rowspan` : + Number of rows that the cell is to span + + `scope` : + Specifies which cells the header cell applies to + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "th", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (abbr is None or abbr is False): + self._process_attr("abbr", abbr) + if not (colspan is None or colspan is False): + self._process_attr("colspan", colspan) + if not (headers is None or headers is False): + self._process_attr("headers", headers) + if not (rowspan is None or rowspan is False): + self._process_attr("rowspan", rowspan) + if not (scope is None or scope is False): + self._process_attr("scope", scope) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/thead_element.py b/tools/generated/elements/thead_element.py new file mode 100644 index 0000000..1ff2daa --- /dev/null +++ b/tools/generated/elements/thead_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class thead(BaseElement): + """ + The 'thead' element. + Description: Group of heading rows in a table + Categories: none + Parents: table + Children: tr script-supporting elements + Interface: HTMLTableSectionElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/thead + """ # fmt: skip + tag = 'thead' + categories = ['none'] + class hint(GlobalAttrs): + """ + Type hints for "thead" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'thead' (Group of heading rows in a table) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/thead + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "thead", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/time_element.py b/tools/generated/elements/time_element.py new file mode 100644 index 0000000..3e6c138 --- /dev/null +++ b/tools/generated/elements/time_element.py @@ -0,0 +1,236 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class time(BaseElement): + """ + The 'time' element. + Description: Machine-readable equivalent of date- or time-related data + Categories: flow phrasing palpable + Parents: phrasing + Children: phrasing + Interface: HTMLTimeElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/time + """ # fmt: skip + tag = 'time' + categories = ['flow', 'phrasing', 'palpable'] + class hint(GlobalAttrs, TimeAttrs): + """ + Type hints for "time" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + datetime: Optional[str] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'time' (Machine-readable equivalent of date- or time-related data) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/time + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `datetime` : + Machine-readable value + Valid month string, valid date string, valid yearless date string, valid time string, valid local date and time string, valid time-zone offset string, valid global date and time string, valid week string, valid non-negative integer, or valid duration string + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "time", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (datetime is None or datetime is False): + self._process_attr("datetime", datetime) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/title_element.py b/tools/generated/elements/title_element.py new file mode 100644 index 0000000..f3833f6 --- /dev/null +++ b/tools/generated/elements/title_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class title(BaseElement): + """ + The 'title' element. + Description: Document title + Categories: metadata + Parents: head + Children: text* + Interface: HTMLTitleElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/title + """ # fmt: skip + tag = 'title' + categories = ['metadata'] + class hint(GlobalAttrs): + """ + Type hints for "title" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'title' (Document title) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/title + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "title", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/tr_element.py b/tools/generated/elements/tr_element.py new file mode 100644 index 0000000..0a4842d --- /dev/null +++ b/tools/generated/elements/tr_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class tr(BaseElement): + """ + The 'tr' element. + Description: Table row + Categories: none + Parents: table thead tbody tfoot + Children: th* td script-supporting elements + Interface: HTMLTableRowElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tr + """ # fmt: skip + tag = 'tr' + categories = ['none'] + class hint(GlobalAttrs): + """ + Type hints for "tr" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'tr' (Table row) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tr + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "tr", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/track_element.py b/tools/generated/elements/track_element.py new file mode 100644 index 0000000..a91c18a --- /dev/null +++ b/tools/generated/elements/track_element.py @@ -0,0 +1,261 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class track(BaseElement): + """ + The 'track' element. + Description: Timed text track + Categories: none + Parents: audio video + Children: empty + Interface: HTMLTrackElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/track + """ # fmt: skip + tag = 'track' + categories = ['none'] + class hint(GlobalAttrs, TrackAttrs): + """ + Type hints for "track" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + default: Optional[Union[str, bool]] = None, + kind: Optional[Union[str, Literal['subtitles', 'captions', 'descriptions', 'chapters', 'metadata']]] = None, + label: Optional[str] = None, + src: Optional[str] = None, + srclang: Optional[str] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'track' (Timed text track) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/track + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `default` : + Enable the track if no other text track is more suitable + + `kind` : + The type of text track + + `label` : + User-visible label + + `src` : + Address of the resource + Valid non-empty URL potentially surrounded by spaces + + `srclang` : + Language of the text track + Valid BCP 47 language tag + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "track", + void_element=True, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (default is None or default is False): + self._process_attr("default", default) + if not (kind is None or kind is False): + self._process_attr("kind", kind) + if not (label is None or label is False): + self._process_attr("label", label) + if not (src is None or src is False): + self._process_attr("src", src) + if not (srclang is None or srclang is False): + self._process_attr("srclang", srclang) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/u_element.py b/tools/generated/elements/u_element.py new file mode 100644 index 0000000..cb917fd --- /dev/null +++ b/tools/generated/elements/u_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class u(BaseElement): + """ + The 'u' element. + Description: Unarticulated annotation + Categories: flow phrasing palpable + Parents: phrasing + Children: phrasing + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/u + """ # fmt: skip + tag = 'u' + categories = ['flow', 'phrasing', 'palpable'] + class hint(GlobalAttrs): + """ + Type hints for "u" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'u' (Unarticulated annotation) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/u + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "u", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/ul_element.py b/tools/generated/elements/ul_element.py new file mode 100644 index 0000000..8d8c6e4 --- /dev/null +++ b/tools/generated/elements/ul_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class ul(BaseElement): + """ + The 'ul' element. + Description: List + Categories: flow palpable* + Parents: flow + Children: li script-supporting elements + Interface: HTMLUListElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ul + """ # fmt: skip + tag = 'ul' + categories = ['flow', 'palpable*'] + class hint(GlobalAttrs): + """ + Type hints for "ul" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'ul' (List) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ul + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "ul", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/var_element.py b/tools/generated/elements/var_element.py new file mode 100644 index 0000000..f01405a --- /dev/null +++ b/tools/generated/elements/var_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class var(BaseElement): + """ + The 'var' element. + Description: Variable + Categories: flow phrasing palpable + Parents: phrasing + Children: phrasing + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/var + """ # fmt: skip + tag = 'var' + categories = ['flow', 'phrasing', 'palpable'] + class hint(GlobalAttrs): + """ + Type hints for "var" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'var' (Variable) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/var + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "var", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/video_element.py b/tools/generated/elements/video_element.py new file mode 100644 index 0000000..dc622e3 --- /dev/null +++ b/tools/generated/elements/video_element.py @@ -0,0 +1,297 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class video(BaseElement): + """ + The 'video' element. + Description: Video player + Categories: flow phrasing embedded interactive palpable + Parents: phrasing + Children: source* track* transparent* + Interface: HTMLVideoElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video + """ # fmt: skip + tag = 'video' + categories = ['flow', 'phrasing', 'embedded', 'interactive', 'palpable'] + class hint(GlobalAttrs, VideoAttrs): + """ + Type hints for "video" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + autoplay: Optional[Union[str, bool]] = None, + controls: Optional[Union[str, bool]] = None, + crossorigin: Optional[Union[str, Literal['anonymous', 'use-credentials']]] = None, + height: Optional[Union[str, int]] = None, + loop: Optional[Union[str, bool]] = None, + muted: Optional[Union[str, bool]] = None, + playsinline: Optional[Union[str, bool]] = None, + poster: Optional[str] = None, + preload: Optional[Union[str, Literal['none', 'metadata', 'auto']]] = None, + src: Optional[str] = None, + width: Optional[Union[str, int]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'video' (Video player) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `autoplay` : + Hint that the media resource can be started automatically when the page is loaded + + `controls` : + Show user agent controls + + `crossorigin` : + How the element handles crossorigin requests + + `height` : + Vertical dimension + + `loop` : + Whether to loop the media resource + + `muted` : + Whether to mute the media resource by default + + `playsinline` : + Encourage the user agent to display video content within the element's playback area + + `poster` : + Poster frame to show prior to video playback + Valid non-empty URL potentially surrounded by spaces + + `preload` : + Hints how much buffering the media resource will likely need + + `src` : + Address of the resource + Valid non-empty URL potentially surrounded by spaces + + `width` : + Horizontal dimension + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "video", + void_element=False, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (autoplay is None or autoplay is False): + self._process_attr("autoplay", autoplay) + if not (controls is None or controls is False): + self._process_attr("controls", controls) + if not (crossorigin is None or crossorigin is False): + self._process_attr("crossorigin", crossorigin) + if not (height is None or height is False): + self._process_attr("height", height) + if not (loop is None or loop is False): + self._process_attr("loop", loop) + if not (muted is None or muted is False): + self._process_attr("muted", muted) + if not (playsinline is None or playsinline is False): + self._process_attr("playsinline", playsinline) + if not (poster is None or poster is False): + self._process_attr("poster", poster) + if not (preload is None or preload is False): + self._process_attr("preload", preload) + if not (src is None or src is False): + self._process_attr("src", src) + if not (width is None or width is False): + self._process_attr("width", width) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file diff --git a/tools/generated/elements/wbr_element.py b/tools/generated/elements/wbr_element.py new file mode 100644 index 0000000..473ac2d --- /dev/null +++ b/tools/generated/elements/wbr_element.py @@ -0,0 +1,229 @@ +from typing import Union, Literal, Optional + +from ..attributes import GlobalAttrs, AnchorAttrs, AreaAttrs, AudioAttrs, BaseAttrs, BlockquoteAttrs, BodyAttrs, ButtonAttrs, CanvasAttrs, ColAttrs, ColgroupAttrs, DataAttrs, DelAttrs, DetailsAttrs, DialogAttrs, EmbedAttrs, FieldsetAttrs, FormAttrs, IframeAttrs, ImgAttrs, InputAttrs, InsAttrs, LabelAttrs, LiAttrs, LinkAttrs, MapAttrs, MetaAttrs, MeterAttrs, ObjectAttrs, OlAttrs, OptgroupAttrs, OptionAttrs, OutputAttrs, ProgressAttrs, QAttrs, ScriptAttrs, SelectAttrs, SlotAttrs, SourceAttrs, StyleAttrs, TdAttrs, TemplateAttrs, TextareaAttrs, ThAttrs, TimeAttrs, TrackAttrs, VideoAttrs +from ..base_attribute import BaseAttribute +from ..base_element import BaseElement + +# This file is generated by tools/generate_elements.py + + + +class wbr(BaseElement): + """ + The 'wbr' element. + Description: Line breaking opportunity + Categories: flow phrasing + Parents: phrasing + Children: empty + Interface: HTMLElement + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/wbr + """ # fmt: skip + tag = 'wbr' + categories = ['flow', 'phrasing'] + class hint(GlobalAttrs): + """ + Type hints for "wbr" attrs + This class holds functions which return BaseAttributes + Which you can add to your element attrs + """ # fmt: skip + pass + _ = hint + def __init__( + self, + attrs: Optional[Union[dict[str, Union[str, dict, list]], list[BaseAttribute]]] = None, + id: Optional[str] = None, + class_: Optional[Union[str, list]] = None, + accesskey: Optional[Union[str, list]] = None, + autocapitalize: Optional[Union[str, Literal['on', 'off', 'none', 'sentences', 'words', 'characters']]] = None, + autocorrect: Optional[Union[str, Literal['on', 'off']]] = None, + autofocus: Optional[Union[str, bool]] = None, + contenteditable: Optional[Union[str, Literal['true', 'plaintext-only', 'false']]] = None, + dir: Optional[Union[str, Literal['ltr', 'rtl', 'auto']]] = None, + draggable: Optional[Union[str, Literal['true', 'false']]] = None, + enterkeyhint: Optional[Union[str, Literal['enter', 'done', 'go', 'next', 'previous', 'search', 'send']]] = None, + hidden: Optional[Union[str, Literal['until-found', 'hidden', '']]] = None, + inert: Optional[Union[str, bool]] = None, + inputmode: Optional[Union[str, Literal['none', 'text', 'tel', 'email', 'url', 'numeric', 'decimal', 'search']]] = None, + is_: Optional[str] = None, + itemid: Optional[str] = None, + itemprop: Optional[Union[str, list]] = None, + itemref: Optional[Union[str, list]] = None, + itemscope: Optional[Union[str, bool]] = None, + itemtype: Optional[Union[str, list]] = None, + lang: Optional[str] = None, + nonce: Optional[str] = None, + popover: Optional[Union[str, Literal['auto', 'manual']]] = None, + slot: Optional[str] = None, + spellcheck: Optional[Union[str, Literal['true', 'false', '']]] = None, + style: Optional[str] = None, + tabindex: Optional[Union[str, int]] = None, + title: Optional[str] = None, + translate: Optional[Union[str, Literal['yes', 'no']]] = None, + writingsuggestions: Optional[Union[str, Literal['true', 'false', '']]] = None, + children: Optional[list] = None + ) -> None: + """ + Initialize 'wbr' (Line breaking opportunity) element. + Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/wbr + + Parameters + ---------- + `attrs`: + A list or dictionary of attributes for the element + + `id` : + The element's ID + + `class_` : + Classes to which the element belongs + + `accesskey` : + Keyboard shortcut to activate or focus element + + `autocapitalize` : + Recommended autocapitalization behavior (for supported input methods) + + `autocorrect` : + Recommended autocorrection behavior (for supported input methods) + + `autofocus` : + Automatically focus the element when the page is loaded + + `contenteditable` : + Whether the element is editable + + `dir` : + The text directionality of the element + + `draggable` : + Whether the element is draggable + + `enterkeyhint` : + Hint for selecting an enter key action + + `hidden` : + Whether the element is relevant + + `inert` : + Whether the element is inert. + + `inputmode` : + Hint for selecting an input modality + + `is_` : + Creates a customized built-in element + Valid custom element name of a defined customized built-in element + + `itemid` : + Global identifier for a microdata item + Valid URL potentially surrounded by spaces + + `itemprop` : + Property names of a microdata item + + `itemref` : + Referenced elements + + `itemscope` : + Introduces a microdata item + + `itemtype` : + Item types of a microdata item + + `lang` : + Language of the element + Valid BCP 47 language tag or the empty string + + `nonce` : + Cryptographic nonce used in Content Security Policy checks [CSP] + + `popover` : + Makes the element a popover element + + `slot` : + The element's desired slot + + `spellcheck` : + Whether the element is to have its spelling and grammar checked + + `style` : + Presentational and formatting instructions + CSS declarations* + + `tabindex` : + Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + + `title` : + Advisory information for the element + + `translate` : + Whether the element is to be translated when the page is localized + + `writingsuggestions` : + Whether the element can offer writing suggestions or not. + + """ #fmt: skip + super().__init__( + "wbr", + void_element=True, + attrs=attrs, + children=children + ) + if not (id is None or id is False): + self._process_attr("id", id) + if not (class_ is None or class_ is False): + self._process_attr("class", class_) + if not (accesskey is None or accesskey is False): + self._process_attr("accesskey", accesskey) + if not (autocapitalize is None or autocapitalize is False): + self._process_attr("autocapitalize", autocapitalize) + if not (autocorrect is None or autocorrect is False): + self._process_attr("autocorrect", autocorrect) + if not (autofocus is None or autofocus is False): + self._process_attr("autofocus", autofocus) + if not (contenteditable is None or contenteditable is False): + self._process_attr("contenteditable", contenteditable) + if not (dir is None or dir is False): + self._process_attr("dir", dir) + if not (draggable is None or draggable is False): + self._process_attr("draggable", draggable) + if not (enterkeyhint is None or enterkeyhint is False): + self._process_attr("enterkeyhint", enterkeyhint) + if not (hidden is None or hidden is False): + self._process_attr("hidden", hidden) + if not (inert is None or inert is False): + self._process_attr("inert", inert) + if not (inputmode is None or inputmode is False): + self._process_attr("inputmode", inputmode) + if not (is_ is None or is_ is False): + self._process_attr("is", is_) + if not (itemid is None or itemid is False): + self._process_attr("itemid", itemid) + if not (itemprop is None or itemprop is False): + self._process_attr("itemprop", itemprop) + if not (itemref is None or itemref is False): + self._process_attr("itemref", itemref) + if not (itemscope is None or itemscope is False): + self._process_attr("itemscope", itemscope) + if not (itemtype is None or itemtype is False): + self._process_attr("itemtype", itemtype) + if not (lang is None or lang is False): + self._process_attr("lang", lang) + if not (nonce is None or nonce is False): + self._process_attr("nonce", nonce) + if not (popover is None or popover is False): + self._process_attr("popover", popover) + if not (slot is None or slot is False): + self._process_attr("slot", slot) + if not (spellcheck is None or spellcheck is False): + self._process_attr("spellcheck", spellcheck) + if not (style is None or style is False): + self._process_attr("style", style) + if not (tabindex is None or tabindex is False): + self._process_attr("tabindex", tabindex) + if not (title is None or title is False): + self._process_attr("title", title) + if not (translate is None or translate is False): + self._process_attr("translate", translate) + if not (writingsuggestions is None or writingsuggestions is False): + self._process_attr("writingsuggestions", writingsuggestions) \ No newline at end of file