html_compose.attributes.select_attrs

  1from . import BaseAttribute
  2from ..base_types import StrLike
  3
  4
  5class SelectAttrs:
  6    """
  7    This module contains functions for attributes in the 'select' element.
  8    Which is inherited by a class so we can generate type hints
  9    """
 10
 11    @staticmethod
 12    def autocomplete(value) -> BaseAttribute:
 13        """
 14        "select" attribute: autocomplete
 15        Hint for form autofill feature
 16
 17        Args:
 18            value:
 19                Autofill field name and related tokens*
 20
 21        Returns:
 22            An autocomplete attribute to be added to your element
 23
 24        """
 25
 26        return BaseAttribute("autocomplete", value)
 27
 28    @staticmethod
 29    def disabled(value: bool) -> BaseAttribute:
 30        """
 31        "select" attribute: disabled
 32        Whether the form control is disabled
 33
 34        Args:
 35            value:
 36                Boolean attribute
 37
 38        Returns:
 39            An disabled attribute to be added to your element
 40
 41        """
 42
 43        return BaseAttribute("disabled", value)
 44
 45    @staticmethod
 46    def form(value) -> BaseAttribute:
 47        """
 48        "select" attribute: form
 49        Associates the element with a form element
 50
 51        Args:
 52            value:
 53                ID*
 54
 55        Returns:
 56            An form attribute to be added to your element
 57
 58        """
 59
 60        return BaseAttribute("form", value)
 61
 62    @staticmethod
 63    def multiple(value: bool) -> BaseAttribute:
 64        """
 65        "select" attribute: multiple
 66        Whether to allow multiple values
 67
 68        Args:
 69            value:
 70                Boolean attribute
 71
 72        Returns:
 73            An multiple attribute to be added to your element
 74
 75        """
 76
 77        return BaseAttribute("multiple", value)
 78
 79    @staticmethod
 80    def name(value: StrLike) -> BaseAttribute:
 81        """
 82        "select" attribute: name
 83        Name of the element to use for form submission and in the form.elements API
 84
 85        Args:
 86            value:
 87                Text*
 88
 89        Returns:
 90            An name attribute to be added to your element
 91
 92        """
 93
 94        return BaseAttribute("name", value)
 95
 96    @staticmethod
 97    def required(value: bool) -> BaseAttribute:
 98        """
 99        "select" attribute: required
100        Whether the control is required for form submission
101
102        Args:
103            value:
104                Boolean attribute
105
106        Returns:
107            An required attribute to be added to your element
108
109        """
110
111        return BaseAttribute("required", value)
112
113    @staticmethod
114    def size(value) -> BaseAttribute:
115        """
116        "select" attribute: size
117        Size of the control
118
119        Args:
120            value:
121                Valid non-negative integer greater than zero
122
123        Returns:
124            An size attribute to be added to your element
125
126        """
127
128        return BaseAttribute("size", value)
class SelectAttrs:
  6class SelectAttrs:
  7    """
  8    This module contains functions for attributes in the 'select' element.
  9    Which is inherited by a class so we can generate type hints
 10    """
 11
 12    @staticmethod
 13    def autocomplete(value) -> BaseAttribute:
 14        """
 15        "select" attribute: autocomplete
 16        Hint for form autofill feature
 17
 18        Args:
 19            value:
 20                Autofill field name and related tokens*
 21
 22        Returns:
 23            An autocomplete attribute to be added to your element
 24
 25        """
 26
 27        return BaseAttribute("autocomplete", value)
 28
 29    @staticmethod
 30    def disabled(value: bool) -> BaseAttribute:
 31        """
 32        "select" attribute: disabled
 33        Whether the form control is disabled
 34
 35        Args:
 36            value:
 37                Boolean attribute
 38
 39        Returns:
 40            An disabled attribute to be added to your element
 41
 42        """
 43
 44        return BaseAttribute("disabled", value)
 45
 46    @staticmethod
 47    def form(value) -> BaseAttribute:
 48        """
 49        "select" attribute: form
 50        Associates the element with a form element
 51
 52        Args:
 53            value:
 54                ID*
 55
 56        Returns:
 57            An form attribute to be added to your element
 58
 59        """
 60
 61        return BaseAttribute("form", value)
 62
 63    @staticmethod
 64    def multiple(value: bool) -> BaseAttribute:
 65        """
 66        "select" attribute: multiple
 67        Whether to allow multiple values
 68
 69        Args:
 70            value:
 71                Boolean attribute
 72
 73        Returns:
 74            An multiple attribute to be added to your element
 75
 76        """
 77
 78        return BaseAttribute("multiple", value)
 79
 80    @staticmethod
 81    def name(value: StrLike) -> BaseAttribute:
 82        """
 83        "select" attribute: name
 84        Name of the element to use for form submission and in the form.elements API
 85
 86        Args:
 87            value:
 88                Text*
 89
 90        Returns:
 91            An name attribute to be added to your element
 92
 93        """
 94
 95        return BaseAttribute("name", value)
 96
 97    @staticmethod
 98    def required(value: bool) -> BaseAttribute:
 99        """
100        "select" attribute: required
101        Whether the control is required for form submission
102
103        Args:
104            value:
105                Boolean attribute
106
107        Returns:
108            An required attribute to be added to your element
109
110        """
111
112        return BaseAttribute("required", value)
113
114    @staticmethod
115    def size(value) -> BaseAttribute:
116        """
117        "select" attribute: size
118        Size of the control
119
120        Args:
121            value:
122                Valid non-negative integer greater than zero
123
124        Returns:
125            An size attribute to be added to your element
126
127        """
128
129        return BaseAttribute("size", value)

