1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
use *;
/// Holds a section that can be folded away.
///
/// The collapsible carries the state of the section. The trigger and the
/// content inside it read that same state, so the trigger reports the
/// state to a reader and the content hides itself when the section is
/// closed.
///
/// # Arguments
///
/// - `VirtualNode<EuvCollapsibleProps>` - The props node carrying the
/// state of the section.
///
/// # Returns
///
/// - `VirtualNode` - The euv collapsible virtual DOM tree.
/// Toggles the section it belongs to.
///
/// The trigger reports the state of the section through `aria-expanded`,
/// so a reader knows whether the content below it is there before they
/// press it.
///
/// # Arguments
///
/// - `VirtualNode<EuvCollapsibleTriggerProps>` - The props node carrying
/// the state of the section.
///
/// # Returns
///
/// - `VirtualNode` - The euv collapsible trigger virtual DOM tree.
/// Holds the body of a collapsible section.
///
/// The body is hidden while the section is closed, so the content it
/// holds is not read out and does not take room on the page.
///
/// # Arguments
///
/// - `VirtualNode<EuvCollapsibleContentProps>` - The props node carrying
/// the state of the section.
///
/// # Returns
///
/// - `VirtualNode` - The euv collapsible content virtual DOM tree.
/// Builds the handler that folds the section away or opens it.
///
/// The state is flipped rather than set, so the trigger works in both
/// directions without the caller having to know the current state.
///
/// # Arguments
///
/// - `Signal<bool>` - The state of the section.
///
/// # Returns
///
/// - `Option<Rc<dyn Fn(Event)>>` - The press handler.