From a76c21940654688b960f2094f514b62280cc5946 Mon Sep 17 00:00:00 2001 From: jealouscloud Date: Sat, 12 Jul 2025 15:43:01 -0400 Subject: [PATCH 01/22] README updates * no_reload was removed for reload * Add note for why we use markupsafe. * Note bs4 is optional --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 ⚙️ From 77f7fae7706c503f91d06de9765185a6ce6bead1 Mon Sep 17 00:00:00 2001 From: jealouscloud Date: Sat, 12 Jul 2025 16:30:55 -0400 Subject: [PATCH 02/22] Fix docstring --- src/html_compose/base_element.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. From b8d54a01fd49e028d5d88f60e6b9e23d7a587dc0 Mon Sep 17 00:00:00 2001 From: jealouscloud Date: Sat, 12 Jul 2025 17:19:27 -0400 Subject: [PATCH 03/22] Move elements to individual files Previously I left it in one file in hopes the language server would like it better. Hopefully the language server doesn't treat us worse. --- requirements-dev.lock | 6 + src/html_compose/elements/__init__.py | 229 +++++++++ src/html_compose/elements/a_element.py | 290 +++++++++++ src/html_compose/elements/abbr_element.py | 240 +++++++++ src/html_compose/elements/address_element.py | 240 +++++++++ src/html_compose/elements/area_element.py | 295 +++++++++++ src/html_compose/elements/article_element.py | 240 +++++++++ src/html_compose/elements/aside_element.py | 240 +++++++++ src/html_compose/elements/audio_element.py | 281 +++++++++++ src/html_compose/elements/b_element.py | 240 +++++++++ src/html_compose/elements/base_element.py | 254 ++++++++++ src/html_compose/elements/bdi_element.py | 240 +++++++++ src/html_compose/elements/bdo_element.py | 240 +++++++++ .../elements/blockquote_element.py | 247 ++++++++++ src/html_compose/elements/body_element.py | 240 +++++++++ src/html_compose/elements/br_element.py | 240 +++++++++ src/html_compose/elements/button_element.py | 330 +++++++++++++ src/html_compose/elements/canvas_element.py | 250 ++++++++++ src/html_compose/elements/caption_element.py | 240 +++++++++ src/html_compose/elements/cite_element.py | 240 +++++++++ src/html_compose/elements/code_element.py | 240 +++++++++ src/html_compose/elements/col_element.py | 247 ++++++++++ src/html_compose/elements/colgroup_element.py | 247 ++++++++++ src/html_compose/elements/data_element.py | 245 +++++++++ src/html_compose/elements/datalist_element.py | 240 +++++++++ src/html_compose/elements/dd_element.py | 240 +++++++++ src/html_compose/elements/del__element.py | 254 ++++++++++ src/html_compose/elements/details_element.py | 250 ++++++++++ src/html_compose/elements/dfn_element.py | 240 +++++++++ src/html_compose/elements/dialog_element.py | 245 +++++++++ src/html_compose/elements/div_element.py | 240 +++++++++ src/html_compose/elements/dl_element.py | 240 +++++++++ src/html_compose/elements/dt_element.py | 240 +++++++++ src/html_compose/elements/em_element.py | 240 +++++++++ src/html_compose/elements/embed_element.py | 264 ++++++++++ src/html_compose/elements/fieldset_element.py | 257 ++++++++++ .../elements/figcaption_element.py | 240 +++++++++ src/html_compose/elements/figure_element.py | 240 +++++++++ src/html_compose/elements/footer_element.py | 240 +++++++++ src/html_compose/elements/form_element.py | 295 +++++++++++ src/html_compose/elements/h1_element.py | 240 +++++++++ src/html_compose/elements/h2_element.py | 240 +++++++++ src/html_compose/elements/h3_element.py | 240 +++++++++ src/html_compose/elements/h4_element.py | 240 +++++++++ src/html_compose/elements/h5_element.py | 240 +++++++++ src/html_compose/elements/h6_element.py | 240 +++++++++ src/html_compose/elements/head_element.py | 240 +++++++++ src/html_compose/elements/header_element.py | 240 +++++++++ src/html_compose/elements/hgroup_element.py | 240 +++++++++ src/html_compose/elements/hr_element.py | 240 +++++++++ src/html_compose/elements/html_element.py | 240 +++++++++ src/html_compose/elements/i_element.py | 240 +++++++++ src/html_compose/elements/iframe_element.py | 300 ++++++++++++ src/html_compose/elements/img_element.py | 326 ++++++++++++ src/html_compose/elements/input_element.py | 463 ++++++++++++++++++ src/html_compose/elements/ins_element.py | 254 ++++++++++ src/html_compose/elements/kbd_element.py | 240 +++++++++ src/html_compose/elements/label_element.py | 247 ++++++++++ src/html_compose/elements/legend_element.py | 240 +++++++++ src/html_compose/elements/li_element.py | 245 +++++++++ src/html_compose/elements/link_element.py | 344 +++++++++++++ src/html_compose/elements/main_element.py | 240 +++++++++ src/html_compose/elements/map_element.py | 245 +++++++++ src/html_compose/elements/mark_element.py | 240 +++++++++ src/html_compose/elements/menu_element.py | 240 +++++++++ src/html_compose/elements/meta_element.py | 278 +++++++++++ src/html_compose/elements/meter_element.py | 270 ++++++++++ src/html_compose/elements/nav_element.py | 240 +++++++++ src/html_compose/elements/noscript_element.py | 240 +++++++++ src/html_compose/elements/object_element.py | 286 +++++++++++ src/html_compose/elements/ol_element.py | 255 ++++++++++ src/html_compose/elements/optgroup_element.py | 250 ++++++++++ src/html_compose/elements/option_element.py | 260 ++++++++++ src/html_compose/elements/output_element.py | 265 ++++++++++ src/html_compose/elements/p_element.py | 240 +++++++++ src/html_compose/elements/picture_element.py | 240 +++++++++ src/html_compose/elements/pre_element.py | 240 +++++++++ src/html_compose/elements/progress_element.py | 250 ++++++++++ src/html_compose/elements/q_element.py | 247 ++++++++++ src/html_compose/elements/rp_element.py | 240 +++++++++ src/html_compose/elements/rt_element.py | 240 +++++++++ src/html_compose/elements/ruby_element.py | 240 +++++++++ src/html_compose/elements/s_element.py | 240 +++++++++ src/html_compose/elements/samp_element.py | 240 +++++++++ src/html_compose/elements/script_element.py | 300 ++++++++++++ src/html_compose/elements/search_element.py | 240 +++++++++ src/html_compose/elements/section_element.py | 240 +++++++++ src/html_compose/elements/select_element.py | 291 +++++++++++ src/html_compose/elements/slot_element.py | 245 +++++++++ src/html_compose/elements/small_element.py | 240 +++++++++ src/html_compose/elements/source_element.py | 285 +++++++++++ src/html_compose/elements/span_element.py | 240 +++++++++ src/html_compose/elements/strong_element.py | 240 +++++++++ src/html_compose/elements/style_element.py | 252 ++++++++++ src/html_compose/elements/sub_element.py | 240 +++++++++ src/html_compose/elements/summary_element.py | 240 +++++++++ src/html_compose/elements/sup_element.py | 240 +++++++++ src/html_compose/elements/svg_element.py | 240 +++++++++ src/html_compose/elements/table_element.py | 240 +++++++++ src/html_compose/elements/tbody_element.py | 240 +++++++++ src/html_compose/elements/td_element.py | 257 ++++++++++ src/html_compose/elements/template_element.py | 267 ++++++++++ src/html_compose/elements/textarea_element.py | 323 ++++++++++++ src/html_compose/elements/tfoot_element.py | 240 +++++++++ src/html_compose/elements/th_element.py | 269 ++++++++++ src/html_compose/elements/thead_element.py | 240 +++++++++ src/html_compose/elements/time_element.py | 247 ++++++++++ src/html_compose/elements/title_element.py | 240 +++++++++ src/html_compose/elements/tr_element.py | 240 +++++++++ src/html_compose/elements/track_element.py | 280 +++++++++++ src/html_compose/elements/u_element.py | 240 +++++++++ src/html_compose/elements/ul_element.py | 240 +++++++++ src/html_compose/elements/var_element.py | 240 +++++++++ src/html_compose/elements/video_element.py | 303 ++++++++++++ src/html_compose/elements/wbr_element.py | 240 +++++++++ tools/generate_elements.py | 35 +- tools/generated/elements/a_element.py | 253 ++++++++++ tools/generated/elements/abbr_element.py | 203 ++++++++ tools/generated/elements/address_element.py | 203 ++++++++ tools/generated/elements/area_element.py | 256 ++++++++++ tools/generated/elements/article_element.py | 203 ++++++++ tools/generated/elements/aside_element.py | 203 ++++++++ tools/generated/elements/audio_element.py | 240 +++++++++ tools/generated/elements/b_element.py | 203 ++++++++ tools/generated/elements/base_element.py | 217 ++++++++ tools/generated/elements/bdi_element.py | 203 ++++++++ tools/generated/elements/bdo_element.py | 203 ++++++++ .../generated/elements/blockquote_element.py | 210 ++++++++ tools/generated/elements/body_element.py | 203 ++++++++ tools/generated/elements/br_element.py | 203 ++++++++ tools/generated/elements/button_element.py | 271 ++++++++++ tools/generated/elements/canvas_element.py | 213 ++++++++ tools/generated/elements/caption_element.py | 203 ++++++++ tools/generated/elements/cite_element.py | 203 ++++++++ tools/generated/elements/code_element.py | 203 ++++++++ tools/generated/elements/col_element.py | 210 ++++++++ tools/generated/elements/colgroup_element.py | 210 ++++++++ tools/generated/elements/data_element.py | 208 ++++++++ tools/generated/elements/datalist_element.py | 203 ++++++++ tools/generated/elements/dd_element.py | 203 ++++++++ tools/generated/elements/del__element.py | 217 ++++++++ tools/generated/elements/details_element.py | 213 ++++++++ tools/generated/elements/dfn_element.py | 203 ++++++++ tools/generated/elements/dialog_element.py | 208 ++++++++ tools/generated/elements/div_element.py | 203 ++++++++ tools/generated/elements/dl_element.py | 203 ++++++++ tools/generated/elements/dt_element.py | 203 ++++++++ tools/generated/elements/em_element.py | 203 ++++++++ tools/generated/elements/embed_element.py | 227 +++++++++ tools/generated/elements/fieldset_element.py | 220 +++++++++ .../generated/elements/figcaption_element.py | 203 ++++++++ tools/generated/elements/figure_element.py | 203 ++++++++ tools/generated/elements/footer_element.py | 203 ++++++++ tools/generated/elements/form_element.py | 249 ++++++++++ tools/generated/elements/h1_element.py | 203 ++++++++ tools/generated/elements/h2_element.py | 203 ++++++++ tools/generated/elements/h3_element.py | 203 ++++++++ tools/generated/elements/h4_element.py | 203 ++++++++ tools/generated/elements/h5_element.py | 203 ++++++++ tools/generated/elements/h6_element.py | 203 ++++++++ tools/generated/elements/head_element.py | 203 ++++++++ tools/generated/elements/header_element.py | 203 ++++++++ tools/generated/elements/hgroup_element.py | 203 ++++++++ tools/generated/elements/hr_element.py | 203 ++++++++ tools/generated/elements/html_element.py | 203 ++++++++ tools/generated/elements/i_element.py | 203 ++++++++ tools/generated/elements/iframe_element.py | 263 ++++++++++ tools/generated/elements/img_element.py | 278 +++++++++++ tools/generated/elements/input_element.py | 401 +++++++++++++++ tools/generated/elements/ins_element.py | 217 ++++++++ tools/generated/elements/kbd_element.py | 203 ++++++++ tools/generated/elements/label_element.py | 210 ++++++++ tools/generated/elements/legend_element.py | 203 ++++++++ tools/generated/elements/li_element.py | 208 ++++++++ tools/generated/elements/link_element.py | 303 ++++++++++++ tools/generated/elements/main_element.py | 203 ++++++++ tools/generated/elements/map_element.py | 208 ++++++++ tools/generated/elements/mark_element.py | 203 ++++++++ tools/generated/elements/menu_element.py | 203 ++++++++ tools/generated/elements/meta_element.py | 230 +++++++++ tools/generated/elements/meter_element.py | 233 +++++++++ tools/generated/elements/nav_element.py | 203 ++++++++ tools/generated/elements/noscript_element.py | 203 ++++++++ tools/generated/elements/object_element.py | 241 +++++++++ tools/generated/elements/ol_element.py | 218 +++++++++ tools/generated/elements/optgroup_element.py | 213 ++++++++ tools/generated/elements/option_element.py | 223 +++++++++ tools/generated/elements/output_element.py | 220 +++++++++ tools/generated/elements/p_element.py | 203 ++++++++ tools/generated/elements/picture_element.py | 203 ++++++++ tools/generated/elements/pre_element.py | 203 ++++++++ tools/generated/elements/progress_element.py | 213 ++++++++ tools/generated/elements/q_element.py | 210 ++++++++ tools/generated/elements/rp_element.py | 203 ++++++++ tools/generated/elements/rt_element.py | 203 ++++++++ tools/generated/elements/ruby_element.py | 203 ++++++++ tools/generated/elements/s_element.py | 203 ++++++++ tools/generated/elements/samp_element.py | 203 ++++++++ tools/generated/elements/script_element.py | 259 ++++++++++ tools/generated/elements/search_element.py | 203 ++++++++ tools/generated/elements/section_element.py | 203 ++++++++ tools/generated/elements/select_element.py | 244 +++++++++ tools/generated/elements/slot_element.py | 208 ++++++++ tools/generated/elements/small_element.py | 203 ++++++++ tools/generated/elements/source_element.py | 248 ++++++++++ tools/generated/elements/span_element.py | 203 ++++++++ tools/generated/elements/strong_element.py | 203 ++++++++ tools/generated/elements/style_element.py | 215 ++++++++ tools/generated/elements/sub_element.py | 203 ++++++++ tools/generated/elements/summary_element.py | 203 ++++++++ tools/generated/elements/sup_element.py | 203 ++++++++ tools/generated/elements/svg_element.py | 203 ++++++++ tools/generated/elements/table_element.py | 203 ++++++++ tools/generated/elements/tbody_element.py | 203 ++++++++ tools/generated/elements/td_element.py | 220 +++++++++ tools/generated/elements/template_element.py | 223 +++++++++ tools/generated/elements/textarea_element.py | 276 +++++++++++ tools/generated/elements/tfoot_element.py | 203 ++++++++ tools/generated/elements/th_element.py | 230 +++++++++ tools/generated/elements/thead_element.py | 203 ++++++++ tools/generated/elements/time_element.py | 210 ++++++++ tools/generated/elements/title_element.py | 203 ++++++++ tools/generated/elements/tr_element.py | 203 ++++++++ tools/generated/elements/track_element.py | 232 +++++++++ tools/generated/elements/u_element.py | 203 ++++++++ tools/generated/elements/ul_element.py | 203 ++++++++ tools/generated/elements/var_element.py | 203 ++++++++ tools/generated/elements/video_element.py | 262 ++++++++++ tools/generated/elements/wbr_element.py | 203 ++++++++ 229 files changed, 53276 insertions(+), 11 deletions(-) create mode 100644 src/html_compose/elements/__init__.py create mode 100644 src/html_compose/elements/a_element.py create mode 100644 src/html_compose/elements/abbr_element.py create mode 100644 src/html_compose/elements/address_element.py create mode 100644 src/html_compose/elements/area_element.py create mode 100644 src/html_compose/elements/article_element.py create mode 100644 src/html_compose/elements/aside_element.py create mode 100644 src/html_compose/elements/audio_element.py create mode 100644 src/html_compose/elements/b_element.py create mode 100644 src/html_compose/elements/base_element.py create mode 100644 src/html_compose/elements/bdi_element.py create mode 100644 src/html_compose/elements/bdo_element.py create mode 100644 src/html_compose/elements/blockquote_element.py create mode 100644 src/html_compose/elements/body_element.py create mode 100644 src/html_compose/elements/br_element.py create mode 100644 src/html_compose/elements/button_element.py create mode 100644 src/html_compose/elements/canvas_element.py create mode 100644 src/html_compose/elements/caption_element.py create mode 100644 src/html_compose/elements/cite_element.py create mode 100644 src/html_compose/elements/code_element.py create mode 100644 src/html_compose/elements/col_element.py create mode 100644 src/html_compose/elements/colgroup_element.py create mode 100644 src/html_compose/elements/data_element.py create mode 100644 src/html_compose/elements/datalist_element.py create mode 100644 src/html_compose/elements/dd_element.py create mode 100644 src/html_compose/elements/del__element.py create mode 100644 src/html_compose/elements/details_element.py create mode 100644 src/html_compose/elements/dfn_element.py create mode 100644 src/html_compose/elements/dialog_element.py create mode 100644 src/html_compose/elements/div_element.py create mode 100644 src/html_compose/elements/dl_element.py create mode 100644 src/html_compose/elements/dt_element.py create mode 100644 src/html_compose/elements/em_element.py create mode 100644 src/html_compose/elements/embed_element.py create mode 100644 src/html_compose/elements/fieldset_element.py create mode 100644 src/html_compose/elements/figcaption_element.py create mode 100644 src/html_compose/elements/figure_element.py create mode 100644 src/html_compose/elements/footer_element.py create mode 100644 src/html_compose/elements/form_element.py create mode 100644 src/html_compose/elements/h1_element.py create mode 100644 src/html_compose/elements/h2_element.py create mode 100644 src/html_compose/elements/h3_element.py create mode 100644 src/html_compose/elements/h4_element.py create mode 100644 src/html_compose/elements/h5_element.py create mode 100644 src/html_compose/elements/h6_element.py create mode 100644 src/html_compose/elements/head_element.py create mode 100644 src/html_compose/elements/header_element.py create mode 100644 src/html_compose/elements/hgroup_element.py create mode 100644 src/html_compose/elements/hr_element.py create mode 100644 src/html_compose/elements/html_element.py create mode 100644 src/html_compose/elements/i_element.py create mode 100644 src/html_compose/elements/iframe_element.py create mode 100644 src/html_compose/elements/img_element.py create mode 100644 src/html_compose/elements/input_element.py create mode 100644 src/html_compose/elements/ins_element.py create mode 100644 src/html_compose/elements/kbd_element.py create mode 100644 src/html_compose/elements/label_element.py create mode 100644 src/html_compose/elements/legend_element.py create mode 100644 src/html_compose/elements/li_element.py create mode 100644 src/html_compose/elements/link_element.py create mode 100644 src/html_compose/elements/main_element.py create mode 100644 src/html_compose/elements/map_element.py create mode 100644 src/html_compose/elements/mark_element.py create mode 100644 src/html_compose/elements/menu_element.py create mode 100644 src/html_compose/elements/meta_element.py create mode 100644 src/html_compose/elements/meter_element.py create mode 100644 src/html_compose/elements/nav_element.py create mode 100644 src/html_compose/elements/noscript_element.py create mode 100644 src/html_compose/elements/object_element.py create mode 100644 src/html_compose/elements/ol_element.py create mode 100644 src/html_compose/elements/optgroup_element.py create mode 100644 src/html_compose/elements/option_element.py create mode 100644 src/html_compose/elements/output_element.py create mode 100644 src/html_compose/elements/p_element.py create mode 100644 src/html_compose/elements/picture_element.py create mode 100644 src/html_compose/elements/pre_element.py create mode 100644 src/html_compose/elements/progress_element.py create mode 100644 src/html_compose/elements/q_element.py create mode 100644 src/html_compose/elements/rp_element.py create mode 100644 src/html_compose/elements/rt_element.py create mode 100644 src/html_compose/elements/ruby_element.py create mode 100644 src/html_compose/elements/s_element.py create mode 100644 src/html_compose/elements/samp_element.py create mode 100644 src/html_compose/elements/script_element.py create mode 100644 src/html_compose/elements/search_element.py create mode 100644 src/html_compose/elements/section_element.py create mode 100644 src/html_compose/elements/select_element.py create mode 100644 src/html_compose/elements/slot_element.py create mode 100644 src/html_compose/elements/small_element.py create mode 100644 src/html_compose/elements/source_element.py create mode 100644 src/html_compose/elements/span_element.py create mode 100644 src/html_compose/elements/strong_element.py create mode 100644 src/html_compose/elements/style_element.py create mode 100644 src/html_compose/elements/sub_element.py create mode 100644 src/html_compose/elements/summary_element.py create mode 100644 src/html_compose/elements/sup_element.py create mode 100644 src/html_compose/elements/svg_element.py create mode 100644 src/html_compose/elements/table_element.py create mode 100644 src/html_compose/elements/tbody_element.py create mode 100644 src/html_compose/elements/td_element.py create mode 100644 src/html_compose/elements/template_element.py create mode 100644 src/html_compose/elements/textarea_element.py create mode 100644 src/html_compose/elements/tfoot_element.py create mode 100644 src/html_compose/elements/th_element.py create mode 100644 src/html_compose/elements/thead_element.py create mode 100644 src/html_compose/elements/time_element.py create mode 100644 src/html_compose/elements/title_element.py create mode 100644 src/html_compose/elements/tr_element.py create mode 100644 src/html_compose/elements/track_element.py create mode 100644 src/html_compose/elements/u_element.py create mode 100644 src/html_compose/elements/ul_element.py create mode 100644 src/html_compose/elements/var_element.py create mode 100644 src/html_compose/elements/video_element.py create mode 100644 src/html_compose/elements/wbr_element.py create mode 100644 tools/generated/elements/a_element.py create mode 100644 tools/generated/elements/abbr_element.py create mode 100644 tools/generated/elements/address_element.py create mode 100644 tools/generated/elements/area_element.py create mode 100644 tools/generated/elements/article_element.py create mode 100644 tools/generated/elements/aside_element.py create mode 100644 tools/generated/elements/audio_element.py create mode 100644 tools/generated/elements/b_element.py create mode 100644 tools/generated/elements/base_element.py create mode 100644 tools/generated/elements/bdi_element.py create mode 100644 tools/generated/elements/bdo_element.py create mode 100644 tools/generated/elements/blockquote_element.py create mode 100644 tools/generated/elements/body_element.py create mode 100644 tools/generated/elements/br_element.py create mode 100644 tools/generated/elements/button_element.py create mode 100644 tools/generated/elements/canvas_element.py create mode 100644 tools/generated/elements/caption_element.py create mode 100644 tools/generated/elements/cite_element.py create mode 100644 tools/generated/elements/code_element.py create mode 100644 tools/generated/elements/col_element.py create mode 100644 tools/generated/elements/colgroup_element.py create mode 100644 tools/generated/elements/data_element.py create mode 100644 tools/generated/elements/datalist_element.py create mode 100644 tools/generated/elements/dd_element.py create mode 100644 tools/generated/elements/del__element.py create mode 100644 tools/generated/elements/details_element.py create mode 100644 tools/generated/elements/dfn_element.py create mode 100644 tools/generated/elements/dialog_element.py create mode 100644 tools/generated/elements/div_element.py create mode 100644 tools/generated/elements/dl_element.py create mode 100644 tools/generated/elements/dt_element.py create mode 100644 tools/generated/elements/em_element.py create mode 100644 tools/generated/elements/embed_element.py create mode 100644 tools/generated/elements/fieldset_element.py create mode 100644 tools/generated/elements/figcaption_element.py create mode 100644 tools/generated/elements/figure_element.py create mode 100644 tools/generated/elements/footer_element.py create mode 100644 tools/generated/elements/form_element.py create mode 100644 tools/generated/elements/h1_element.py create mode 100644 tools/generated/elements/h2_element.py create mode 100644 tools/generated/elements/h3_element.py create mode 100644 tools/generated/elements/h4_element.py create mode 100644 tools/generated/elements/h5_element.py create mode 100644 tools/generated/elements/h6_element.py create mode 100644 tools/generated/elements/head_element.py create mode 100644 tools/generated/elements/header_element.py create mode 100644 tools/generated/elements/hgroup_element.py create mode 100644 tools/generated/elements/hr_element.py create mode 100644 tools/generated/elements/html_element.py create mode 100644 tools/generated/elements/i_element.py create mode 100644 tools/generated/elements/iframe_element.py create mode 100644 tools/generated/elements/img_element.py create mode 100644 tools/generated/elements/input_element.py create mode 100644 tools/generated/elements/ins_element.py create mode 100644 tools/generated/elements/kbd_element.py create mode 100644 tools/generated/elements/label_element.py create mode 100644 tools/generated/elements/legend_element.py create mode 100644 tools/generated/elements/li_element.py create mode 100644 tools/generated/elements/link_element.py create mode 100644 tools/generated/elements/main_element.py create mode 100644 tools/generated/elements/map_element.py create mode 100644 tools/generated/elements/mark_element.py create mode 100644 tools/generated/elements/menu_element.py create mode 100644 tools/generated/elements/meta_element.py create mode 100644 tools/generated/elements/meter_element.py create mode 100644 tools/generated/elements/nav_element.py create mode 100644 tools/generated/elements/noscript_element.py create mode 100644 tools/generated/elements/object_element.py create mode 100644 tools/generated/elements/ol_element.py create mode 100644 tools/generated/elements/optgroup_element.py create mode 100644 tools/generated/elements/option_element.py create mode 100644 tools/generated/elements/output_element.py create mode 100644 tools/generated/elements/p_element.py create mode 100644 tools/generated/elements/picture_element.py create mode 100644 tools/generated/elements/pre_element.py create mode 100644 tools/generated/elements/progress_element.py create mode 100644 tools/generated/elements/q_element.py create mode 100644 tools/generated/elements/rp_element.py create mode 100644 tools/generated/elements/rt_element.py create mode 100644 tools/generated/elements/ruby_element.py create mode 100644 tools/generated/elements/s_element.py create mode 100644 tools/generated/elements/samp_element.py create mode 100644 tools/generated/elements/script_element.py create mode 100644 tools/generated/elements/search_element.py create mode 100644 tools/generated/elements/section_element.py create mode 100644 tools/generated/elements/select_element.py create mode 100644 tools/generated/elements/slot_element.py create mode 100644 tools/generated/elements/small_element.py create mode 100644 tools/generated/elements/source_element.py create mode 100644 tools/generated/elements/span_element.py create mode 100644 tools/generated/elements/strong_element.py create mode 100644 tools/generated/elements/style_element.py create mode 100644 tools/generated/elements/sub_element.py create mode 100644 tools/generated/elements/summary_element.py create mode 100644 tools/generated/elements/sup_element.py create mode 100644 tools/generated/elements/svg_element.py create mode 100644 tools/generated/elements/table_element.py create mode 100644 tools/generated/elements/tbody_element.py create mode 100644 tools/generated/elements/td_element.py create mode 100644 tools/generated/elements/template_element.py create mode 100644 tools/generated/elements/textarea_element.py create mode 100644 tools/generated/elements/tfoot_element.py create mode 100644 tools/generated/elements/th_element.py create mode 100644 tools/generated/elements/thead_element.py create mode 100644 tools/generated/elements/time_element.py create mode 100644 tools/generated/elements/title_element.py create mode 100644 tools/generated/elements/tr_element.py create mode 100644 tools/generated/elements/track_element.py create mode 100644 tools/generated/elements/u_element.py create mode 100644 tools/generated/elements/ul_element.py create mode 100644 tools/generated/elements/var_element.py create mode 100644 tools/generated/elements/video_element.py create mode 100644 tools/generated/elements/wbr_element.py diff --git a/requirements-dev.lock b/requirements-dev.lock index 26ba317..e82263b 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,6 +67,7 @@ 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 diff --git a/src/html_compose/elements/__init__.py b/src/html_compose/elements/__init__.py new file mode 100644 index 0000000..610e19f --- /dev/null +++ b/src/html_compose/elements/__init__.py @@ -0,0 +1,229 @@ +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 + +__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..872b49b --- /dev/null +++ b/src/html_compose/elements/a_element.py @@ -0,0 +1,290 @@ +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..d1b92ea --- /dev/null +++ b/src/html_compose/elements/abbr_element.py @@ -0,0 +1,240 @@ +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..62ae5b4 --- /dev/null +++ b/src/html_compose/elements/address_element.py @@ -0,0 +1,240 @@ +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..b292a8d --- /dev/null +++ b/src/html_compose/elements/area_element.py @@ -0,0 +1,295 @@ +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..6453337 --- /dev/null +++ b/src/html_compose/elements/article_element.py @@ -0,0 +1,240 @@ +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..660cb5f --- /dev/null +++ b/src/html_compose/elements/aside_element.py @@ -0,0 +1,240 @@ +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..0326f55 --- /dev/null +++ b/src/html_compose/elements/audio_element.py @@ -0,0 +1,281 @@ +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..358d69c --- /dev/null +++ b/src/html_compose/elements/b_element.py @@ -0,0 +1,240 @@ +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..8949327 --- /dev/null +++ b/src/html_compose/elements/base_element.py @@ -0,0 +1,254 @@ +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..26d1a26 --- /dev/null +++ b/src/html_compose/elements/bdi_element.py @@ -0,0 +1,240 @@ +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..8d4bf17 --- /dev/null +++ b/src/html_compose/elements/bdo_element.py @@ -0,0 +1,240 @@ +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..27bc508 --- /dev/null +++ b/src/html_compose/elements/blockquote_element.py @@ -0,0 +1,247 @@ +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..877ac35 --- /dev/null +++ b/src/html_compose/elements/body_element.py @@ -0,0 +1,240 @@ +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..89d505b --- /dev/null +++ b/src/html_compose/elements/br_element.py @@ -0,0 +1,240 @@ +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..f508401 --- /dev/null +++ b/src/html_compose/elements/button_element.py @@ -0,0 +1,330 @@ +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..87ab92f --- /dev/null +++ b/src/html_compose/elements/canvas_element.py @@ -0,0 +1,250 @@ +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..83aae20 --- /dev/null +++ b/src/html_compose/elements/caption_element.py @@ -0,0 +1,240 @@ +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..4573c61 --- /dev/null +++ b/src/html_compose/elements/cite_element.py @@ -0,0 +1,240 @@ +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..c347d80 --- /dev/null +++ b/src/html_compose/elements/code_element.py @@ -0,0 +1,240 @@ +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..1504963 --- /dev/null +++ b/src/html_compose/elements/col_element.py @@ -0,0 +1,247 @@ +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..6961679 --- /dev/null +++ b/src/html_compose/elements/colgroup_element.py @@ -0,0 +1,247 @@ +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..add25ff --- /dev/null +++ b/src/html_compose/elements/data_element.py @@ -0,0 +1,245 @@ +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..43a96b6 --- /dev/null +++ b/src/html_compose/elements/datalist_element.py @@ -0,0 +1,240 @@ +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..3ea6b26 --- /dev/null +++ b/src/html_compose/elements/dd_element.py @@ -0,0 +1,240 @@ +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..7cb3779 --- /dev/null +++ b/src/html_compose/elements/del__element.py @@ -0,0 +1,254 @@ +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..e4b2bd9 --- /dev/null +++ b/src/html_compose/elements/details_element.py @@ -0,0 +1,250 @@ +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..59e5b10 --- /dev/null +++ b/src/html_compose/elements/dfn_element.py @@ -0,0 +1,240 @@ +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..4f8ec5f --- /dev/null +++ b/src/html_compose/elements/dialog_element.py @@ -0,0 +1,245 @@ +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..bfb5b92 --- /dev/null +++ b/src/html_compose/elements/div_element.py @@ -0,0 +1,240 @@ +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..a0ed908 --- /dev/null +++ b/src/html_compose/elements/dl_element.py @@ -0,0 +1,240 @@ +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..468179f --- /dev/null +++ b/src/html_compose/elements/dt_element.py @@ -0,0 +1,240 @@ +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..e2afdcf --- /dev/null +++ b/src/html_compose/elements/em_element.py @@ -0,0 +1,240 @@ +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..a050140 --- /dev/null +++ b/src/html_compose/elements/embed_element.py @@ -0,0 +1,264 @@ +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..fc36a62 --- /dev/null +++ b/src/html_compose/elements/fieldset_element.py @@ -0,0 +1,257 @@ +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..1029e2d --- /dev/null +++ b/src/html_compose/elements/figcaption_element.py @@ -0,0 +1,240 @@ +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..04f5955 --- /dev/null +++ b/src/html_compose/elements/figure_element.py @@ -0,0 +1,240 @@ +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..0a72834 --- /dev/null +++ b/src/html_compose/elements/footer_element.py @@ -0,0 +1,240 @@ +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..b29c7a1 --- /dev/null +++ b/src/html_compose/elements/form_element.py @@ -0,0 +1,295 @@ +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..b5671ac --- /dev/null +++ b/src/html_compose/elements/h1_element.py @@ -0,0 +1,240 @@ +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..65230e3 --- /dev/null +++ b/src/html_compose/elements/h2_element.py @@ -0,0 +1,240 @@ +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..84c2b2e --- /dev/null +++ b/src/html_compose/elements/h3_element.py @@ -0,0 +1,240 @@ +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..ea97bb1 --- /dev/null +++ b/src/html_compose/elements/h4_element.py @@ -0,0 +1,240 @@ +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..65eba3b --- /dev/null +++ b/src/html_compose/elements/h5_element.py @@ -0,0 +1,240 @@ +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..9b6b749 --- /dev/null +++ b/src/html_compose/elements/h6_element.py @@ -0,0 +1,240 @@ +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..b39d856 --- /dev/null +++ b/src/html_compose/elements/head_element.py @@ -0,0 +1,240 @@ +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..2265cbf --- /dev/null +++ b/src/html_compose/elements/header_element.py @@ -0,0 +1,240 @@ +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..72d4a55 --- /dev/null +++ b/src/html_compose/elements/hgroup_element.py @@ -0,0 +1,240 @@ +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..68e339f --- /dev/null +++ b/src/html_compose/elements/hr_element.py @@ -0,0 +1,240 @@ +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..5af2fe0 --- /dev/null +++ b/src/html_compose/elements/html_element.py @@ -0,0 +1,240 @@ +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..eb1a4e5 --- /dev/null +++ b/src/html_compose/elements/i_element.py @@ -0,0 +1,240 @@ +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..e37554b --- /dev/null +++ b/src/html_compose/elements/iframe_element.py @@ -0,0 +1,300 @@ +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..a39588d --- /dev/null +++ b/src/html_compose/elements/img_element.py @@ -0,0 +1,326 @@ +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..febfd9a --- /dev/null +++ b/src/html_compose/elements/input_element.py @@ -0,0 +1,463 @@ +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..7112ff6 --- /dev/null +++ b/src/html_compose/elements/ins_element.py @@ -0,0 +1,254 @@ +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..6cae746 --- /dev/null +++ b/src/html_compose/elements/kbd_element.py @@ -0,0 +1,240 @@ +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..1a396cc --- /dev/null +++ b/src/html_compose/elements/label_element.py @@ -0,0 +1,247 @@ +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..c3fa133 --- /dev/null +++ b/src/html_compose/elements/legend_element.py @@ -0,0 +1,240 @@ +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..a2f5b41 --- /dev/null +++ b/src/html_compose/elements/li_element.py @@ -0,0 +1,245 @@ +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..1c1bf56 --- /dev/null +++ b/src/html_compose/elements/link_element.py @@ -0,0 +1,344 @@ +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..5bae259 --- /dev/null +++ b/src/html_compose/elements/main_element.py @@ -0,0 +1,240 @@ +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..48fb39b --- /dev/null +++ b/src/html_compose/elements/map_element.py @@ -0,0 +1,245 @@ +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..0ad8956 --- /dev/null +++ b/src/html_compose/elements/mark_element.py @@ -0,0 +1,240 @@ +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..8379fd2 --- /dev/null +++ b/src/html_compose/elements/menu_element.py @@ -0,0 +1,240 @@ +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..3f819ca --- /dev/null +++ b/src/html_compose/elements/meta_element.py @@ -0,0 +1,278 @@ +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..6cf8b89 --- /dev/null +++ b/src/html_compose/elements/meter_element.py @@ -0,0 +1,270 @@ +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..bf476b7 --- /dev/null +++ b/src/html_compose/elements/nav_element.py @@ -0,0 +1,240 @@ +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..1f22650 --- /dev/null +++ b/src/html_compose/elements/noscript_element.py @@ -0,0 +1,240 @@ +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..df4ba7a --- /dev/null +++ b/src/html_compose/elements/object_element.py @@ -0,0 +1,286 @@ +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..15bb823 --- /dev/null +++ b/src/html_compose/elements/ol_element.py @@ -0,0 +1,255 @@ +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..c296508 --- /dev/null +++ b/src/html_compose/elements/optgroup_element.py @@ -0,0 +1,250 @@ +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..4ef0bcd --- /dev/null +++ b/src/html_compose/elements/option_element.py @@ -0,0 +1,260 @@ +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..56cbca9 --- /dev/null +++ b/src/html_compose/elements/output_element.py @@ -0,0 +1,265 @@ +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..5e526d1 --- /dev/null +++ b/src/html_compose/elements/p_element.py @@ -0,0 +1,240 @@ +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..ea6aa04 --- /dev/null +++ b/src/html_compose/elements/picture_element.py @@ -0,0 +1,240 @@ +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..48462fd --- /dev/null +++ b/src/html_compose/elements/pre_element.py @@ -0,0 +1,240 @@ +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..0119060 --- /dev/null +++ b/src/html_compose/elements/progress_element.py @@ -0,0 +1,250 @@ +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..0753fb0 --- /dev/null +++ b/src/html_compose/elements/q_element.py @@ -0,0 +1,247 @@ +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..fbd3521 --- /dev/null +++ b/src/html_compose/elements/rp_element.py @@ -0,0 +1,240 @@ +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..b42e311 --- /dev/null +++ b/src/html_compose/elements/rt_element.py @@ -0,0 +1,240 @@ +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..c254bb5 --- /dev/null +++ b/src/html_compose/elements/ruby_element.py @@ -0,0 +1,240 @@ +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..4b9312e --- /dev/null +++ b/src/html_compose/elements/s_element.py @@ -0,0 +1,240 @@ +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..049b172 --- /dev/null +++ b/src/html_compose/elements/samp_element.py @@ -0,0 +1,240 @@ +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..8e15887 --- /dev/null +++ b/src/html_compose/elements/script_element.py @@ -0,0 +1,300 @@ +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..d5a5ff3 --- /dev/null +++ b/src/html_compose/elements/search_element.py @@ -0,0 +1,240 @@ +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..788ca35 --- /dev/null +++ b/src/html_compose/elements/section_element.py @@ -0,0 +1,240 @@ +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..bccea57 --- /dev/null +++ b/src/html_compose/elements/select_element.py @@ -0,0 +1,291 @@ +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..cb3fdbe --- /dev/null +++ b/src/html_compose/elements/slot_element.py @@ -0,0 +1,245 @@ +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..a2e9588 --- /dev/null +++ b/src/html_compose/elements/small_element.py @@ -0,0 +1,240 @@ +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..4f82c51 --- /dev/null +++ b/src/html_compose/elements/source_element.py @@ -0,0 +1,285 @@ +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..a13490e --- /dev/null +++ b/src/html_compose/elements/span_element.py @@ -0,0 +1,240 @@ +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..ab6b47b --- /dev/null +++ b/src/html_compose/elements/strong_element.py @@ -0,0 +1,240 @@ +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..f93552e --- /dev/null +++ b/src/html_compose/elements/style_element.py @@ -0,0 +1,252 @@ +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..738b01b --- /dev/null +++ b/src/html_compose/elements/sub_element.py @@ -0,0 +1,240 @@ +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..44a8e11 --- /dev/null +++ b/src/html_compose/elements/summary_element.py @@ -0,0 +1,240 @@ +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..5570c68 --- /dev/null +++ b/src/html_compose/elements/sup_element.py @@ -0,0 +1,240 @@ +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..7e583f8 --- /dev/null +++ b/src/html_compose/elements/svg_element.py @@ -0,0 +1,240 @@ +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..c9850bd --- /dev/null +++ b/src/html_compose/elements/table_element.py @@ -0,0 +1,240 @@ +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..8fb192e --- /dev/null +++ b/src/html_compose/elements/tbody_element.py @@ -0,0 +1,240 @@ +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..2602631 --- /dev/null +++ b/src/html_compose/elements/td_element.py @@ -0,0 +1,257 @@ +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..d81998a --- /dev/null +++ b/src/html_compose/elements/template_element.py @@ -0,0 +1,267 @@ +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..1f03c52 --- /dev/null +++ b/src/html_compose/elements/textarea_element.py @@ -0,0 +1,323 @@ +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..c8e3ec9 --- /dev/null +++ b/src/html_compose/elements/tfoot_element.py @@ -0,0 +1,240 @@ +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..39c740d --- /dev/null +++ b/src/html_compose/elements/th_element.py @@ -0,0 +1,269 @@ +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..c86fa2c --- /dev/null +++ b/src/html_compose/elements/thead_element.py @@ -0,0 +1,240 @@ +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..8f364a1 --- /dev/null +++ b/src/html_compose/elements/time_element.py @@ -0,0 +1,247 @@ +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..7181e6d --- /dev/null +++ b/src/html_compose/elements/title_element.py @@ -0,0 +1,240 @@ +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..2c4a863 --- /dev/null +++ b/src/html_compose/elements/tr_element.py @@ -0,0 +1,240 @@ +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..f31719f --- /dev/null +++ b/src/html_compose/elements/track_element.py @@ -0,0 +1,280 @@ +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..4d715bc --- /dev/null +++ b/src/html_compose/elements/u_element.py @@ -0,0 +1,240 @@ +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..482735f --- /dev/null +++ b/src/html_compose/elements/ul_element.py @@ -0,0 +1,240 @@ +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..838436d --- /dev/null +++ b/src/html_compose/elements/var_element.py @@ -0,0 +1,240 @@ +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..38707c2 --- /dev/null +++ b/src/html_compose/elements/video_element.py @@ -0,0 +1,303 @@ +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..ecb7017 --- /dev/null +++ b/src/html_compose/elements/wbr_element.py @@ -0,0 +1,240 @@ +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/tools/generate_elements.py b/tools/generate_elements.py index 421211f..07834af 100644 --- a/tools/generate_elements.py +++ b/tools/generate_elements.py @@ -228,17 +228,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 +250,31 @@ 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 = [] + 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(f"\n__all__ = [{imports}]") + (Path(path_name) / "__init__.py").write_text("\n".join(init_data)) diff --git a/tools/generated/elements/a_element.py b/tools/generated/elements/a_element.py new file mode 100644 index 0000000..c76010e --- /dev/null +++ b/tools/generated/elements/a_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 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..9cd6d8c --- /dev/null +++ b/tools/generated/elements/abbr_element.py @@ -0,0 +1,203 @@ +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..87a7c47 --- /dev/null +++ b/tools/generated/elements/address_element.py @@ -0,0 +1,203 @@ +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..a94656f --- /dev/null +++ b/tools/generated/elements/area_element.py @@ -0,0 +1,256 @@ +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..496e144 --- /dev/null +++ b/tools/generated/elements/article_element.py @@ -0,0 +1,203 @@ +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..fbfc91e --- /dev/null +++ b/tools/generated/elements/aside_element.py @@ -0,0 +1,203 @@ +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..724b35f --- /dev/null +++ b/tools/generated/elements/audio_element.py @@ -0,0 +1,240 @@ +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..54f8846 --- /dev/null +++ b/tools/generated/elements/b_element.py @@ -0,0 +1,203 @@ +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..f91e9be --- /dev/null +++ b/tools/generated/elements/base_element.py @@ -0,0 +1,217 @@ +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..303bc56 --- /dev/null +++ b/tools/generated/elements/bdi_element.py @@ -0,0 +1,203 @@ +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..7f939cb --- /dev/null +++ b/tools/generated/elements/bdo_element.py @@ -0,0 +1,203 @@ +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..a2a052a --- /dev/null +++ b/tools/generated/elements/blockquote_element.py @@ -0,0 +1,210 @@ +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..c96d061 --- /dev/null +++ b/tools/generated/elements/body_element.py @@ -0,0 +1,203 @@ +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..0ca4cea --- /dev/null +++ b/tools/generated/elements/br_element.py @@ -0,0 +1,203 @@ +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..6049a58 --- /dev/null +++ b/tools/generated/elements/button_element.py @@ -0,0 +1,271 @@ +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..1816f27 --- /dev/null +++ b/tools/generated/elements/canvas_element.py @@ -0,0 +1,213 @@ +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..c1607ab --- /dev/null +++ b/tools/generated/elements/caption_element.py @@ -0,0 +1,203 @@ +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..5db1f02 --- /dev/null +++ b/tools/generated/elements/cite_element.py @@ -0,0 +1,203 @@ +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..ab6d7a1 --- /dev/null +++ b/tools/generated/elements/code_element.py @@ -0,0 +1,203 @@ +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..0cfc08e --- /dev/null +++ b/tools/generated/elements/col_element.py @@ -0,0 +1,210 @@ +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..429f15b --- /dev/null +++ b/tools/generated/elements/colgroup_element.py @@ -0,0 +1,210 @@ +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..245fbd7 --- /dev/null +++ b/tools/generated/elements/data_element.py @@ -0,0 +1,208 @@ +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..9d1f186 --- /dev/null +++ b/tools/generated/elements/datalist_element.py @@ -0,0 +1,203 @@ +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..c29d991 --- /dev/null +++ b/tools/generated/elements/dd_element.py @@ -0,0 +1,203 @@ +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..d4db30c --- /dev/null +++ b/tools/generated/elements/del__element.py @@ -0,0 +1,217 @@ +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..6aa974e --- /dev/null +++ b/tools/generated/elements/details_element.py @@ -0,0 +1,213 @@ +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..5d712b9 --- /dev/null +++ b/tools/generated/elements/dfn_element.py @@ -0,0 +1,203 @@ +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..0f8ba18 --- /dev/null +++ b/tools/generated/elements/dialog_element.py @@ -0,0 +1,208 @@ +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..cc20cfa --- /dev/null +++ b/tools/generated/elements/div_element.py @@ -0,0 +1,203 @@ +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..37499da --- /dev/null +++ b/tools/generated/elements/dl_element.py @@ -0,0 +1,203 @@ +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..71fc56b --- /dev/null +++ b/tools/generated/elements/dt_element.py @@ -0,0 +1,203 @@ +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..5b24029 --- /dev/null +++ b/tools/generated/elements/em_element.py @@ -0,0 +1,203 @@ +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..fdfea70 --- /dev/null +++ b/tools/generated/elements/embed_element.py @@ -0,0 +1,227 @@ +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..24e9a27 --- /dev/null +++ b/tools/generated/elements/fieldset_element.py @@ -0,0 +1,220 @@ +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..76950dc --- /dev/null +++ b/tools/generated/elements/figcaption_element.py @@ -0,0 +1,203 @@ +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..3e8a4cb --- /dev/null +++ b/tools/generated/elements/figure_element.py @@ -0,0 +1,203 @@ +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..0bbcda3 --- /dev/null +++ b/tools/generated/elements/footer_element.py @@ -0,0 +1,203 @@ +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..406bf2e --- /dev/null +++ b/tools/generated/elements/form_element.py @@ -0,0 +1,249 @@ +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..3fa2741 --- /dev/null +++ b/tools/generated/elements/h1_element.py @@ -0,0 +1,203 @@ +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..d37de8c --- /dev/null +++ b/tools/generated/elements/h2_element.py @@ -0,0 +1,203 @@ +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..75f1a51 --- /dev/null +++ b/tools/generated/elements/h3_element.py @@ -0,0 +1,203 @@ +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..7f71a14 --- /dev/null +++ b/tools/generated/elements/h4_element.py @@ -0,0 +1,203 @@ +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..8f977a4 --- /dev/null +++ b/tools/generated/elements/h5_element.py @@ -0,0 +1,203 @@ +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..8c56714 --- /dev/null +++ b/tools/generated/elements/h6_element.py @@ -0,0 +1,203 @@ +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..b8d5dd7 --- /dev/null +++ b/tools/generated/elements/head_element.py @@ -0,0 +1,203 @@ +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..a24c227 --- /dev/null +++ b/tools/generated/elements/header_element.py @@ -0,0 +1,203 @@ +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..4c1d35b --- /dev/null +++ b/tools/generated/elements/hgroup_element.py @@ -0,0 +1,203 @@ +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..69e8375 --- /dev/null +++ b/tools/generated/elements/hr_element.py @@ -0,0 +1,203 @@ +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..f03c346 --- /dev/null +++ b/tools/generated/elements/html_element.py @@ -0,0 +1,203 @@ +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..dc12d91 --- /dev/null +++ b/tools/generated/elements/i_element.py @@ -0,0 +1,203 @@ +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..acda3db --- /dev/null +++ b/tools/generated/elements/iframe_element.py @@ -0,0 +1,263 @@ +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..a80e864 --- /dev/null +++ b/tools/generated/elements/img_element.py @@ -0,0 +1,278 @@ +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..2f80fb0 --- /dev/null +++ b/tools/generated/elements/input_element.py @@ -0,0 +1,401 @@ +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..5c77ac8 --- /dev/null +++ b/tools/generated/elements/ins_element.py @@ -0,0 +1,217 @@ +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..be59f09 --- /dev/null +++ b/tools/generated/elements/kbd_element.py @@ -0,0 +1,203 @@ +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..4d614b1 --- /dev/null +++ b/tools/generated/elements/label_element.py @@ -0,0 +1,210 @@ +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..b52f697 --- /dev/null +++ b/tools/generated/elements/legend_element.py @@ -0,0 +1,203 @@ +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..c036b91 --- /dev/null +++ b/tools/generated/elements/li_element.py @@ -0,0 +1,208 @@ +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..a801e58 --- /dev/null +++ b/tools/generated/elements/link_element.py @@ -0,0 +1,303 @@ +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..015e50f --- /dev/null +++ b/tools/generated/elements/main_element.py @@ -0,0 +1,203 @@ +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..b164714 --- /dev/null +++ b/tools/generated/elements/map_element.py @@ -0,0 +1,208 @@ +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..9b578e1 --- /dev/null +++ b/tools/generated/elements/mark_element.py @@ -0,0 +1,203 @@ +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..d48358f --- /dev/null +++ b/tools/generated/elements/menu_element.py @@ -0,0 +1,203 @@ +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..53b7e0c --- /dev/null +++ b/tools/generated/elements/meta_element.py @@ -0,0 +1,230 @@ +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..0acb6f1 --- /dev/null +++ b/tools/generated/elements/meter_element.py @@ -0,0 +1,233 @@ +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..8f6d936 --- /dev/null +++ b/tools/generated/elements/nav_element.py @@ -0,0 +1,203 @@ +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..f21eb93 --- /dev/null +++ b/tools/generated/elements/noscript_element.py @@ -0,0 +1,203 @@ +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..9b43142 --- /dev/null +++ b/tools/generated/elements/object_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 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..2464319 --- /dev/null +++ b/tools/generated/elements/ol_element.py @@ -0,0 +1,218 @@ +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..a71f8af --- /dev/null +++ b/tools/generated/elements/optgroup_element.py @@ -0,0 +1,213 @@ +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..7ea1eda --- /dev/null +++ b/tools/generated/elements/option_element.py @@ -0,0 +1,223 @@ +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..f2c3f3f --- /dev/null +++ b/tools/generated/elements/output_element.py @@ -0,0 +1,220 @@ +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..29457e0 --- /dev/null +++ b/tools/generated/elements/p_element.py @@ -0,0 +1,203 @@ +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..7ab3bec --- /dev/null +++ b/tools/generated/elements/picture_element.py @@ -0,0 +1,203 @@ +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..304a009 --- /dev/null +++ b/tools/generated/elements/pre_element.py @@ -0,0 +1,203 @@ +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..49ffb3b --- /dev/null +++ b/tools/generated/elements/progress_element.py @@ -0,0 +1,213 @@ +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..6541ae2 --- /dev/null +++ b/tools/generated/elements/q_element.py @@ -0,0 +1,210 @@ +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..a74dd0f --- /dev/null +++ b/tools/generated/elements/rp_element.py @@ -0,0 +1,203 @@ +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..d356190 --- /dev/null +++ b/tools/generated/elements/rt_element.py @@ -0,0 +1,203 @@ +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..6129668 --- /dev/null +++ b/tools/generated/elements/ruby_element.py @@ -0,0 +1,203 @@ +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..1c63166 --- /dev/null +++ b/tools/generated/elements/s_element.py @@ -0,0 +1,203 @@ +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..aec0731 --- /dev/null +++ b/tools/generated/elements/samp_element.py @@ -0,0 +1,203 @@ +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..9335976 --- /dev/null +++ b/tools/generated/elements/script_element.py @@ -0,0 +1,259 @@ +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..e528d4e --- /dev/null +++ b/tools/generated/elements/search_element.py @@ -0,0 +1,203 @@ +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..3b42d59 --- /dev/null +++ b/tools/generated/elements/section_element.py @@ -0,0 +1,203 @@ +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..b02da56 --- /dev/null +++ b/tools/generated/elements/select_element.py @@ -0,0 +1,244 @@ +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..59a92ea --- /dev/null +++ b/tools/generated/elements/slot_element.py @@ -0,0 +1,208 @@ +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..bab6b08 --- /dev/null +++ b/tools/generated/elements/small_element.py @@ -0,0 +1,203 @@ +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..e0874da --- /dev/null +++ b/tools/generated/elements/source_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 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..79b0312 --- /dev/null +++ b/tools/generated/elements/span_element.py @@ -0,0 +1,203 @@ +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..3b61690 --- /dev/null +++ b/tools/generated/elements/strong_element.py @@ -0,0 +1,203 @@ +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..b57412c --- /dev/null +++ b/tools/generated/elements/style_element.py @@ -0,0 +1,215 @@ +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..0484b98 --- /dev/null +++ b/tools/generated/elements/sub_element.py @@ -0,0 +1,203 @@ +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..ba48610 --- /dev/null +++ b/tools/generated/elements/summary_element.py @@ -0,0 +1,203 @@ +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..91482de --- /dev/null +++ b/tools/generated/elements/sup_element.py @@ -0,0 +1,203 @@ +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..026734c --- /dev/null +++ b/tools/generated/elements/svg_element.py @@ -0,0 +1,203 @@ +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..3f93b75 --- /dev/null +++ b/tools/generated/elements/table_element.py @@ -0,0 +1,203 @@ +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..0109d76 --- /dev/null +++ b/tools/generated/elements/tbody_element.py @@ -0,0 +1,203 @@ +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..bf9b2c5 --- /dev/null +++ b/tools/generated/elements/td_element.py @@ -0,0 +1,220 @@ +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..14ab734 --- /dev/null +++ b/tools/generated/elements/template_element.py @@ -0,0 +1,223 @@ +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..ca41d7b --- /dev/null +++ b/tools/generated/elements/textarea_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 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..1cc7811 --- /dev/null +++ b/tools/generated/elements/tfoot_element.py @@ -0,0 +1,203 @@ +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..af3bca0 --- /dev/null +++ b/tools/generated/elements/th_element.py @@ -0,0 +1,230 @@ +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..d839a33 --- /dev/null +++ b/tools/generated/elements/thead_element.py @@ -0,0 +1,203 @@ +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..2fbe797 --- /dev/null +++ b/tools/generated/elements/time_element.py @@ -0,0 +1,210 @@ +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..74a3477 --- /dev/null +++ b/tools/generated/elements/title_element.py @@ -0,0 +1,203 @@ +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..c410171 --- /dev/null +++ b/tools/generated/elements/tr_element.py @@ -0,0 +1,203 @@ +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..d296ab0 --- /dev/null +++ b/tools/generated/elements/track_element.py @@ -0,0 +1,232 @@ +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..bd4d2e1 --- /dev/null +++ b/tools/generated/elements/u_element.py @@ -0,0 +1,203 @@ +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..745461d --- /dev/null +++ b/tools/generated/elements/ul_element.py @@ -0,0 +1,203 @@ +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..4c1c35c --- /dev/null +++ b/tools/generated/elements/var_element.py @@ -0,0 +1,203 @@ +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..435d78b --- /dev/null +++ b/tools/generated/elements/video_element.py @@ -0,0 +1,262 @@ +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..bc36070 --- /dev/null +++ b/tools/generated/elements/wbr_element.py @@ -0,0 +1,203 @@ +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 From efd5127d8626d3befedea6ba98306efabbece4a1 Mon Sep 17 00:00:00 2001 From: jealouscloud Date: Sat, 12 Jul 2025 17:22:32 -0400 Subject: [PATCH 04/22] Remoe old elements module --- src/html_compose/elements.py | 27939 --------------------------------- 1 file changed, 27939 deletions(-) delete mode 100644 src/html_compose/elements.py 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) From 2a03c7de8f3ee373566675c7d1c5dbba990bd376 Mon Sep 17 00:00:00 2001 From: jealouscloud Date: Sat, 12 Jul 2025 17:23:02 -0400 Subject: [PATCH 05/22] Add some clarifying docstrings --- src/html_compose/document.py | 11 ++++++++ src/html_compose/live/__init__.py | 42 +++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) 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/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 From 48001e2f50006db8a155fa6d0392dee0ef6a9265 Mon Sep 17 00:00:00 2001 From: jealouscloud Date: Sat, 12 Jul 2025 17:23:25 -0400 Subject: [PATCH 06/22] Add pdoc to generate docs. ruff for github actions without rye --- pyproject.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index f07c73b..7c69c22 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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" From ee7dc427325abaed8cb6fa58f89fa112a576c4fb Mon Sep 17 00:00:00 2001 From: jealouscloud Date: Sat, 12 Jul 2025 18:15:59 -0400 Subject: [PATCH 07/22] Improve docstrings so they can be parsed correctly --- src/html_compose/custom_element.py | 22 +++++++++++++++------- tools/generate_elements.py | 17 ++++++++++++++--- 2 files changed, 29 insertions(+), 10 deletions(-) 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/tools/generate_elements.py b/tools/generate_elements.py index 07834af..75d62a7 100644 --- a/tools/generate_elements.py +++ b/tools/generate_elements.py @@ -28,7 +28,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 +128,7 @@ def gen_elements(): attr_docstrings = [ "`attrs`: ", " A list or dictionary of attributes for the element", + "", ] attr_list = [] @@ -139,7 +139,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) @@ -276,5 +276,16 @@ def add_param(p): init_data.append(f"from .{name}_element import {name}") imports = ", ".join(map(lambda x: f"'{x}'", el_names)) - init_data.append(f"\n__all__ = [{imports}]") + 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)) From 240eaf2d8709b1b91324e015799045a37dee44bd Mon Sep 17 00:00:00 2001 From: jealouscloud Date: Sat, 12 Jul 2025 18:16:49 -0400 Subject: [PATCH 08/22] Reflect new docstrings --- src/html_compose/elements/a_element.py | 47 +++++++++-- src/html_compose/elements/abbr_element.py | 34 +++++++- src/html_compose/elements/address_element.py | 34 +++++++- src/html_compose/elements/area_element.py | 47 +++++++++-- src/html_compose/elements/article_element.py | 34 +++++++- src/html_compose/elements/aside_element.py | 34 +++++++- src/html_compose/elements/audio_element.py | 42 ++++++++-- src/html_compose/elements/b_element.py | 34 +++++++- src/html_compose/elements/base_element.py | 38 +++++++-- src/html_compose/elements/bdi_element.py | 34 +++++++- src/html_compose/elements/bdo_element.py | 34 +++++++- .../elements/blockquote_element.py | 36 ++++++-- src/html_compose/elements/body_element.py | 34 +++++++- src/html_compose/elements/br_element.py | 34 +++++++- src/html_compose/elements/button_element.py | 50 +++++++++-- src/html_compose/elements/canvas_element.py | 36 +++++++- src/html_compose/elements/caption_element.py | 34 +++++++- src/html_compose/elements/cite_element.py | 34 +++++++- src/html_compose/elements/code_element.py | 34 +++++++- src/html_compose/elements/col_element.py | 36 ++++++-- src/html_compose/elements/colgroup_element.py | 36 ++++++-- src/html_compose/elements/data_element.py | 35 +++++++- src/html_compose/elements/datalist_element.py | 34 +++++++- src/html_compose/elements/dd_element.py | 34 +++++++- src/html_compose/elements/del__element.py | 38 +++++++-- src/html_compose/elements/details_element.py | 36 +++++++- src/html_compose/elements/dfn_element.py | 34 +++++++- src/html_compose/elements/dialog_element.py | 35 +++++++- src/html_compose/elements/div_element.py | 34 +++++++- src/html_compose/elements/dl_element.py | 34 +++++++- src/html_compose/elements/dt_element.py | 34 +++++++- src/html_compose/elements/em_element.py | 34 +++++++- src/html_compose/elements/embed_element.py | 40 +++++++-- src/html_compose/elements/fieldset_element.py | 38 +++++++-- .../elements/figcaption_element.py | 34 +++++++- src/html_compose/elements/figure_element.py | 34 +++++++- src/html_compose/elements/footer_element.py | 34 +++++++- src/html_compose/elements/form_element.py | 45 ++++++++-- src/html_compose/elements/h1_element.py | 34 +++++++- src/html_compose/elements/h2_element.py | 34 +++++++- src/html_compose/elements/h3_element.py | 34 +++++++- src/html_compose/elements/h4_element.py | 34 +++++++- src/html_compose/elements/h5_element.py | 34 +++++++- src/html_compose/elements/h6_element.py | 34 +++++++- src/html_compose/elements/head_element.py | 34 +++++++- src/html_compose/elements/header_element.py | 34 +++++++- src/html_compose/elements/hgroup_element.py | 34 +++++++- src/html_compose/elements/hr_element.py | 34 +++++++- src/html_compose/elements/html_element.py | 34 +++++++- src/html_compose/elements/i_element.py | 34 +++++++- src/html_compose/elements/iframe_element.py | 49 +++++++++-- src/html_compose/elements/img_element.py | 52 ++++++++++-- src/html_compose/elements/input_element.py | 82 +++++++++++++++---- src/html_compose/elements/ins_element.py | 38 +++++++-- src/html_compose/elements/kbd_element.py | 34 +++++++- src/html_compose/elements/label_element.py | 36 ++++++-- src/html_compose/elements/legend_element.py | 34 +++++++- src/html_compose/elements/li_element.py | 35 +++++++- src/html_compose/elements/link_element.py | 59 ++++++++++--- src/html_compose/elements/main_element.py | 34 +++++++- src/html_compose/elements/map_element.py | 35 +++++++- src/html_compose/elements/mark_element.py | 34 +++++++- src/html_compose/elements/menu_element.py | 34 +++++++- src/html_compose/elements/meta_element.py | 40 +++++++-- src/html_compose/elements/meter_element.py | 40 ++++++++- src/html_compose/elements/nav_element.py | 34 +++++++- src/html_compose/elements/noscript_element.py | 34 +++++++- src/html_compose/elements/object_element.py | 44 ++++++++-- src/html_compose/elements/ol_element.py | 37 ++++++++- src/html_compose/elements/optgroup_element.py | 36 +++++++- src/html_compose/elements/option_element.py | 38 ++++++++- src/html_compose/elements/output_element.py | 38 +++++++-- src/html_compose/elements/p_element.py | 34 +++++++- src/html_compose/elements/picture_element.py | 34 +++++++- src/html_compose/elements/pre_element.py | 34 +++++++- src/html_compose/elements/progress_element.py | 36 +++++++- src/html_compose/elements/q_element.py | 36 ++++++-- src/html_compose/elements/rp_element.py | 34 +++++++- src/html_compose/elements/rt_element.py | 34 +++++++- src/html_compose/elements/ruby_element.py | 34 +++++++- src/html_compose/elements/s_element.py | 34 +++++++- src/html_compose/elements/samp_element.py | 34 +++++++- src/html_compose/elements/script_element.py | 47 +++++++++-- src/html_compose/elements/search_element.py | 34 +++++++- src/html_compose/elements/section_element.py | 34 +++++++- src/html_compose/elements/select_element.py | 44 ++++++++-- src/html_compose/elements/slot_element.py | 35 +++++++- src/html_compose/elements/small_element.py | 34 +++++++- src/html_compose/elements/source_element.py | 46 +++++++++-- src/html_compose/elements/span_element.py | 34 +++++++- src/html_compose/elements/strong_element.py | 34 +++++++- src/html_compose/elements/style_element.py | 37 +++++++-- src/html_compose/elements/sub_element.py | 34 +++++++- src/html_compose/elements/summary_element.py | 34 +++++++- src/html_compose/elements/sup_element.py | 34 +++++++- src/html_compose/elements/svg_element.py | 34 +++++++- src/html_compose/elements/table_element.py | 34 +++++++- src/html_compose/elements/tbody_element.py | 34 +++++++- src/html_compose/elements/td_element.py | 38 +++++++-- src/html_compose/elements/template_element.py | 38 ++++++++- src/html_compose/elements/textarea_element.py | 51 ++++++++++-- src/html_compose/elements/tfoot_element.py | 34 +++++++- src/html_compose/elements/th_element.py | 40 +++++++-- src/html_compose/elements/thead_element.py | 34 +++++++- src/html_compose/elements/time_element.py | 36 ++++++-- src/html_compose/elements/title_element.py | 34 +++++++- src/html_compose/elements/tr_element.py | 34 +++++++- src/html_compose/elements/track_element.py | 41 ++++++++-- src/html_compose/elements/u_element.py | 34 +++++++- src/html_compose/elements/ul_element.py | 34 +++++++- src/html_compose/elements/var_element.py | 34 +++++++- src/html_compose/elements/video_element.py | 47 +++++++++-- src/html_compose/elements/wbr_element.py | 34 +++++++- tools/generated/elements/a_element.py | 47 +++++++++-- tools/generated/elements/abbr_element.py | 34 +++++++- tools/generated/elements/address_element.py | 34 +++++++- tools/generated/elements/area_element.py | 47 +++++++++-- tools/generated/elements/article_element.py | 34 +++++++- tools/generated/elements/aside_element.py | 34 +++++++- tools/generated/elements/audio_element.py | 42 ++++++++-- tools/generated/elements/b_element.py | 34 +++++++- tools/generated/elements/base_element.py | 38 +++++++-- tools/generated/elements/bdi_element.py | 34 +++++++- tools/generated/elements/bdo_element.py | 34 +++++++- .../generated/elements/blockquote_element.py | 36 ++++++-- tools/generated/elements/body_element.py | 34 +++++++- tools/generated/elements/br_element.py | 34 +++++++- tools/generated/elements/button_element.py | 50 +++++++++-- tools/generated/elements/canvas_element.py | 36 +++++++- tools/generated/elements/caption_element.py | 34 +++++++- tools/generated/elements/cite_element.py | 34 +++++++- tools/generated/elements/code_element.py | 34 +++++++- tools/generated/elements/col_element.py | 36 ++++++-- tools/generated/elements/colgroup_element.py | 36 ++++++-- tools/generated/elements/data_element.py | 35 +++++++- tools/generated/elements/datalist_element.py | 34 +++++++- tools/generated/elements/dd_element.py | 34 +++++++- tools/generated/elements/del__element.py | 38 +++++++-- tools/generated/elements/details_element.py | 36 +++++++- tools/generated/elements/dfn_element.py | 34 +++++++- tools/generated/elements/dialog_element.py | 35 +++++++- tools/generated/elements/div_element.py | 34 +++++++- tools/generated/elements/dl_element.py | 34 +++++++- tools/generated/elements/dt_element.py | 34 +++++++- tools/generated/elements/em_element.py | 34 +++++++- tools/generated/elements/embed_element.py | 40 +++++++-- tools/generated/elements/fieldset_element.py | 38 +++++++-- .../generated/elements/figcaption_element.py | 34 +++++++- tools/generated/elements/figure_element.py | 34 +++++++- tools/generated/elements/footer_element.py | 34 +++++++- tools/generated/elements/form_element.py | 45 ++++++++-- tools/generated/elements/h1_element.py | 34 +++++++- tools/generated/elements/h2_element.py | 34 +++++++- tools/generated/elements/h3_element.py | 34 +++++++- tools/generated/elements/h4_element.py | 34 +++++++- tools/generated/elements/h5_element.py | 34 +++++++- tools/generated/elements/h6_element.py | 34 +++++++- tools/generated/elements/head_element.py | 34 +++++++- tools/generated/elements/header_element.py | 34 +++++++- tools/generated/elements/hgroup_element.py | 34 +++++++- tools/generated/elements/hr_element.py | 34 +++++++- tools/generated/elements/html_element.py | 34 +++++++- tools/generated/elements/i_element.py | 34 +++++++- tools/generated/elements/iframe_element.py | 49 +++++++++-- tools/generated/elements/img_element.py | 52 ++++++++++-- tools/generated/elements/input_element.py | 82 +++++++++++++++---- tools/generated/elements/ins_element.py | 38 +++++++-- tools/generated/elements/kbd_element.py | 34 +++++++- tools/generated/elements/label_element.py | 36 ++++++-- tools/generated/elements/legend_element.py | 34 +++++++- tools/generated/elements/li_element.py | 35 +++++++- tools/generated/elements/link_element.py | 59 ++++++++++--- tools/generated/elements/main_element.py | 34 +++++++- tools/generated/elements/map_element.py | 35 +++++++- tools/generated/elements/mark_element.py | 34 +++++++- tools/generated/elements/menu_element.py | 34 +++++++- tools/generated/elements/meta_element.py | 40 +++++++-- tools/generated/elements/meter_element.py | 40 ++++++++- tools/generated/elements/nav_element.py | 34 +++++++- tools/generated/elements/noscript_element.py | 34 +++++++- tools/generated/elements/object_element.py | 44 ++++++++-- tools/generated/elements/ol_element.py | 37 ++++++++- tools/generated/elements/optgroup_element.py | 36 +++++++- tools/generated/elements/option_element.py | 38 ++++++++- tools/generated/elements/output_element.py | 38 +++++++-- tools/generated/elements/p_element.py | 34 +++++++- tools/generated/elements/picture_element.py | 34 +++++++- tools/generated/elements/pre_element.py | 34 +++++++- tools/generated/elements/progress_element.py | 36 +++++++- tools/generated/elements/q_element.py | 36 ++++++-- tools/generated/elements/rp_element.py | 34 +++++++- tools/generated/elements/rt_element.py | 34 +++++++- tools/generated/elements/ruby_element.py | 34 +++++++- tools/generated/elements/s_element.py | 34 +++++++- tools/generated/elements/samp_element.py | 34 +++++++- tools/generated/elements/script_element.py | 47 +++++++++-- tools/generated/elements/search_element.py | 34 +++++++- tools/generated/elements/section_element.py | 34 +++++++- tools/generated/elements/select_element.py | 44 ++++++++-- tools/generated/elements/slot_element.py | 35 +++++++- tools/generated/elements/small_element.py | 34 +++++++- tools/generated/elements/source_element.py | 46 +++++++++-- tools/generated/elements/span_element.py | 34 +++++++- tools/generated/elements/strong_element.py | 34 +++++++- tools/generated/elements/style_element.py | 37 +++++++-- tools/generated/elements/sub_element.py | 34 +++++++- tools/generated/elements/summary_element.py | 34 +++++++- tools/generated/elements/sup_element.py | 34 +++++++- tools/generated/elements/svg_element.py | 34 +++++++- tools/generated/elements/table_element.py | 34 +++++++- tools/generated/elements/tbody_element.py | 34 +++++++- tools/generated/elements/td_element.py | 38 +++++++-- tools/generated/elements/template_element.py | 38 ++++++++- tools/generated/elements/textarea_element.py | 51 ++++++++++-- tools/generated/elements/tfoot_element.py | 34 +++++++- tools/generated/elements/th_element.py | 40 +++++++-- tools/generated/elements/thead_element.py | 34 +++++++- tools/generated/elements/time_element.py | 36 ++++++-- tools/generated/elements/title_element.py | 34 +++++++- tools/generated/elements/tr_element.py | 34 +++++++- tools/generated/elements/track_element.py | 41 ++++++++-- tools/generated/elements/u_element.py | 34 +++++++- tools/generated/elements/ul_element.py | 34 +++++++- tools/generated/elements/var_element.py | 34 +++++++- tools/generated/elements/video_element.py | 47 +++++++++-- tools/generated/elements/wbr_element.py | 34 +++++++- 226 files changed, 7266 insertions(+), 1090 deletions(-) diff --git a/src/html_compose/elements/a_element.py b/src/html_compose/elements/a_element.py index 872b49b..ebfb457 100644 --- a/src/html_compose/elements/a_element.py +++ b/src/html_compose/elements/a_element.py @@ -118,98 +118,127 @@ def __init__( ---------- `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 diff --git a/src/html_compose/elements/abbr_element.py b/src/html_compose/elements/abbr_element.py index d1b92ea..a622a9e 100644 --- a/src/html_compose/elements/abbr_element.py +++ b/src/html_compose/elements/abbr_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/address_element.py b/src/html_compose/elements/address_element.py index 62ae5b4..48bc2f9 100644 --- a/src/html_compose/elements/address_element.py +++ b/src/html_compose/elements/address_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/area_element.py b/src/html_compose/elements/area_element.py index b292a8d..4b449bb 100644 --- a/src/html_compose/elements/area_element.py +++ b/src/html_compose/elements/area_element.py @@ -121,98 +121,129 @@ def __init__( ---------- `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 diff --git a/src/html_compose/elements/article_element.py b/src/html_compose/elements/article_element.py index 6453337..b60ae25 100644 --- a/src/html_compose/elements/article_element.py +++ b/src/html_compose/elements/article_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/aside_element.py b/src/html_compose/elements/aside_element.py index 660cb5f..41d2d32 100644 --- a/src/html_compose/elements/aside_element.py +++ b/src/html_compose/elements/aside_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/audio_element.py b/src/html_compose/elements/audio_element.py index 0326f55..4e8e13f 100644 --- a/src/html_compose/elements/audio_element.py +++ b/src/html_compose/elements/audio_element.py @@ -121,88 +121,120 @@ def __init__( ---------- `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 diff --git a/src/html_compose/elements/b_element.py b/src/html_compose/elements/b_element.py index 358d69c..5bb43d6 100644 --- a/src/html_compose/elements/b_element.py +++ b/src/html_compose/elements/b_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/base_element.py b/src/html_compose/elements/base_element.py index 8949327..b4c3d66 100644 --- a/src/html_compose/elements/base_element.py +++ b/src/html_compose/elements/base_element.py @@ -112,80 +112,106 @@ def __init__( ---------- `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 diff --git a/src/html_compose/elements/bdi_element.py b/src/html_compose/elements/bdi_element.py index 26d1a26..45ae171 100644 --- a/src/html_compose/elements/bdi_element.py +++ b/src/html_compose/elements/bdi_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/bdo_element.py b/src/html_compose/elements/bdo_element.py index 8d4bf17..3c08d9a 100644 --- a/src/html_compose/elements/bdo_element.py +++ b/src/html_compose/elements/bdo_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/blockquote_element.py b/src/html_compose/elements/blockquote_element.py index 27bc508..f5ac912 100644 --- a/src/html_compose/elements/blockquote_element.py +++ b/src/html_compose/elements/blockquote_element.py @@ -111,76 +111,102 @@ def __init__( ---------- `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 diff --git a/src/html_compose/elements/body_element.py b/src/html_compose/elements/body_element.py index 877ac35..86fcd29 100644 --- a/src/html_compose/elements/body_element.py +++ b/src/html_compose/elements/body_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/br_element.py b/src/html_compose/elements/br_element.py index 89d505b..70aeccb 100644 --- a/src/html_compose/elements/br_element.py +++ b/src/html_compose/elements/br_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/button_element.py b/src/html_compose/elements/button_element.py index f508401..2d5f6f0 100644 --- a/src/html_compose/elements/button_element.py +++ b/src/html_compose/elements/button_element.py @@ -144,104 +144,138 @@ def __init__( ---------- `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 diff --git a/src/html_compose/elements/canvas_element.py b/src/html_compose/elements/canvas_element.py index 87ab92f..9ad96b5 100644 --- a/src/html_compose/elements/canvas_element.py +++ b/src/html_compose/elements/canvas_element.py @@ -112,76 +112,104 @@ def __init__( ---------- `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 diff --git a/src/html_compose/elements/caption_element.py b/src/html_compose/elements/caption_element.py index 83aae20..31333f4 100644 --- a/src/html_compose/elements/caption_element.py +++ b/src/html_compose/elements/caption_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/cite_element.py b/src/html_compose/elements/cite_element.py index 4573c61..e56953f 100644 --- a/src/html_compose/elements/cite_element.py +++ b/src/html_compose/elements/cite_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/code_element.py b/src/html_compose/elements/code_element.py index c347d80..cf9de78 100644 --- a/src/html_compose/elements/code_element.py +++ b/src/html_compose/elements/code_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/col_element.py b/src/html_compose/elements/col_element.py index 1504963..3a4d52e 100644 --- a/src/html_compose/elements/col_element.py +++ b/src/html_compose/elements/col_element.py @@ -111,76 +111,102 @@ def __init__( ---------- `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 diff --git a/src/html_compose/elements/colgroup_element.py b/src/html_compose/elements/colgroup_element.py index 6961679..8779039 100644 --- a/src/html_compose/elements/colgroup_element.py +++ b/src/html_compose/elements/colgroup_element.py @@ -111,76 +111,102 @@ def __init__( ---------- `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 diff --git a/src/html_compose/elements/data_element.py b/src/html_compose/elements/data_element.py index add25ff..c0bc6d5 100644 --- a/src/html_compose/elements/data_element.py +++ b/src/html_compose/elements/data_element.py @@ -111,74 +111,101 @@ def __init__( ---------- `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 diff --git a/src/html_compose/elements/datalist_element.py b/src/html_compose/elements/datalist_element.py index 43a96b6..b763ae0 100644 --- a/src/html_compose/elements/datalist_element.py +++ b/src/html_compose/elements/datalist_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/dd_element.py b/src/html_compose/elements/dd_element.py index 3ea6b26..e6fc4f1 100644 --- a/src/html_compose/elements/dd_element.py +++ b/src/html_compose/elements/dd_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/del__element.py b/src/html_compose/elements/del__element.py index 7cb3779..09e0c47 100644 --- a/src/html_compose/elements/del__element.py +++ b/src/html_compose/elements/del__element.py @@ -112,80 +112,106 @@ def __init__( ---------- `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 diff --git a/src/html_compose/elements/details_element.py b/src/html_compose/elements/details_element.py index e4b2bd9..d9db424 100644 --- a/src/html_compose/elements/details_element.py +++ b/src/html_compose/elements/details_element.py @@ -112,76 +112,104 @@ def __init__( ---------- `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 diff --git a/src/html_compose/elements/dfn_element.py b/src/html_compose/elements/dfn_element.py index 59e5b10..c90d6b3 100644 --- a/src/html_compose/elements/dfn_element.py +++ b/src/html_compose/elements/dfn_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/dialog_element.py b/src/html_compose/elements/dialog_element.py index 4f8ec5f..7ffc37f 100644 --- a/src/html_compose/elements/dialog_element.py +++ b/src/html_compose/elements/dialog_element.py @@ -111,74 +111,101 @@ def __init__( ---------- `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 diff --git a/src/html_compose/elements/div_element.py b/src/html_compose/elements/div_element.py index bfb5b92..03c6070 100644 --- a/src/html_compose/elements/div_element.py +++ b/src/html_compose/elements/div_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/dl_element.py b/src/html_compose/elements/dl_element.py index a0ed908..0f41176 100644 --- a/src/html_compose/elements/dl_element.py +++ b/src/html_compose/elements/dl_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/dt_element.py b/src/html_compose/elements/dt_element.py index 468179f..2f634ab 100644 --- a/src/html_compose/elements/dt_element.py +++ b/src/html_compose/elements/dt_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/em_element.py b/src/html_compose/elements/em_element.py index e2afdcf..4ad78d3 100644 --- a/src/html_compose/elements/em_element.py +++ b/src/html_compose/elements/em_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/embed_element.py b/src/html_compose/elements/embed_element.py index a050140..1aa4304 100644 --- a/src/html_compose/elements/embed_element.py +++ b/src/html_compose/elements/embed_element.py @@ -114,84 +114,112 @@ def __init__( ---------- `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 diff --git a/src/html_compose/elements/fieldset_element.py b/src/html_compose/elements/fieldset_element.py index fc36a62..c6c8426 100644 --- a/src/html_compose/elements/fieldset_element.py +++ b/src/html_compose/elements/fieldset_element.py @@ -113,80 +113,108 @@ def __init__( ---------- `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 diff --git a/src/html_compose/elements/figcaption_element.py b/src/html_compose/elements/figcaption_element.py index 1029e2d..6738a22 100644 --- a/src/html_compose/elements/figcaption_element.py +++ b/src/html_compose/elements/figcaption_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/figure_element.py b/src/html_compose/elements/figure_element.py index 04f5955..144febf 100644 --- a/src/html_compose/elements/figure_element.py +++ b/src/html_compose/elements/figure_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/footer_element.py b/src/html_compose/elements/footer_element.py index 0a72834..efbee34 100644 --- a/src/html_compose/elements/footer_element.py +++ b/src/html_compose/elements/footer_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/form_element.py b/src/html_compose/elements/form_element.py index b29c7a1..1dd23d6 100644 --- a/src/html_compose/elements/form_element.py +++ b/src/html_compose/elements/form_element.py @@ -127,94 +127,125 @@ def __init__( ---------- `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 diff --git a/src/html_compose/elements/h1_element.py b/src/html_compose/elements/h1_element.py index b5671ac..8668230 100644 --- a/src/html_compose/elements/h1_element.py +++ b/src/html_compose/elements/h1_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/h2_element.py b/src/html_compose/elements/h2_element.py index 65230e3..31807fa 100644 --- a/src/html_compose/elements/h2_element.py +++ b/src/html_compose/elements/h2_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/h3_element.py b/src/html_compose/elements/h3_element.py index 84c2b2e..1d81304 100644 --- a/src/html_compose/elements/h3_element.py +++ b/src/html_compose/elements/h3_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/h4_element.py b/src/html_compose/elements/h4_element.py index ea97bb1..722d0e4 100644 --- a/src/html_compose/elements/h4_element.py +++ b/src/html_compose/elements/h4_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/h5_element.py b/src/html_compose/elements/h5_element.py index 65eba3b..466558b 100644 --- a/src/html_compose/elements/h5_element.py +++ b/src/html_compose/elements/h5_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/h6_element.py b/src/html_compose/elements/h6_element.py index 9b6b749..05f2f5f 100644 --- a/src/html_compose/elements/h6_element.py +++ b/src/html_compose/elements/h6_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/head_element.py b/src/html_compose/elements/head_element.py index b39d856..1417529 100644 --- a/src/html_compose/elements/head_element.py +++ b/src/html_compose/elements/head_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/header_element.py b/src/html_compose/elements/header_element.py index 2265cbf..42b5274 100644 --- a/src/html_compose/elements/header_element.py +++ b/src/html_compose/elements/header_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/hgroup_element.py b/src/html_compose/elements/hgroup_element.py index 72d4a55..11220df 100644 --- a/src/html_compose/elements/hgroup_element.py +++ b/src/html_compose/elements/hgroup_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/hr_element.py b/src/html_compose/elements/hr_element.py index 68e339f..18cd231 100644 --- a/src/html_compose/elements/hr_element.py +++ b/src/html_compose/elements/hr_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/html_element.py b/src/html_compose/elements/html_element.py index 5af2fe0..627f3fe 100644 --- a/src/html_compose/elements/html_element.py +++ b/src/html_compose/elements/html_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/i_element.py b/src/html_compose/elements/i_element.py index eb1a4e5..d65e8ea 100644 --- a/src/html_compose/elements/i_element.py +++ b/src/html_compose/elements/i_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/iframe_element.py b/src/html_compose/elements/iframe_element.py index e37554b..dd0705b 100644 --- a/src/html_compose/elements/iframe_element.py +++ b/src/html_compose/elements/iframe_element.py @@ -120,102 +120,133 @@ def __init__( ---------- `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 diff --git a/src/html_compose/elements/img_element.py b/src/html_compose/elements/img_element.py index a39588d..e66699a 100644 --- a/src/html_compose/elements/img_element.py +++ b/src/html_compose/elements/img_element.py @@ -134,108 +134,142 @@ def __init__( ---------- `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 diff --git a/src/html_compose/elements/input_element.py b/src/html_compose/elements/input_element.py index febfd9a..0c2f49e 100644 --- a/src/html_compose/elements/input_element.py +++ b/src/html_compose/elements/input_element.py @@ -169,168 +169,214 @@ def __init__( ---------- `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 diff --git a/src/html_compose/elements/ins_element.py b/src/html_compose/elements/ins_element.py index 7112ff6..bd5eafd 100644 --- a/src/html_compose/elements/ins_element.py +++ b/src/html_compose/elements/ins_element.py @@ -112,80 +112,106 @@ def __init__( ---------- `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 diff --git a/src/html_compose/elements/kbd_element.py b/src/html_compose/elements/kbd_element.py index 6cae746..c514e77 100644 --- a/src/html_compose/elements/kbd_element.py +++ b/src/html_compose/elements/kbd_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/label_element.py b/src/html_compose/elements/label_element.py index 1a396cc..f3624a5 100644 --- a/src/html_compose/elements/label_element.py +++ b/src/html_compose/elements/label_element.py @@ -111,76 +111,102 @@ def __init__( ---------- `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 diff --git a/src/html_compose/elements/legend_element.py b/src/html_compose/elements/legend_element.py index c3fa133..09d6a79 100644 --- a/src/html_compose/elements/legend_element.py +++ b/src/html_compose/elements/legend_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/li_element.py b/src/html_compose/elements/li_element.py index a2f5b41..291a7f6 100644 --- a/src/html_compose/elements/li_element.py +++ b/src/html_compose/elements/li_element.py @@ -111,74 +111,101 @@ def __init__( ---------- `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 diff --git a/src/html_compose/elements/link_element.py b/src/html_compose/elements/link_element.py index 1c1bf56..2bf7592 100644 --- a/src/html_compose/elements/link_element.py +++ b/src/html_compose/elements/link_element.py @@ -130,124 +130,157 @@ def __init__( ---------- `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 diff --git a/src/html_compose/elements/main_element.py b/src/html_compose/elements/main_element.py index 5bae259..46a9efd 100644 --- a/src/html_compose/elements/main_element.py +++ b/src/html_compose/elements/main_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/map_element.py b/src/html_compose/elements/map_element.py index 48fb39b..8d9b5ca 100644 --- a/src/html_compose/elements/map_element.py +++ b/src/html_compose/elements/map_element.py @@ -111,74 +111,101 @@ def __init__( ---------- `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 diff --git a/src/html_compose/elements/mark_element.py b/src/html_compose/elements/mark_element.py index 0ad8956..b809372 100644 --- a/src/html_compose/elements/mark_element.py +++ b/src/html_compose/elements/mark_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/menu_element.py b/src/html_compose/elements/menu_element.py index 8379fd2..2526f47 100644 --- a/src/html_compose/elements/menu_element.py +++ b/src/html_compose/elements/menu_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/meta_element.py b/src/html_compose/elements/meta_element.py index 3f819ca..1af5a4b 100644 --- a/src/html_compose/elements/meta_element.py +++ b/src/html_compose/elements/meta_element.py @@ -126,84 +126,114 @@ def __init__( ---------- `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 diff --git a/src/html_compose/elements/meter_element.py b/src/html_compose/elements/meter_element.py index 6cf8b89..2017970 100644 --- a/src/html_compose/elements/meter_element.py +++ b/src/html_compose/elements/meter_element.py @@ -116,84 +116,116 @@ def __init__( ---------- `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 diff --git a/src/html_compose/elements/nav_element.py b/src/html_compose/elements/nav_element.py index bf476b7..05e49f6 100644 --- a/src/html_compose/elements/nav_element.py +++ b/src/html_compose/elements/nav_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/noscript_element.py b/src/html_compose/elements/noscript_element.py index 1f22650..f3f1924 100644 --- a/src/html_compose/elements/noscript_element.py +++ b/src/html_compose/elements/noscript_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/object_element.py b/src/html_compose/elements/object_element.py index df4ba7a..bf05443 100644 --- a/src/html_compose/elements/object_element.py +++ b/src/html_compose/elements/object_element.py @@ -124,92 +124,120 @@ def __init__( ---------- `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 diff --git a/src/html_compose/elements/ol_element.py b/src/html_compose/elements/ol_element.py index 15bb823..3a16165 100644 --- a/src/html_compose/elements/ol_element.py +++ b/src/html_compose/elements/ol_element.py @@ -113,78 +113,107 @@ def __init__( ---------- `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 diff --git a/src/html_compose/elements/optgroup_element.py b/src/html_compose/elements/optgroup_element.py index c296508..dd21878 100644 --- a/src/html_compose/elements/optgroup_element.py +++ b/src/html_compose/elements/optgroup_element.py @@ -112,76 +112,104 @@ def __init__( ---------- `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 diff --git a/src/html_compose/elements/option_element.py b/src/html_compose/elements/option_element.py index 4ef0bcd..6bb765d 100644 --- a/src/html_compose/elements/option_element.py +++ b/src/html_compose/elements/option_element.py @@ -114,80 +114,110 @@ def __init__( ---------- `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 diff --git a/src/html_compose/elements/output_element.py b/src/html_compose/elements/output_element.py index 56cbca9..7b16d77 100644 --- a/src/html_compose/elements/output_element.py +++ b/src/html_compose/elements/output_element.py @@ -121,80 +121,108 @@ def __init__( ---------- `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 diff --git a/src/html_compose/elements/p_element.py b/src/html_compose/elements/p_element.py index 5e526d1..8f945d3 100644 --- a/src/html_compose/elements/p_element.py +++ b/src/html_compose/elements/p_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/picture_element.py b/src/html_compose/elements/picture_element.py index ea6aa04..dd35e1c 100644 --- a/src/html_compose/elements/picture_element.py +++ b/src/html_compose/elements/picture_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/pre_element.py b/src/html_compose/elements/pre_element.py index 48462fd..4e9a42a 100644 --- a/src/html_compose/elements/pre_element.py +++ b/src/html_compose/elements/pre_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/progress_element.py b/src/html_compose/elements/progress_element.py index 0119060..9625267 100644 --- a/src/html_compose/elements/progress_element.py +++ b/src/html_compose/elements/progress_element.py @@ -112,76 +112,104 @@ def __init__( ---------- `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 diff --git a/src/html_compose/elements/q_element.py b/src/html_compose/elements/q_element.py index 0753fb0..d37a888 100644 --- a/src/html_compose/elements/q_element.py +++ b/src/html_compose/elements/q_element.py @@ -111,76 +111,102 @@ def __init__( ---------- `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 diff --git a/src/html_compose/elements/rp_element.py b/src/html_compose/elements/rp_element.py index fbd3521..6dbefe2 100644 --- a/src/html_compose/elements/rp_element.py +++ b/src/html_compose/elements/rp_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/rt_element.py b/src/html_compose/elements/rt_element.py index b42e311..fa98c52 100644 --- a/src/html_compose/elements/rt_element.py +++ b/src/html_compose/elements/rt_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/ruby_element.py b/src/html_compose/elements/ruby_element.py index c254bb5..2d33f0f 100644 --- a/src/html_compose/elements/ruby_element.py +++ b/src/html_compose/elements/ruby_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/s_element.py b/src/html_compose/elements/s_element.py index 4b9312e..fba4d0a 100644 --- a/src/html_compose/elements/s_element.py +++ b/src/html_compose/elements/s_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/samp_element.py b/src/html_compose/elements/samp_element.py index 049b172..d08e756 100644 --- a/src/html_compose/elements/samp_element.py +++ b/src/html_compose/elements/samp_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/script_element.py b/src/html_compose/elements/script_element.py index 8e15887..2905544 100644 --- a/src/html_compose/elements/script_element.py +++ b/src/html_compose/elements/script_element.py @@ -124,98 +124,131 @@ def __init__( ---------- `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 diff --git a/src/html_compose/elements/search_element.py b/src/html_compose/elements/search_element.py index d5a5ff3..ee006c2 100644 --- a/src/html_compose/elements/search_element.py +++ b/src/html_compose/elements/search_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/section_element.py b/src/html_compose/elements/section_element.py index 788ca35..0c220b4 100644 --- a/src/html_compose/elements/section_element.py +++ b/src/html_compose/elements/section_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/select_element.py b/src/html_compose/elements/select_element.py index bccea57..3760eb4 100644 --- a/src/html_compose/elements/select_element.py +++ b/src/html_compose/elements/select_element.py @@ -127,92 +127,122 @@ def __init__( ---------- `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 diff --git a/src/html_compose/elements/slot_element.py b/src/html_compose/elements/slot_element.py index cb3fdbe..6d650af 100644 --- a/src/html_compose/elements/slot_element.py +++ b/src/html_compose/elements/slot_element.py @@ -111,74 +111,101 @@ def __init__( ---------- `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 diff --git a/src/html_compose/elements/small_element.py b/src/html_compose/elements/small_element.py index a2e9588..fefa24f 100644 --- a/src/html_compose/elements/small_element.py +++ b/src/html_compose/elements/small_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/source_element.py b/src/html_compose/elements/source_element.py index 4f82c51..24adc63 100644 --- a/src/html_compose/elements/source_element.py +++ b/src/html_compose/elements/source_element.py @@ -117,96 +117,124 @@ def __init__( ---------- `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 diff --git a/src/html_compose/elements/span_element.py b/src/html_compose/elements/span_element.py index a13490e..9bf5701 100644 --- a/src/html_compose/elements/span_element.py +++ b/src/html_compose/elements/span_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/strong_element.py b/src/html_compose/elements/strong_element.py index ab6b47b..7ab7f1a 100644 --- a/src/html_compose/elements/strong_element.py +++ b/src/html_compose/elements/strong_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/style_element.py b/src/html_compose/elements/style_element.py index f93552e..ef48a32 100644 --- a/src/html_compose/elements/style_element.py +++ b/src/html_compose/elements/style_element.py @@ -112,78 +112,105 @@ def __init__( ---------- `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 diff --git a/src/html_compose/elements/sub_element.py b/src/html_compose/elements/sub_element.py index 738b01b..8f69a40 100644 --- a/src/html_compose/elements/sub_element.py +++ b/src/html_compose/elements/sub_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/summary_element.py b/src/html_compose/elements/summary_element.py index 44a8e11..d5e3c2e 100644 --- a/src/html_compose/elements/summary_element.py +++ b/src/html_compose/elements/summary_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/sup_element.py b/src/html_compose/elements/sup_element.py index 5570c68..c6c5119 100644 --- a/src/html_compose/elements/sup_element.py +++ b/src/html_compose/elements/sup_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/svg_element.py b/src/html_compose/elements/svg_element.py index 7e583f8..c9d439c 100644 --- a/src/html_compose/elements/svg_element.py +++ b/src/html_compose/elements/svg_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/table_element.py b/src/html_compose/elements/table_element.py index c9850bd..8ceb73c 100644 --- a/src/html_compose/elements/table_element.py +++ b/src/html_compose/elements/table_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/tbody_element.py b/src/html_compose/elements/tbody_element.py index 8fb192e..e3d1132 100644 --- a/src/html_compose/elements/tbody_element.py +++ b/src/html_compose/elements/tbody_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/td_element.py b/src/html_compose/elements/td_element.py index 2602631..640409e 100644 --- a/src/html_compose/elements/td_element.py +++ b/src/html_compose/elements/td_element.py @@ -113,80 +113,108 @@ def __init__( ---------- `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 diff --git a/src/html_compose/elements/template_element.py b/src/html_compose/elements/template_element.py index d81998a..61bec61 100644 --- a/src/html_compose/elements/template_element.py +++ b/src/html_compose/elements/template_element.py @@ -114,80 +114,110 @@ def __init__( ---------- `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 diff --git a/src/html_compose/elements/textarea_element.py b/src/html_compose/elements/textarea_element.py index 1f03c52..cfe5bad 100644 --- a/src/html_compose/elements/textarea_element.py +++ b/src/html_compose/elements/textarea_element.py @@ -133,106 +133,141 @@ def __init__( ---------- `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 diff --git a/src/html_compose/elements/tfoot_element.py b/src/html_compose/elements/tfoot_element.py index c8e3ec9..8274087 100644 --- a/src/html_compose/elements/tfoot_element.py +++ b/src/html_compose/elements/tfoot_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/th_element.py b/src/html_compose/elements/th_element.py index 39c740d..9ab78d1 100644 --- a/src/html_compose/elements/th_element.py +++ b/src/html_compose/elements/th_element.py @@ -117,84 +117,114 @@ def __init__( ---------- `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 diff --git a/src/html_compose/elements/thead_element.py b/src/html_compose/elements/thead_element.py index c86fa2c..6e19cbf 100644 --- a/src/html_compose/elements/thead_element.py +++ b/src/html_compose/elements/thead_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/time_element.py b/src/html_compose/elements/time_element.py index 8f364a1..fa62f49 100644 --- a/src/html_compose/elements/time_element.py +++ b/src/html_compose/elements/time_element.py @@ -111,76 +111,102 @@ def __init__( ---------- `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 diff --git a/src/html_compose/elements/title_element.py b/src/html_compose/elements/title_element.py index 7181e6d..4d22051 100644 --- a/src/html_compose/elements/title_element.py +++ b/src/html_compose/elements/title_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/tr_element.py b/src/html_compose/elements/tr_element.py index 2c4a863..b1efe0a 100644 --- a/src/html_compose/elements/tr_element.py +++ b/src/html_compose/elements/tr_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/track_element.py b/src/html_compose/elements/track_element.py index f31719f..53b5306 100644 --- a/src/html_compose/elements/track_element.py +++ b/src/html_compose/elements/track_element.py @@ -126,86 +126,115 @@ def __init__( ---------- `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 diff --git a/src/html_compose/elements/u_element.py b/src/html_compose/elements/u_element.py index 4d715bc..61fbc9b 100644 --- a/src/html_compose/elements/u_element.py +++ b/src/html_compose/elements/u_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/ul_element.py b/src/html_compose/elements/ul_element.py index 482735f..0bf0f4d 100644 --- a/src/html_compose/elements/ul_element.py +++ b/src/html_compose/elements/ul_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/var_element.py b/src/html_compose/elements/var_element.py index 838436d..4b44df7 100644 --- a/src/html_compose/elements/var_element.py +++ b/src/html_compose/elements/var_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/src/html_compose/elements/video_element.py b/src/html_compose/elements/video_element.py index 38707c2..bda715c 100644 --- a/src/html_compose/elements/video_element.py +++ b/src/html_compose/elements/video_element.py @@ -125,98 +125,133 @@ def __init__( ---------- `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 diff --git a/src/html_compose/elements/wbr_element.py b/src/html_compose/elements/wbr_element.py index ecb7017..2e155a0 100644 --- a/src/html_compose/elements/wbr_element.py +++ b/src/html_compose/elements/wbr_element.py @@ -110,72 +110,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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 diff --git a/tools/generated/elements/a_element.py b/tools/generated/elements/a_element.py index c76010e..52d0e36 100644 --- a/tools/generated/elements/a_element.py +++ b/tools/generated/elements/a_element.py @@ -78,98 +78,127 @@ def __init__( ---------- `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", diff --git a/tools/generated/elements/abbr_element.py b/tools/generated/elements/abbr_element.py index 9cd6d8c..92461d6 100644 --- a/tools/generated/elements/abbr_element.py +++ b/tools/generated/elements/abbr_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/address_element.py b/tools/generated/elements/address_element.py index 87a7c47..7abda67 100644 --- a/tools/generated/elements/address_element.py +++ b/tools/generated/elements/address_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/area_element.py b/tools/generated/elements/area_element.py index a94656f..4de1fa1 100644 --- a/tools/generated/elements/area_element.py +++ b/tools/generated/elements/area_element.py @@ -79,98 +79,129 @@ def __init__( ---------- `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", diff --git a/tools/generated/elements/article_element.py b/tools/generated/elements/article_element.py index 496e144..9676cef 100644 --- a/tools/generated/elements/article_element.py +++ b/tools/generated/elements/article_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/aside_element.py b/tools/generated/elements/aside_element.py index fbfc91e..ecd622a 100644 --- a/tools/generated/elements/aside_element.py +++ b/tools/generated/elements/aside_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/audio_element.py b/tools/generated/elements/audio_element.py index 724b35f..dce7808 100644 --- a/tools/generated/elements/audio_element.py +++ b/tools/generated/elements/audio_element.py @@ -77,88 +77,120 @@ def __init__( ---------- `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", diff --git a/tools/generated/elements/b_element.py b/tools/generated/elements/b_element.py index 54f8846..23700c2 100644 --- a/tools/generated/elements/b_element.py +++ b/tools/generated/elements/b_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/base_element.py b/tools/generated/elements/base_element.py index f91e9be..dcfb8b8 100644 --- a/tools/generated/elements/base_element.py +++ b/tools/generated/elements/base_element.py @@ -72,80 +72,106 @@ def __init__( ---------- `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", diff --git a/tools/generated/elements/bdi_element.py b/tools/generated/elements/bdi_element.py index 303bc56..2e9000d 100644 --- a/tools/generated/elements/bdi_element.py +++ b/tools/generated/elements/bdi_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/bdo_element.py b/tools/generated/elements/bdo_element.py index 7f939cb..d5c3acb 100644 --- a/tools/generated/elements/bdo_element.py +++ b/tools/generated/elements/bdo_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/blockquote_element.py b/tools/generated/elements/blockquote_element.py index a2a052a..fffff34 100644 --- a/tools/generated/elements/blockquote_element.py +++ b/tools/generated/elements/blockquote_element.py @@ -71,76 +71,102 @@ def __init__( ---------- `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", diff --git a/tools/generated/elements/body_element.py b/tools/generated/elements/body_element.py index c96d061..60c2be2 100644 --- a/tools/generated/elements/body_element.py +++ b/tools/generated/elements/body_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/br_element.py b/tools/generated/elements/br_element.py index 0ca4cea..5b150d1 100644 --- a/tools/generated/elements/br_element.py +++ b/tools/generated/elements/br_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/button_element.py b/tools/generated/elements/button_element.py index 6049a58..e7c9329 100644 --- a/tools/generated/elements/button_element.py +++ b/tools/generated/elements/button_element.py @@ -82,104 +82,138 @@ def __init__( ---------- `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", diff --git a/tools/generated/elements/canvas_element.py b/tools/generated/elements/canvas_element.py index 1816f27..11a0bef 100644 --- a/tools/generated/elements/canvas_element.py +++ b/tools/generated/elements/canvas_element.py @@ -72,76 +72,104 @@ def __init__( ---------- `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", diff --git a/tools/generated/elements/caption_element.py b/tools/generated/elements/caption_element.py index c1607ab..bba2f18 100644 --- a/tools/generated/elements/caption_element.py +++ b/tools/generated/elements/caption_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/cite_element.py b/tools/generated/elements/cite_element.py index 5db1f02..d4d2b95 100644 --- a/tools/generated/elements/cite_element.py +++ b/tools/generated/elements/cite_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/code_element.py b/tools/generated/elements/code_element.py index ab6d7a1..a4d10be 100644 --- a/tools/generated/elements/code_element.py +++ b/tools/generated/elements/code_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/col_element.py b/tools/generated/elements/col_element.py index 0cfc08e..1fda04d 100644 --- a/tools/generated/elements/col_element.py +++ b/tools/generated/elements/col_element.py @@ -71,76 +71,102 @@ def __init__( ---------- `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", diff --git a/tools/generated/elements/colgroup_element.py b/tools/generated/elements/colgroup_element.py index 429f15b..2d8b159 100644 --- a/tools/generated/elements/colgroup_element.py +++ b/tools/generated/elements/colgroup_element.py @@ -71,76 +71,102 @@ def __init__( ---------- `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", diff --git a/tools/generated/elements/data_element.py b/tools/generated/elements/data_element.py index 245fbd7..aec219f 100644 --- a/tools/generated/elements/data_element.py +++ b/tools/generated/elements/data_element.py @@ -71,74 +71,101 @@ def __init__( ---------- `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", diff --git a/tools/generated/elements/datalist_element.py b/tools/generated/elements/datalist_element.py index 9d1f186..a78cb09 100644 --- a/tools/generated/elements/datalist_element.py +++ b/tools/generated/elements/datalist_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/dd_element.py b/tools/generated/elements/dd_element.py index c29d991..50a2e24 100644 --- a/tools/generated/elements/dd_element.py +++ b/tools/generated/elements/dd_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/del__element.py b/tools/generated/elements/del__element.py index d4db30c..f1618da 100644 --- a/tools/generated/elements/del__element.py +++ b/tools/generated/elements/del__element.py @@ -72,80 +72,106 @@ def __init__( ---------- `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", diff --git a/tools/generated/elements/details_element.py b/tools/generated/elements/details_element.py index 6aa974e..7b2c9f4 100644 --- a/tools/generated/elements/details_element.py +++ b/tools/generated/elements/details_element.py @@ -72,76 +72,104 @@ def __init__( ---------- `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", diff --git a/tools/generated/elements/dfn_element.py b/tools/generated/elements/dfn_element.py index 5d712b9..1b2f95b 100644 --- a/tools/generated/elements/dfn_element.py +++ b/tools/generated/elements/dfn_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/dialog_element.py b/tools/generated/elements/dialog_element.py index 0f8ba18..92c9670 100644 --- a/tools/generated/elements/dialog_element.py +++ b/tools/generated/elements/dialog_element.py @@ -71,74 +71,101 @@ def __init__( ---------- `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", diff --git a/tools/generated/elements/div_element.py b/tools/generated/elements/div_element.py index cc20cfa..d9d58d9 100644 --- a/tools/generated/elements/div_element.py +++ b/tools/generated/elements/div_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/dl_element.py b/tools/generated/elements/dl_element.py index 37499da..7041630 100644 --- a/tools/generated/elements/dl_element.py +++ b/tools/generated/elements/dl_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/dt_element.py b/tools/generated/elements/dt_element.py index 71fc56b..adfcc38 100644 --- a/tools/generated/elements/dt_element.py +++ b/tools/generated/elements/dt_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/em_element.py b/tools/generated/elements/em_element.py index 5b24029..fd40076 100644 --- a/tools/generated/elements/em_element.py +++ b/tools/generated/elements/em_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/embed_element.py b/tools/generated/elements/embed_element.py index fdfea70..5d2bd20 100644 --- a/tools/generated/elements/embed_element.py +++ b/tools/generated/elements/embed_element.py @@ -74,84 +74,112 @@ def __init__( ---------- `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", diff --git a/tools/generated/elements/fieldset_element.py b/tools/generated/elements/fieldset_element.py index 24e9a27..04ca89a 100644 --- a/tools/generated/elements/fieldset_element.py +++ b/tools/generated/elements/fieldset_element.py @@ -73,80 +73,108 @@ def __init__( ---------- `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", diff --git a/tools/generated/elements/figcaption_element.py b/tools/generated/elements/figcaption_element.py index 76950dc..95bddc1 100644 --- a/tools/generated/elements/figcaption_element.py +++ b/tools/generated/elements/figcaption_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/figure_element.py b/tools/generated/elements/figure_element.py index 3e8a4cb..9f5cfb9 100644 --- a/tools/generated/elements/figure_element.py +++ b/tools/generated/elements/figure_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/footer_element.py b/tools/generated/elements/footer_element.py index 0bbcda3..9f7e927 100644 --- a/tools/generated/elements/footer_element.py +++ b/tools/generated/elements/footer_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/form_element.py b/tools/generated/elements/form_element.py index 406bf2e..4e71713 100644 --- a/tools/generated/elements/form_element.py +++ b/tools/generated/elements/form_element.py @@ -78,94 +78,125 @@ def __init__( ---------- `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", diff --git a/tools/generated/elements/h1_element.py b/tools/generated/elements/h1_element.py index 3fa2741..4916707 100644 --- a/tools/generated/elements/h1_element.py +++ b/tools/generated/elements/h1_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/h2_element.py b/tools/generated/elements/h2_element.py index d37de8c..cfaf800 100644 --- a/tools/generated/elements/h2_element.py +++ b/tools/generated/elements/h2_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/h3_element.py b/tools/generated/elements/h3_element.py index 75f1a51..cb3c40e 100644 --- a/tools/generated/elements/h3_element.py +++ b/tools/generated/elements/h3_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/h4_element.py b/tools/generated/elements/h4_element.py index 7f71a14..78faa6d 100644 --- a/tools/generated/elements/h4_element.py +++ b/tools/generated/elements/h4_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/h5_element.py b/tools/generated/elements/h5_element.py index 8f977a4..081bbdb 100644 --- a/tools/generated/elements/h5_element.py +++ b/tools/generated/elements/h5_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/h6_element.py b/tools/generated/elements/h6_element.py index 8c56714..d2640af 100644 --- a/tools/generated/elements/h6_element.py +++ b/tools/generated/elements/h6_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/head_element.py b/tools/generated/elements/head_element.py index b8d5dd7..9863122 100644 --- a/tools/generated/elements/head_element.py +++ b/tools/generated/elements/head_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/header_element.py b/tools/generated/elements/header_element.py index a24c227..f781b3c 100644 --- a/tools/generated/elements/header_element.py +++ b/tools/generated/elements/header_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/hgroup_element.py b/tools/generated/elements/hgroup_element.py index 4c1d35b..ebbbe31 100644 --- a/tools/generated/elements/hgroup_element.py +++ b/tools/generated/elements/hgroup_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/hr_element.py b/tools/generated/elements/hr_element.py index 69e8375..078e6d3 100644 --- a/tools/generated/elements/hr_element.py +++ b/tools/generated/elements/hr_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/html_element.py b/tools/generated/elements/html_element.py index f03c346..9d8eb83 100644 --- a/tools/generated/elements/html_element.py +++ b/tools/generated/elements/html_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/i_element.py b/tools/generated/elements/i_element.py index dc12d91..fd2039c 100644 --- a/tools/generated/elements/i_element.py +++ b/tools/generated/elements/i_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/iframe_element.py b/tools/generated/elements/iframe_element.py index acda3db..7370d35 100644 --- a/tools/generated/elements/iframe_element.py +++ b/tools/generated/elements/iframe_element.py @@ -80,102 +80,133 @@ def __init__( ---------- `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", diff --git a/tools/generated/elements/img_element.py b/tools/generated/elements/img_element.py index a80e864..b23a769 100644 --- a/tools/generated/elements/img_element.py +++ b/tools/generated/elements/img_element.py @@ -83,108 +83,142 @@ def __init__( ---------- `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", diff --git a/tools/generated/elements/input_element.py b/tools/generated/elements/input_element.py index 2f80fb0..ff345be 100644 --- a/tools/generated/elements/input_element.py +++ b/tools/generated/elements/input_element.py @@ -104,168 +104,214 @@ def __init__( ---------- `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", diff --git a/tools/generated/elements/ins_element.py b/tools/generated/elements/ins_element.py index 5c77ac8..1a1557b 100644 --- a/tools/generated/elements/ins_element.py +++ b/tools/generated/elements/ins_element.py @@ -72,80 +72,106 @@ def __init__( ---------- `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", diff --git a/tools/generated/elements/kbd_element.py b/tools/generated/elements/kbd_element.py index be59f09..7ce63bb 100644 --- a/tools/generated/elements/kbd_element.py +++ b/tools/generated/elements/kbd_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/label_element.py b/tools/generated/elements/label_element.py index 4d614b1..5249326 100644 --- a/tools/generated/elements/label_element.py +++ b/tools/generated/elements/label_element.py @@ -71,76 +71,102 @@ def __init__( ---------- `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", diff --git a/tools/generated/elements/legend_element.py b/tools/generated/elements/legend_element.py index b52f697..32f1ff0 100644 --- a/tools/generated/elements/legend_element.py +++ b/tools/generated/elements/legend_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/li_element.py b/tools/generated/elements/li_element.py index c036b91..aaca2fc 100644 --- a/tools/generated/elements/li_element.py +++ b/tools/generated/elements/li_element.py @@ -71,74 +71,101 @@ def __init__( ---------- `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", diff --git a/tools/generated/elements/link_element.py b/tools/generated/elements/link_element.py index a801e58..664ba6a 100644 --- a/tools/generated/elements/link_element.py +++ b/tools/generated/elements/link_element.py @@ -86,124 +86,157 @@ def __init__( ---------- `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", diff --git a/tools/generated/elements/main_element.py b/tools/generated/elements/main_element.py index 015e50f..53d3d8e 100644 --- a/tools/generated/elements/main_element.py +++ b/tools/generated/elements/main_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/map_element.py b/tools/generated/elements/map_element.py index b164714..a04a52e 100644 --- a/tools/generated/elements/map_element.py +++ b/tools/generated/elements/map_element.py @@ -71,74 +71,101 @@ def __init__( ---------- `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", diff --git a/tools/generated/elements/mark_element.py b/tools/generated/elements/mark_element.py index 9b578e1..834fe87 100644 --- a/tools/generated/elements/mark_element.py +++ b/tools/generated/elements/mark_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/menu_element.py b/tools/generated/elements/menu_element.py index d48358f..c467f01 100644 --- a/tools/generated/elements/menu_element.py +++ b/tools/generated/elements/menu_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/meta_element.py b/tools/generated/elements/meta_element.py index 53b7e0c..8594995 100644 --- a/tools/generated/elements/meta_element.py +++ b/tools/generated/elements/meta_element.py @@ -75,84 +75,114 @@ def __init__( ---------- `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", diff --git a/tools/generated/elements/meter_element.py b/tools/generated/elements/meter_element.py index 0acb6f1..7db471e 100644 --- a/tools/generated/elements/meter_element.py +++ b/tools/generated/elements/meter_element.py @@ -76,84 +76,116 @@ def __init__( ---------- `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", diff --git a/tools/generated/elements/nav_element.py b/tools/generated/elements/nav_element.py index 8f6d936..420c604 100644 --- a/tools/generated/elements/nav_element.py +++ b/tools/generated/elements/nav_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/noscript_element.py b/tools/generated/elements/noscript_element.py index f21eb93..e421a74 100644 --- a/tools/generated/elements/noscript_element.py +++ b/tools/generated/elements/noscript_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/object_element.py b/tools/generated/elements/object_element.py index 9b43142..6d5b2e1 100644 --- a/tools/generated/elements/object_element.py +++ b/tools/generated/elements/object_element.py @@ -76,92 +76,120 @@ def __init__( ---------- `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", diff --git a/tools/generated/elements/ol_element.py b/tools/generated/elements/ol_element.py index 2464319..ab324a2 100644 --- a/tools/generated/elements/ol_element.py +++ b/tools/generated/elements/ol_element.py @@ -73,78 +73,107 @@ def __init__( ---------- `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", diff --git a/tools/generated/elements/optgroup_element.py b/tools/generated/elements/optgroup_element.py index a71f8af..78cd8a8 100644 --- a/tools/generated/elements/optgroup_element.py +++ b/tools/generated/elements/optgroup_element.py @@ -72,76 +72,104 @@ def __init__( ---------- `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", diff --git a/tools/generated/elements/option_element.py b/tools/generated/elements/option_element.py index 7ea1eda..76babf7 100644 --- a/tools/generated/elements/option_element.py +++ b/tools/generated/elements/option_element.py @@ -74,80 +74,110 @@ def __init__( ---------- `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", diff --git a/tools/generated/elements/output_element.py b/tools/generated/elements/output_element.py index f2c3f3f..8c9710a 100644 --- a/tools/generated/elements/output_element.py +++ b/tools/generated/elements/output_element.py @@ -73,80 +73,108 @@ def __init__( ---------- `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", diff --git a/tools/generated/elements/p_element.py b/tools/generated/elements/p_element.py index 29457e0..516d6a0 100644 --- a/tools/generated/elements/p_element.py +++ b/tools/generated/elements/p_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/picture_element.py b/tools/generated/elements/picture_element.py index 7ab3bec..64f56f4 100644 --- a/tools/generated/elements/picture_element.py +++ b/tools/generated/elements/picture_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/pre_element.py b/tools/generated/elements/pre_element.py index 304a009..acefa75 100644 --- a/tools/generated/elements/pre_element.py +++ b/tools/generated/elements/pre_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/progress_element.py b/tools/generated/elements/progress_element.py index 49ffb3b..a4942b6 100644 --- a/tools/generated/elements/progress_element.py +++ b/tools/generated/elements/progress_element.py @@ -72,76 +72,104 @@ def __init__( ---------- `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", diff --git a/tools/generated/elements/q_element.py b/tools/generated/elements/q_element.py index 6541ae2..329b3b7 100644 --- a/tools/generated/elements/q_element.py +++ b/tools/generated/elements/q_element.py @@ -71,76 +71,102 @@ def __init__( ---------- `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", diff --git a/tools/generated/elements/rp_element.py b/tools/generated/elements/rp_element.py index a74dd0f..14b36bc 100644 --- a/tools/generated/elements/rp_element.py +++ b/tools/generated/elements/rp_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/rt_element.py b/tools/generated/elements/rt_element.py index d356190..3d99111 100644 --- a/tools/generated/elements/rt_element.py +++ b/tools/generated/elements/rt_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/ruby_element.py b/tools/generated/elements/ruby_element.py index 6129668..5c1ff49 100644 --- a/tools/generated/elements/ruby_element.py +++ b/tools/generated/elements/ruby_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/s_element.py b/tools/generated/elements/s_element.py index 1c63166..37f39b3 100644 --- a/tools/generated/elements/s_element.py +++ b/tools/generated/elements/s_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/samp_element.py b/tools/generated/elements/samp_element.py index aec0731..9f57c34 100644 --- a/tools/generated/elements/samp_element.py +++ b/tools/generated/elements/samp_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/script_element.py b/tools/generated/elements/script_element.py index 9335976..ef88618 100644 --- a/tools/generated/elements/script_element.py +++ b/tools/generated/elements/script_element.py @@ -80,98 +80,131 @@ def __init__( ---------- `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", diff --git a/tools/generated/elements/search_element.py b/tools/generated/elements/search_element.py index e528d4e..d4f1a12 100644 --- a/tools/generated/elements/search_element.py +++ b/tools/generated/elements/search_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/section_element.py b/tools/generated/elements/section_element.py index 3b42d59..7548e07 100644 --- a/tools/generated/elements/section_element.py +++ b/tools/generated/elements/section_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/select_element.py b/tools/generated/elements/select_element.py index b02da56..62ccf8e 100644 --- a/tools/generated/elements/select_element.py +++ b/tools/generated/elements/select_element.py @@ -77,92 +77,122 @@ def __init__( ---------- `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", diff --git a/tools/generated/elements/slot_element.py b/tools/generated/elements/slot_element.py index 59a92ea..6650708 100644 --- a/tools/generated/elements/slot_element.py +++ b/tools/generated/elements/slot_element.py @@ -71,74 +71,101 @@ def __init__( ---------- `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", diff --git a/tools/generated/elements/small_element.py b/tools/generated/elements/small_element.py index bab6b08..ff2998a 100644 --- a/tools/generated/elements/small_element.py +++ b/tools/generated/elements/small_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/source_element.py b/tools/generated/elements/source_element.py index e0874da..c6cc75b 100644 --- a/tools/generated/elements/source_element.py +++ b/tools/generated/elements/source_element.py @@ -77,96 +77,124 @@ def __init__( ---------- `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", diff --git a/tools/generated/elements/span_element.py b/tools/generated/elements/span_element.py index 79b0312..ff188b4 100644 --- a/tools/generated/elements/span_element.py +++ b/tools/generated/elements/span_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/strong_element.py b/tools/generated/elements/strong_element.py index 3b61690..7c8e5ab 100644 --- a/tools/generated/elements/strong_element.py +++ b/tools/generated/elements/strong_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/style_element.py b/tools/generated/elements/style_element.py index b57412c..483ba22 100644 --- a/tools/generated/elements/style_element.py +++ b/tools/generated/elements/style_element.py @@ -72,78 +72,105 @@ def __init__( ---------- `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", diff --git a/tools/generated/elements/sub_element.py b/tools/generated/elements/sub_element.py index 0484b98..d830281 100644 --- a/tools/generated/elements/sub_element.py +++ b/tools/generated/elements/sub_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/summary_element.py b/tools/generated/elements/summary_element.py index ba48610..91bed6a 100644 --- a/tools/generated/elements/summary_element.py +++ b/tools/generated/elements/summary_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/sup_element.py b/tools/generated/elements/sup_element.py index 91482de..a4cf24a 100644 --- a/tools/generated/elements/sup_element.py +++ b/tools/generated/elements/sup_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/svg_element.py b/tools/generated/elements/svg_element.py index 026734c..5cfe933 100644 --- a/tools/generated/elements/svg_element.py +++ b/tools/generated/elements/svg_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/table_element.py b/tools/generated/elements/table_element.py index 3f93b75..4020d77 100644 --- a/tools/generated/elements/table_element.py +++ b/tools/generated/elements/table_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/tbody_element.py b/tools/generated/elements/tbody_element.py index 0109d76..93f0672 100644 --- a/tools/generated/elements/tbody_element.py +++ b/tools/generated/elements/tbody_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/td_element.py b/tools/generated/elements/td_element.py index bf9b2c5..8a2a3c6 100644 --- a/tools/generated/elements/td_element.py +++ b/tools/generated/elements/td_element.py @@ -73,80 +73,108 @@ def __init__( ---------- `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", diff --git a/tools/generated/elements/template_element.py b/tools/generated/elements/template_element.py index 14ab734..7fa3e1c 100644 --- a/tools/generated/elements/template_element.py +++ b/tools/generated/elements/template_element.py @@ -74,80 +74,110 @@ def __init__( ---------- `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", diff --git a/tools/generated/elements/textarea_element.py b/tools/generated/elements/textarea_element.py index ca41d7b..4380a21 100644 --- a/tools/generated/elements/textarea_element.py +++ b/tools/generated/elements/textarea_element.py @@ -83,106 +83,141 @@ def __init__( ---------- `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", diff --git a/tools/generated/elements/tfoot_element.py b/tools/generated/elements/tfoot_element.py index 1cc7811..a1e0512 100644 --- a/tools/generated/elements/tfoot_element.py +++ b/tools/generated/elements/tfoot_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/th_element.py b/tools/generated/elements/th_element.py index af3bca0..ea9f6f8 100644 --- a/tools/generated/elements/th_element.py +++ b/tools/generated/elements/th_element.py @@ -75,84 +75,114 @@ def __init__( ---------- `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", diff --git a/tools/generated/elements/thead_element.py b/tools/generated/elements/thead_element.py index d839a33..1ff2daa 100644 --- a/tools/generated/elements/thead_element.py +++ b/tools/generated/elements/thead_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/time_element.py b/tools/generated/elements/time_element.py index 2fbe797..3e6c138 100644 --- a/tools/generated/elements/time_element.py +++ b/tools/generated/elements/time_element.py @@ -71,76 +71,102 @@ def __init__( ---------- `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", diff --git a/tools/generated/elements/title_element.py b/tools/generated/elements/title_element.py index 74a3477..f3833f6 100644 --- a/tools/generated/elements/title_element.py +++ b/tools/generated/elements/title_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/tr_element.py b/tools/generated/elements/tr_element.py index c410171..0a4842d 100644 --- a/tools/generated/elements/tr_element.py +++ b/tools/generated/elements/tr_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/track_element.py b/tools/generated/elements/track_element.py index d296ab0..a91c18a 100644 --- a/tools/generated/elements/track_element.py +++ b/tools/generated/elements/track_element.py @@ -75,86 +75,115 @@ def __init__( ---------- `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", diff --git a/tools/generated/elements/u_element.py b/tools/generated/elements/u_element.py index bd4d2e1..cb917fd 100644 --- a/tools/generated/elements/u_element.py +++ b/tools/generated/elements/u_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/ul_element.py b/tools/generated/elements/ul_element.py index 745461d..8d8c6e4 100644 --- a/tools/generated/elements/ul_element.py +++ b/tools/generated/elements/ul_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/var_element.py b/tools/generated/elements/var_element.py index 4c1c35c..f01405a 100644 --- a/tools/generated/elements/var_element.py +++ b/tools/generated/elements/var_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", diff --git a/tools/generated/elements/video_element.py b/tools/generated/elements/video_element.py index 435d78b..dc622e3 100644 --- a/tools/generated/elements/video_element.py +++ b/tools/generated/elements/video_element.py @@ -81,98 +81,133 @@ def __init__( ---------- `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", diff --git a/tools/generated/elements/wbr_element.py b/tools/generated/elements/wbr_element.py index bc36070..473ac2d 100644 --- a/tools/generated/elements/wbr_element.py +++ b/tools/generated/elements/wbr_element.py @@ -70,72 +70,98 @@ def __init__( ---------- `attrs`: A list or dictionary of attributes for the element + `id` : The element's ID + `class_` : Classes to which the element belongs + `accesskey` : Keyboard shortcut to activate or focus element + `autocapitalize` : Recommended autocapitalization behavior (for supported input methods) + `autocorrect` : Recommended autocorrection behavior (for supported input methods) + `autofocus` : Automatically focus the element when the page is loaded + `contenteditable` : Whether the element is editable + `dir` : The text directionality of the element + `draggable` : Whether the element is draggable + `enterkeyhint` : Hint for selecting an enter key action + `hidden` : Whether the element is relevant + `inert` : Whether the element is inert. + `inputmode` : Hint for selecting an input modality + `is_` : Creates a customized built-in element - Valid custom element name of a defined customized built-in element + `itemid` : Global identifier for a microdata item - Valid URL potentially surrounded by spaces + `itemprop` : Property names of a microdata item + `itemref` : Referenced elements + `itemscope` : Introduces a microdata item + `itemtype` : Item types of a microdata item + `lang` : Language of the element - Valid BCP 47 language tag or the empty string + `nonce` : Cryptographic nonce used in Content Security Policy checks [CSP] + `popover` : Makes the element a popover element + `slot` : The element's desired slot + `spellcheck` : Whether the element is to have its spelling and grammar checked + `style` : Presentational and formatting instructions - CSS declarations* + `tabindex` : Whether the element is focusable and sequentially focusable, and the relative order of the element for the purposes of sequential focus navigation + `title` : Advisory information for the element + `translate` : Whether the 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", From 5f3bd8240d8e5b25b382815326c66037cad6f753 Mon Sep 17 00:00:00 2001 From: jealouscloud Date: Sat, 12 Jul 2025 18:16:56 -0400 Subject: [PATCH 09/22] remove dead file --- tools/generated/elements.py | 23444 ---------------------------------- 1 file changed, 23444 deletions(-) delete mode 100644 tools/generated/elements.py 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 From 95d670c1d3c5d5c5e82d3c3b8a64ce83dc08742f Mon Sep 17 00:00:00 2001 From: jealouscloud Date: Sat, 12 Jul 2025 18:17:34 -0400 Subject: [PATCH 10/22] Add hack for pdoc to stop generating a single page with every element --- src/html_compose/elements/__init__.py | 234 +++++++++++++------------- 1 file changed, 119 insertions(+), 115 deletions(-) diff --git a/src/html_compose/elements/__init__.py b/src/html_compose/elements/__init__.py index 610e19f..68446b5 100644 --- a/src/html_compose/elements/__init__.py +++ b/src/html_compose/elements/__init__.py @@ -112,118 +112,122 @@ from .video_element import video from .wbr_element import wbr -__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", -] +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", + ] From 41b25744077c8c72671b73c9a92c56d537c8d638 Mon Sep 17 00:00:00 2001 From: jealouscloud Date: Sat, 12 Jul 2025 18:20:42 -0400 Subject: [PATCH 11/22] Add dracula pdoc theme template Lifted from https://github.com/nxtlo/syn/tree/ba3d51f2204792a64add27a5408d6893c11ff0f4/dracula --- doc/pdoc-template/custom.css | 314 ++++++++++++++++ doc/pdoc-template/module.html.jinja2 | 4 + doc/pdoc-template/syntax-highlighting.css | 424 ++++++++++++++++++++++ doc/pdoc-template/theme.css | 14 + 4 files changed, 756 insertions(+) create mode 100644 doc/pdoc-template/custom.css create mode 100644 doc/pdoc-template/module.html.jinja2 create mode 100644 doc/pdoc-template/syntax-highlighting.css create mode 100644 doc/pdoc-template/theme.css 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; +} From 0b504881c902cc25b02322615fbaa5c589dc9bf1 Mon Sep 17 00:00:00 2001 From: jealouscloud Date: Sat, 12 Jul 2025 19:05:31 -0400 Subject: [PATCH 12/22] Add hint test --- tests/test_element.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/test_element.py b/tests/test_element.py index 6ef5f3c..7269ba9 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( [ "", @@ -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 From 2e21baae25bad3a497fa1cfe0e0af47a41f0e1f4 Mon Sep 17 00:00:00 2001 From: jealouscloud Date: Sat, 12 Jul 2025 19:25:21 -0400 Subject: [PATCH 13/22] Export BaseAttribute in module --- src/html_compose/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/html_compose/__init__.py b/src/html_compose/__init__.py index 6802c31..1b86dfe 100644 --- a/src/html_compose/__init__.py +++ b/src/html_compose/__init__.py @@ -53,6 +53,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 From 1d6b766885088293387ac2ca142ceb7f84f01939 Mon Sep 17 00:00:00 2001 From: jealouscloud Date: Sat, 12 Jul 2025 20:10:57 -0400 Subject: [PATCH 14/22] Big pass at module docstrings --- doc/ideas/02_base_element.md | 2 +- doc/ideas/03_code_generator.md | 8 +- doc/ideas/04_attrs.md | 2 +- doc/ideas/05_livereload.md | 8 +- src/html_compose/__init__.py | 78 ++++++++++++++++++ src/html_compose/elements/__init__.py | 104 ++++++++++++++++++++++++ tools/generate_elements.py | 110 +++++++++++++++++++++++++- 7 files changed, 301 insertions(+), 11 deletions(-) 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/src/html_compose/__init__.py b/src/html_compose/__init__.py index 1b86dfe..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 diff --git a/src/html_compose/elements/__init__.py b/src/html_compose/elements/__init__.py index 68446b5..4b897a8 100644 --- a/src/html_compose/elements/__init__.py +++ b/src/html_compose/elements/__init__.py @@ -1,3 +1,107 @@ +""" +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 diff --git a/tools/generate_elements.py b/tools/generate_elements.py index 75d62a7..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 = {} @@ -271,7 +379,7 @@ def add_param(p): path = Path(path_name) / element.name path.write_text(data) print(f"Copied generated elements to: {real_path}") - init_data = [] + init_data = [f'"""{elements_docstring()}\n"""'] for name in el_names: init_data.append(f"from .{name}_element import {name}") From c114897cfe541b71c50603f5dac25f724ced50a3 Mon Sep 17 00:00:00 2001 From: jealouscloud Date: Sat, 12 Jul 2025 21:09:17 -0400 Subject: [PATCH 15/22] Ignore generated docs --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) 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 From 88d57d6ae5c8753bbd42f8358c42366d7b546cfd Mon Sep 17 00:00:00 2001 From: jealouscloud Date: Sat, 12 Jul 2025 21:11:10 -0400 Subject: [PATCH 16/22] Add docstring --- src/html_compose/util_funcs.py | 6 ++++++ 1 file changed, 6 insertions(+) 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 From 202b99a62a01cedba9f0c3b61ad4b064e1708ec0 Mon Sep 17 00:00:00 2001 From: jealouscloud Date: Sat, 12 Jul 2025 21:12:07 -0400 Subject: [PATCH 17/22] Automatically deploy docs site via pdoc --- .github/workflows/pdoc.yml | 47 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/pdoc.yml 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 From ad56fd0a33e195129cb2dc16ab3130c031d3d958 Mon Sep 17 00:00:00 2001 From: jealouscloud Date: Sat, 12 Jul 2025 21:19:45 -0400 Subject: [PATCH 18/22] Fix BaseElement references from element list --- src/html_compose/translate_html.py | 5 +++-- tests/test_element.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) 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/tests/test_element.py b/tests/test_element.py index 7269ba9..7f8e029 100644 --- a/tests/test_element.py +++ b/tests/test_element.py @@ -188,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