This module contains functions for attributes in the 'select' element. Which is inherited by a class so we can generate type hints

@staticmethod
def autocomplete(value) -> html_compose.base_attribute.BaseAttribute:
12    @staticmethod
13    def autocomplete(value) -> BaseAttribute:
14        """
15        "select" attribute: autocomplete
16        Hint for form autofill feature
17
18        Args:
19            value:
20                Autofill field name and related tokens*
21
22        Returns:
23            An autocomplete attribute to be added to your element
24
25        """
26
27        return BaseAttribute("autocomplete", value)

"select" attribute: autocomplete Hint for form autofill feature

Args: value: Autofill field name and related tokens*

Returns: An autocomplete attribute to be added to your element

@staticmethod
def disabled(value: bool) -> html_compose.base_attribute.BaseAttribute:
29    @staticmethod
30    def disabled(value: bool) -> BaseAttribute:
31        """
32        "select" attribute: disabled
33        Whether the form control is disabled
34
35        Args:
36            value:
37                Boolean attribute
38
39        Returns:
40            An disabled attribute to be added to your element
41
42        """
43
44        return BaseAttribute("disabled", value)

"select" attribute: disabled Whether the form control is disabled

Args: value: Boolean attribute

Returns: An disabled attribute to be added to your element

@staticmethod
def form(value) -> html_compose.base_attribute.BaseAttribute:
46    @staticmethod
47    def form(value) -> BaseAttribute:
48        """
49        "select" attribute: form
50        Associates the element with a form element
51
52        Args:
53            value:
54                ID*
55
56        Returns:
57            An form attribute to be added to your element
58
59        """
60
61        return BaseAttribute("form", value)

"select" attribute: form Associates the element with a form element

Args: value: ID*

Returns: An form attribute to be added to your element

@staticmethod
def multiple(value: bool) -> html_compose.base_attribute.BaseAttribute:
63    @staticmethod
64    def multiple(value: bool) -> BaseAttribute:
65        """
66        "select" attribute: multiple
67        Whether to allow multiple values
68
69        Args:
70            value:
71                Boolean attribute
72
73        Returns:
74            An multiple attribute to be added to your element
75
76        """
77
78        return BaseAttribute("multiple", value)

"select" attribute: multiple Whether to allow multiple values

Args: value: Boolean attribute

Returns: An multiple attribute to be added to your element

@staticmethod
def name( value: str | float | int | bool) -> html_compose.base_attribute.BaseAttribute:
80    @staticmethod
81    def name(value: StrLike) -> BaseAttribute:
82        """
83        "select" attribute: name
84        Name of the element to use for form submission and in the form.elements API
85
86        Args:
87            value:
88                Text*
89
90        Returns:
91            An name attribute to be added to your element
92
93        """
94
95        return BaseAttribute("name", value)

"select" attribute: name Name of the element to use for form submission and in the form.elements API

Args: value: Text*

Returns: An name attribute to be added to your element

@staticmethod
def required(value: bool) -> html_compose.base_attribute.BaseAttribute:
 97    @staticmethod
 98    def required(value: bool) -> BaseAttribute:
 99        """
100        "select" attribute: required
101        Whether the control is required for form submission
102
103        Args:
104            value:
105                Boolean attribute
106
107        Returns:
108            An required attribute to be added to your element
109
110        """
111
112        return BaseAttribute("required", value)

"select" attribute: required Whether the control is required for form submission

Args: value: Boolean attribute

Returns: An required attribute to be added to your element

@staticmethod
def size(value) -> html_compose.base_attribute.BaseAttribute:
114    @staticmethod
115    def size(value) -> BaseAttribute:
116        """
117        "select" attribute: size
118        Size of the control
119
120        Args:
121            value:
122                Valid non-negative integer greater than zero
123
124        Returns:
125            An size attribute to be added to your element
126
127        """
128
129        return BaseAttribute("size", value)

"select" attribute: size Size of the control

Args: value: Valid non-negative integer greater than zero

Returns: An size attribute to be added to your element