html_compose.attributes.th_attrs

 1from . import BaseAttribute
 2from typing import Literal
 3from ..base_types import Resolvable, StrLike
 4
 5
 6class ThAttrs:
 7    """
 8    This module contains functions for attributes in the 'th' element.
 9    Which is inherited by a class so we can generate type hints
10    """
11
12    @staticmethod
13    def abbr(value: StrLike) -> BaseAttribute:
14        """
15        "th" attribute: abbr
16        Alternative label to use for the header cell when referencing the cell in other contexts
17
18        Args:
19            value:
20                Text*
21
22        Returns:
23            An abbr attribute to be added to your element
24
25        """
26
27        return BaseAttribute("abbr", value)
28
29    @staticmethod
30    def colspan(value) -> BaseAttribute:
31        """
32        "th" attribute: colspan
33        Number of columns that the cell is to span
34
35        Args:
36            value:
37                Valid non-negative integer greater than zero
38
39        Returns:
40            An colspan attribute to be added to your element
41
42        """
43
44        return BaseAttribute("colspan", value)
45
46    @staticmethod
47    def headers(value: Resolvable) -> BaseAttribute:
48        """
49        "th" attribute: headers
50        The header cells for this cell
51
52        Args:
53            value:
54                Unordered set of unique space-separated tokens consisting of IDs*
55
56        Returns:
57            An headers attribute to be added to your element
58
59        """
60
61        return BaseAttribute("headers", value)
62
63    @staticmethod
64    def rowspan(value: int) -> BaseAttribute:
65        """
66        "th" attribute: rowspan
67        Number of rows that the cell is to span
68
69        Args:
70            value:
71                Valid non-negative integer
72
73        Returns:
74            An rowspan attribute to be added to your element
75
76        """
77
78        return BaseAttribute("rowspan", value)
79
80    @staticmethod
81    def scope(
82        value: Literal["row", "col", "rowgroup", "colgroup"],
83    ) -> BaseAttribute:
84        """
85        "th" attribute: scope
86        Specifies which cells the header cell applies to
87
88        Args:
89            value:
90                ['row', 'col', 'rowgroup', 'colgroup']
91
92        Returns:
93            An scope attribute to be added to your element
94
95        """
96
97        return BaseAttribute("scope", value)
class ThAttrs:
 7class ThAttrs:
 8    """
 9    This module contains functions for attributes in the 'th' element.
10    Which is inherited by a class so we can generate type hints
11    """
12
13    @staticmethod
14    def abbr(value: StrLike) -> BaseAttribute:
15        """
16        "th" attribute: abbr
17        Alternative label to use for the header cell when referencing the cell in other contexts
18
19        Args:
20            value:
21                Text*
22
23        Returns:
24            An abbr attribute to be added to your element
25
26        """
27
28        return BaseAttribute("abbr", value)
29
30    @staticmethod
31    def colspan(value) -> BaseAttribute:
32        """
33        "th" attribute: colspan
34        Number of columns that the cell is to span
35
36        Args:
37            value:
38                Valid non-negative integer greater than zero
39
40        Returns:
41            An colspan attribute to be added to your element
42
43        """
44
45        return BaseAttribute("colspan", value)
46
47    @staticmethod
48    def headers(value: Resolvable) -> BaseAttribute:
49        """
50        "th" attribute: headers
51        The header cells for this cell
52
53        Args:
54            value:
55                Unordered set of unique space-separated tokens consisting of IDs*
56
57        Returns:
58            An headers attribute to be added to your element
59
60        """
61
62        return BaseAttribute("headers", value)
63
64    @staticmethod
65    def rowspan(value: int) -> BaseAttribute:
66        """
67        "th" attribute: rowspan
68        Number of rows that the cell is to span
69
70        Args:
71            value:
72                Valid non-negative integer
73
74        Returns:
75            An rowspan attribute to be added to your element
76
77        """
78
79        return BaseAttribute("rowspan", value)
80
81    @staticmethod
82    def scope(
83        value: Literal["row", "col", "rowgroup", "colgroup"],
84    ) -> BaseAttribute:
85        """
86        "th" attribute: scope
87        Specifies which cells the header cell applies to
88
89        Args:
90            value:
91                ['row', 'col', 'rowgroup', 'colgroup']
92
93        Returns:
94            An scope attribute to be added to your element
95
96        """
97
98        return BaseAttribute("scope", value)

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

@staticmethod
def abbr( value: str | float | int | bool) -> html_compose.base_attribute.BaseAttribute:
13    @staticmethod
14    def abbr(value: StrLike) -> BaseAttribute:
15        """
16        "th" attribute: abbr
17        Alternative label to use for the header cell when referencing the cell in other contexts
18
19        Args:
20            value:
21                Text*
22
23        Returns:
24            An abbr attribute to be added to your element
25
26        """
27
28        return BaseAttribute("abbr", value)

"th" attribute: abbr Alternative label to use for the header cell when referencing the cell in other contexts

Args: value: Text*

Returns: An abbr attribute to be added to your element

@staticmethod
def colspan(value) -> html_compose.base_attribute.BaseAttribute:
30    @staticmethod
31    def colspan(value) -> BaseAttribute:
32        """
33        "th" attribute: colspan
34        Number of columns that the cell is to span
35
36        Args:
37            value:
38                Valid non-negative integer greater than zero
39
40        Returns:
41            An colspan attribute to be added to your element
42
43        """
44
45        return BaseAttribute("colspan", value)

"th" attribute: colspan Number of columns that the cell is to span

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

Returns: An colspan attribute to be added to your element

@staticmethod
def headers( value: Union[NoneType, str, float, int, bool, Iterable[str | float | int | bool], Mapping[str | float | int | bool, bool]]) -> html_compose.base_attribute.BaseAttribute:
47    @staticmethod
48    def headers(value: Resolvable) -> BaseAttribute:
49        """
50        "th" attribute: headers
51        The header cells for this cell
52
53        Args:
54            value:
55                Unordered set of unique space-separated tokens consisting of IDs*
56
57        Returns:
58            An headers attribute to be added to your element
59
60        """
61
62        return BaseAttribute("headers", value)

"th" attribute: headers The header cells for this cell

Args: value: Unordered set of unique space-separated tokens consisting of IDs*

Returns: An headers attribute to be added to your element

@staticmethod
def rowspan(value: int) -> html_compose.base_attribute.BaseAttribute:
64    @staticmethod
65    def rowspan(value: int) -> BaseAttribute:
66        """
67        "th" attribute: rowspan
68        Number of rows that the cell is to span
69
70        Args:
71            value:
72                Valid non-negative integer
73
74        Returns:
75            An rowspan attribute to be added to your element
76
77        """
78
79        return BaseAttribute("rowspan", value)

"th" attribute: rowspan Number of rows that the cell is to span

Args: value: Valid non-negative integer

Returns: An rowspan attribute to be added to your element

@staticmethod
def scope( value: Literal['row', 'col', 'rowgroup', 'colgroup']) -> html_compose.base_attribute.BaseAttribute:
81    @staticmethod
82    def scope(
83        value: Literal["row", "col", "rowgroup", "colgroup"],
84    ) -> BaseAttribute:
85        """
86        "th" attribute: scope
87        Specifies which cells the header cell applies to
88
89        Args:
90            value:
91                ['row', 'col', 'rowgroup', 'colgroup']
92
93        Returns:
94            An scope attribute to be added to your element
95
96        """
97
98        return BaseAttribute("scope", value)

"th" attribute: scope Specifies which cells the header cell applies to

Args: value: ['row', 'col', 'rowgroup', 'colgroup']

Returns: An scope attribute to be added to your element