" From 2be8f335f5c20a9965fbcaee370f1d6716e81d9a Mon Sep 17 00:00:00 2001 From: jealouscloud Date: Sat, 12 Jul 2025 21:20:38 -0400 Subject: [PATCH 19/22] Update changelog and version --- changelog.txt | 8 ++++++++ pyproject.toml | 2 +- requirements-dev.lock | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) 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/pyproject.toml b/pyproject.toml index 7c69c22..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" } diff --git a/requirements-dev.lock b/requirements-dev.lock index e82263b..fa8add0 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -71,6 +71,7 @@ pygments==2.19.1 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 From 6eb4986e7264b1a4f749a16ec5e35e281498a72d Mon Sep 17 00:00:00 2001 From: jealouscloud Date: Sat, 12 Jul 2025 21:22:52 -0400 Subject: [PATCH 20/22] Add test automation for PRs --- .github/workflows/run-tests.yml | 38 +++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/run-tests.yml diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml new file mode 100644 index 0000000..006b7a2 --- /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: | + rye run mypy src/html_compose/ + + - name: Run tests + run: | + pytest \ No newline at end of file From fe8c571a44160bd0ccab6128ee9239ad4a19dff1 Mon Sep 17 00:00:00 2001 From: jealouscloud Date: Sat, 12 Jul 2025 21:23:56 -0400 Subject: [PATCH 21/22] Add trailing newline --- .github/workflows/run-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 006b7a2..eaf6f30 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -35,4 +35,4 @@ jobs: - name: Run tests run: | - pytest \ No newline at end of file + pytest From 37e3abaa617fd1323cdf885e933b9ba36aa80652 Mon Sep 17 00:00:00 2001 From: jealouscloud Date: Sat, 12 Jul 2025 21:27:17 -0400 Subject: [PATCH 22/22] remove rye reference --- .github/workflows/run-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index eaf6f30..6b8333d 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -31,7 +31,7 @@ jobs: - name: Run type checker run: | - rye run mypy src/html_compose/ + mypy src/html_compose/ - name: Run tests run: |