@aurodesignsystem-dev/auro-accordion 0.0.0-pr255.0 → 0.0.0-pr258.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -23
- package/custom-elements.json +126 -59
- package/demo/api.md +143 -102
- package/demo/api.min.js +202 -75
- package/demo/index.md +11 -11
- package/demo/index.min.js +202 -75
- package/demo/readme.md +22 -23
- package/dist/auro-accordion-CMUr8BI0.js +142 -0
- package/dist/index.d.ts +246 -131
- package/dist/index.js +1 -1
- package/dist/registered.js +1 -1
- package/package.json +10 -10
- package/dist/auro-accordion-Bx8-C8M5.js +0 -119
package/README.md
CHANGED
|
@@ -12,29 +12,29 @@ The following sections are editable by making changes to the following files:
|
|
|
12
12
|
| SECTION | DESCRIPTION | FILE LOCATION |
|
|
13
13
|
|------------------------|---------------------------------------------------|-------------------------------------|
|
|
14
14
|
| Description | Description of the component | `./docs/partials/description.md` |
|
|
15
|
-
| Use
|
|
16
|
-
| Additional
|
|
17
|
-
| Component
|
|
15
|
+
| Use cases | Examples for when to use this component | `./docs/partials/useCases.md` |
|
|
16
|
+
| Additional information | For use to add any component specific information | `./docs/partials/readmeAddlInfo.md` |
|
|
17
|
+
| Component example code | HTML sample code of the components use | `./apiExamples/basic.html` |
|
|
18
18
|
-->
|
|
19
19
|
|
|
20
20
|
# Accordion
|
|
21
21
|
|
|
22
22
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/description.md) -->
|
|
23
23
|
<!-- The below content is automatically added from ./docs/partials/description.md -->
|
|
24
|
-
|
|
24
|
+
An [HTML custom element](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements) that shows or hides a large section of content when someone selects a smaller trigger.
|
|
25
25
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
26
26
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/readmeAddlInfo.md) -->
|
|
27
27
|
<!-- The below content is automatically added from ./docs/partials/readmeAddlInfo.md -->
|
|
28
28
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
29
29
|
|
|
30
|
-
## Use
|
|
30
|
+
## Use cases
|
|
31
31
|
|
|
32
32
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/useCases.md) -->
|
|
33
33
|
<!-- The below content is automatically added from ./docs/partials/useCases.md -->
|
|
34
|
-
|
|
34
|
+
Use `<auro-accordion>` when people need to:
|
|
35
35
|
|
|
36
|
-
-
|
|
37
|
-
-
|
|
36
|
+
- Show or hide a long section of content from a short headline.
|
|
37
|
+
- Keep long, in-page content out of the way when its length would distract from the main experience.
|
|
38
38
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
39
39
|
|
|
40
40
|
## Install
|
|
@@ -49,10 +49,10 @@ The `<auro-accordion>` element should be used in situations where users may:
|
|
|
49
49
|
|
|
50
50
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
51
51
|
|
|
52
|
-
### Define
|
|
52
|
+
### Define dependency in project
|
|
53
53
|
|
|
54
54
|
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/componentImportDescription.md) -->
|
|
55
|
-
|
|
55
|
+
Import the component in each project that uses `<auro-accordion>`.
|
|
56
56
|
|
|
57
57
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
58
58
|
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/componentImport.md) -->
|
|
@@ -64,13 +64,13 @@ Defining the dependency within each project that is using the `<auro-accordion>`
|
|
|
64
64
|
### Use CDN
|
|
65
65
|
|
|
66
66
|
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/bundleInstallDescription.md) -->
|
|
67
|
-
|
|
67
|
+
If your project can't process JS assets, use the pre-processed assets. Legacy browsers, such as IE11, aren't supported.
|
|
68
68
|
|
|
69
|
-
<pre class="language-html"><code class="language-html"><script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-accordion@latest/+esm"></script></code></pre>
|
|
69
|
+
<pre class="language-html"><code class="language-html"><script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-accordion@latest/+esm"></script></code></pre>
|
|
70
70
|
|
|
71
71
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
72
72
|
|
|
73
|
-
## Basic
|
|
73
|
+
## Basic example
|
|
74
74
|
|
|
75
75
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./apiExamples/basic.html) -->
|
|
76
76
|
<!-- The below code snippet is automatically added from ./apiExamples/basic.html -->
|
|
@@ -89,31 +89,30 @@ In cases where the project is not able to process JS assets, there are pre-proce
|
|
|
89
89
|
<p>
|
|
90
90
|
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
91
91
|
</p>
|
|
92
|
-
</auro-accordion></code></pre>
|
|
92
|
+
</auro-accordion></code></pre>
|
|
93
93
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
94
94
|
|
|
95
|
-
## Custom
|
|
95
|
+
## Custom component registration for version management
|
|
96
96
|
|
|
97
|
-
|
|
97
|
+
Every Auro component has two key parts: the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes">class</a> and the custom element definition.
|
|
98
98
|
The class defines the component’s behavior, while the custom element registers it under a specific name so it can be used in HTML.
|
|
99
99
|
|
|
100
|
-
|
|
100
|
+
Installing the component as described in the Install section imports the class and registers the component globally for you.
|
|
101
101
|
|
|
102
|
-
However, if you need to load multiple versions of the same component on a single page (for example, when two projects depend on different versions),
|
|
102
|
+
However, if you need to load multiple versions of the same component on a single page (for example, when two projects depend on different versions), register the class manually under a custom element name to avoid conflicts.
|
|
103
103
|
|
|
104
|
-
|
|
104
|
+
To do this, import only the component class and call the `register(name)` method with a unique name:
|
|
105
105
|
|
|
106
106
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/customRegistration.md) -->
|
|
107
107
|
<!-- The below content is automatically added from ./docs/partials/customRegistration.md -->
|
|
108
108
|
|
|
109
109
|
<pre class="language-js"><code class="language-js">// Import the class only
|
|
110
110
|
import { AuroAccordion, AuroAccordionGroup } from '@aurodesignsystem/auro-accordion/class';
|
|
111
|
-
|
|
112
|
-
// Register with a custom name if desired
|
|
111
|
+
// Register with a custom name if desired
|
|
113
112
|
AuroAccordion.register('custom-accordion');
|
|
114
113
|
AuroAccordionGroup.register('custom-accordion-group');</code></pre>
|
|
115
114
|
|
|
116
|
-
This
|
|
115
|
+
This creates the custom elements `<custom-accordion>` and `<custom-accordion-group>`, which behave exactly like `<auro-accordion>` and `<auro-accordion-group>`, allowing both sets of components to coexist on the same page without interfering with each other.
|
|
117
116
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
118
117
|
<div class="exampleWrapper exampleWrapper--flex">
|
|
119
118
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./apiExamples/custom.html) -->
|
|
@@ -218,6 +217,6 @@ This will create a new custom element `<custom-accordion>` and `<custom-accordio
|
|
|
218
217
|
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
219
218
|
</p>
|
|
220
219
|
</custom-accordion>
|
|
221
|
-
</custom-accordion-group></code></pre>
|
|
220
|
+
</custom-accordion-group></code></pre>
|
|
222
221
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
223
222
|
</auro-accordion>
|
package/custom-elements.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"declarations": [
|
|
9
9
|
{
|
|
10
10
|
"kind": "class",
|
|
11
|
-
"description": "
|
|
11
|
+
"description": "The button that expands and collapses an accordion.",
|
|
12
12
|
"name": "AuroAccordionButton",
|
|
13
13
|
"members": [
|
|
14
14
|
{
|
|
@@ -30,14 +30,14 @@
|
|
|
30
30
|
{
|
|
31
31
|
"name": "name",
|
|
32
32
|
"default": "\"auro-accordion-button\"",
|
|
33
|
-
"description": "The name
|
|
33
|
+
"description": "The tag name to register the element under.",
|
|
34
34
|
"optional": true,
|
|
35
35
|
"type": {
|
|
36
36
|
"text": "string"
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
],
|
|
40
|
-
"description": "
|
|
40
|
+
"description": "Registers the element with the browser under a tag name."
|
|
41
41
|
}
|
|
42
42
|
],
|
|
43
43
|
"attributes": [
|
|
@@ -73,8 +73,14 @@
|
|
|
73
73
|
"declarations": [
|
|
74
74
|
{
|
|
75
75
|
"kind": "class",
|
|
76
|
-
"description": "
|
|
76
|
+
"description": "Groups accordions so that opening one closes the others.\n\n**Key capabilities:**\n- **Several open at once**: Set `noToggleExpanded` to let more than one accordion stay open.\n- **Disable all**: Set `disabled` to turn off every accordion in the group.\n- **Emphasis**: Set `emphasis` to add the emphasis border to every accordion and move each chevron to the right.\n- **Trigger size**: Set `variant` to `sm`, `lg`, or `min` to size every trigger.\n\n**Example:**\n```html\n<auro-accordion-group>\n <auro-accordion>\n <span slot=\"trigger\">Trigger</span>\n <p>Content</p>\n </auro-accordion>\n</auro-accordion-group>\n```",
|
|
77
77
|
"name": "AuroAccordionGroup",
|
|
78
|
+
"slots": [
|
|
79
|
+
{
|
|
80
|
+
"description": "The `auro-accordion` elements to group.",
|
|
81
|
+
"name": ""
|
|
82
|
+
}
|
|
83
|
+
],
|
|
78
84
|
"members": [
|
|
79
85
|
{
|
|
80
86
|
"kind": "field",
|
|
@@ -83,7 +89,7 @@
|
|
|
83
89
|
"type": {
|
|
84
90
|
"text": "boolean"
|
|
85
91
|
},
|
|
86
|
-
"description": "
|
|
92
|
+
"description": "Turns off every accordion in the group. Disabled triggers are shown in a muted color and can't be selected.",
|
|
87
93
|
"attribute": "disabled",
|
|
88
94
|
"reflects": true
|
|
89
95
|
},
|
|
@@ -94,7 +100,7 @@
|
|
|
94
100
|
"type": {
|
|
95
101
|
"text": "boolean"
|
|
96
102
|
},
|
|
97
|
-
"description": "
|
|
103
|
+
"description": "Adds the emphasis border to every accordion in the group and moves each chevron to the right.",
|
|
98
104
|
"attribute": "emphasis",
|
|
99
105
|
"reflects": true
|
|
100
106
|
},
|
|
@@ -107,9 +113,8 @@
|
|
|
107
113
|
{
|
|
108
114
|
"kind": "method",
|
|
109
115
|
"name": "handleSlotContentChange",
|
|
110
|
-
"
|
|
111
|
-
|
|
112
|
-
}
|
|
116
|
+
"description": "Called when the slotted accordions change. Applies the group's emphasis and variant settings to each accordion and marks each as grouped.",
|
|
117
|
+
"privacy": "private"
|
|
113
118
|
},
|
|
114
119
|
{
|
|
115
120
|
"kind": "method",
|
|
@@ -126,6 +131,18 @@
|
|
|
126
131
|
"description": "Internal function to toggle any expanded panels if it is not the one selected.",
|
|
127
132
|
"privacy": "private"
|
|
128
133
|
},
|
|
134
|
+
{
|
|
135
|
+
"kind": "field",
|
|
136
|
+
"name": "noToggleExpanded",
|
|
137
|
+
"privacy": "public",
|
|
138
|
+
"type": {
|
|
139
|
+
"text": "boolean"
|
|
140
|
+
},
|
|
141
|
+
"description": "Lets several accordions in the group stay open at the same time. By default, opening one accordion closes the others.",
|
|
142
|
+
"default": "false",
|
|
143
|
+
"attribute": "notoggleexpanded",
|
|
144
|
+
"reflects": true
|
|
145
|
+
},
|
|
129
146
|
{
|
|
130
147
|
"kind": "method",
|
|
131
148
|
"name": "register",
|
|
@@ -134,17 +151,14 @@
|
|
|
134
151
|
{
|
|
135
152
|
"name": "name",
|
|
136
153
|
"default": "\"auro-accordion-group\"",
|
|
137
|
-
"description": "The name
|
|
154
|
+
"description": "The tag name to register the element under.",
|
|
138
155
|
"optional": true,
|
|
139
156
|
"type": {
|
|
140
157
|
"text": "string"
|
|
141
158
|
}
|
|
142
159
|
}
|
|
143
160
|
],
|
|
144
|
-
"description": "
|
|
145
|
-
"type": {
|
|
146
|
-
"text": "register(name?: string = \"auro-accordion-group\") => void"
|
|
147
|
-
}
|
|
161
|
+
"description": "Registers the element with the browser under a tag name. Register the group as the accordion's tag name plus `-group`, so the group can find its accordions."
|
|
148
162
|
},
|
|
149
163
|
{
|
|
150
164
|
"kind": "field",
|
|
@@ -158,6 +172,28 @@
|
|
|
158
172
|
"description": "Updates the disabled state of all child `<auro-accordion>` elements\nto match the disabled state of the `<auro-accordion-group>` element.",
|
|
159
173
|
"privacy": "private"
|
|
160
174
|
},
|
|
175
|
+
{
|
|
176
|
+
"kind": "method",
|
|
177
|
+
"name": "updateEmphasisState",
|
|
178
|
+
"parameters": [
|
|
179
|
+
{
|
|
180
|
+
"name": "previous",
|
|
181
|
+
"description": "The previous value of `emphasis`.",
|
|
182
|
+
"optional": true,
|
|
183
|
+
"type": {
|
|
184
|
+
"text": "boolean"
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
],
|
|
188
|
+
"description": "Applies or removes the emphasis styles on all child `<auro-accordion>` elements\nto match the emphasis state of the `<auro-accordion-group>` element.",
|
|
189
|
+
"privacy": "private"
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"kind": "method",
|
|
193
|
+
"name": "updateVariantState",
|
|
194
|
+
"description": "Updates the variant of all child `<auro-accordion>` elements\nto match the variant of the `<auro-accordion-group>` element.",
|
|
195
|
+
"privacy": "private"
|
|
196
|
+
},
|
|
161
197
|
{
|
|
162
198
|
"kind": "field",
|
|
163
199
|
"name": "variant",
|
|
@@ -165,7 +201,7 @@
|
|
|
165
201
|
"type": {
|
|
166
202
|
"text": "'sm' | 'lg' | 'min'"
|
|
167
203
|
},
|
|
168
|
-
"description": "Sets the
|
|
204
|
+
"description": "Sets the trigger size for every accordion in the group. Use `sm` for smaller triggers, `lg` for larger ones, or `min` to remove all trigger padding so the slotted content sets each size.",
|
|
169
205
|
"attribute": "variant",
|
|
170
206
|
"reflects": true
|
|
171
207
|
}
|
|
@@ -176,7 +212,7 @@
|
|
|
176
212
|
"type": {
|
|
177
213
|
"text": "boolean"
|
|
178
214
|
},
|
|
179
|
-
"description": "
|
|
215
|
+
"description": "Turns off every accordion in the group. Disabled triggers are shown in a muted color and can't be selected.",
|
|
180
216
|
"fieldName": "disabled"
|
|
181
217
|
},
|
|
182
218
|
{
|
|
@@ -184,15 +220,24 @@
|
|
|
184
220
|
"type": {
|
|
185
221
|
"text": "boolean"
|
|
186
222
|
},
|
|
187
|
-
"description": "
|
|
223
|
+
"description": "Adds the emphasis border to every accordion in the group and moves each chevron to the right.",
|
|
188
224
|
"fieldName": "emphasis"
|
|
189
225
|
},
|
|
226
|
+
{
|
|
227
|
+
"name": "notoggleexpanded",
|
|
228
|
+
"type": {
|
|
229
|
+
"text": "boolean"
|
|
230
|
+
},
|
|
231
|
+
"description": "Lets several accordions in the group stay open at the same time. By default, opening one accordion closes the others.",
|
|
232
|
+
"default": "false",
|
|
233
|
+
"fieldName": "noToggleExpanded"
|
|
234
|
+
},
|
|
190
235
|
{
|
|
191
236
|
"name": "variant",
|
|
192
237
|
"type": {
|
|
193
238
|
"text": "'sm' | 'lg' | 'min'"
|
|
194
239
|
},
|
|
195
|
-
"description": "Sets the
|
|
240
|
+
"description": "Sets the trigger size for every accordion in the group. Use `sm` for smaller triggers, `lg` for larger ones, or `min` to remove all trigger padding so the slotted content sets each size.",
|
|
196
241
|
"fieldName": "variant"
|
|
197
242
|
}
|
|
198
243
|
],
|
|
@@ -202,7 +247,7 @@
|
|
|
202
247
|
},
|
|
203
248
|
"tagName": "auro-accordion-group",
|
|
204
249
|
"customElement": true,
|
|
205
|
-
"
|
|
250
|
+
"summary": "A wrapper that closes other accordions when one opens and shares size, emphasis, and disabled settings."
|
|
206
251
|
}
|
|
207
252
|
],
|
|
208
253
|
"exports": [
|
|
@@ -222,33 +267,63 @@
|
|
|
222
267
|
"declarations": [
|
|
223
268
|
{
|
|
224
269
|
"kind": "class",
|
|
225
|
-
"description": "
|
|
270
|
+
"description": "An accordion that shows or hides a section of content when someone selects its trigger.\n\n**Key capabilities:**\n- **Chevron placement**: Use `chevron=\"right\"` to move the chevron to the right end of the trigger or `chevron=\"none\"` to hide it.\n- **Trigger size**: Set `variant` to `sm`, `lg`, or `min` to change the trigger size.\n- **Expand upward**: Set `expandUp` to reveal the content above the trigger.\n- **Grouping**: Wrap accordions in `auro-accordion-group` so opening one closes the others.\n\n**Example:**\n```html\n<auro-accordion>\n <span slot=\"trigger\">Trigger</span>\n <p>Content</p>\n</auro-accordion>\n```",
|
|
226
271
|
"name": "AuroAccordion",
|
|
272
|
+
"cssProperties": [
|
|
273
|
+
{
|
|
274
|
+
"description": "Color of the left border beside the expanded content. Applies only when `emphasis` is set.",
|
|
275
|
+
"name": "--ds-auro-accordion-content-border-color"
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
"description": "Color of the divider below each accordion in a group. Applies only inside `auro-accordion-group`.",
|
|
279
|
+
"name": "--ds-auro-accordion-group-border-color"
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"description": "Color of the trigger's border, including the ring shown when the trigger has keyboard focus.",
|
|
283
|
+
"name": "--ds-auro-accordion-trigger-border-color"
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
"description": "Color of the trigger text.",
|
|
287
|
+
"name": "--ds-auro-accordion-trigger-color"
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
"description": "Color of the chevron icon.",
|
|
291
|
+
"name": "--ds-auro-accordion-trigger-icon-color"
|
|
292
|
+
}
|
|
293
|
+
],
|
|
227
294
|
"cssParts": [
|
|
228
295
|
{
|
|
229
|
-
"description": "
|
|
296
|
+
"description": "The wrapper around the trigger and the content.",
|
|
230
297
|
"name": "accordion"
|
|
231
298
|
},
|
|
232
299
|
{
|
|
233
|
-
"description": "
|
|
300
|
+
"description": "The chevron icon in the trigger. Doesn't exist when `chevron=\"none\"`.",
|
|
234
301
|
"name": "chevron"
|
|
235
302
|
},
|
|
236
303
|
{
|
|
237
|
-
"description": "
|
|
304
|
+
"description": "The container that holds the expanded content.",
|
|
238
305
|
"name": "content"
|
|
239
306
|
},
|
|
240
307
|
{
|
|
241
|
-
"description": "
|
|
308
|
+
"description": "The inner container around the expanded content that sets its padding.",
|
|
309
|
+
"name": "contentWrapper"
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
"description": "The button that expands and collapses the accordion.",
|
|
242
313
|
"name": "trigger"
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
"description": "The element that holds the content slotted into `trigger`.",
|
|
317
|
+
"name": "triggerSlot"
|
|
243
318
|
}
|
|
244
319
|
],
|
|
245
320
|
"slots": [
|
|
246
321
|
{
|
|
247
|
-
"description": "
|
|
322
|
+
"description": "The content revealed when the accordion expands.",
|
|
248
323
|
"name": ""
|
|
249
324
|
},
|
|
250
325
|
{
|
|
251
|
-
"description": "
|
|
326
|
+
"description": "The text or content shown in the trigger, such as a short heading. Use presentational content only, because the trigger is a native `<button>`.",
|
|
252
327
|
"name": "trigger"
|
|
253
328
|
}
|
|
254
329
|
],
|
|
@@ -260,7 +335,7 @@
|
|
|
260
335
|
"type": {
|
|
261
336
|
"text": "boolean"
|
|
262
337
|
},
|
|
263
|
-
"description": "
|
|
338
|
+
"description": "Aligns the trigger to the right edge of the accordion's container.",
|
|
264
339
|
"attribute": "alignright",
|
|
265
340
|
"reflects": true
|
|
266
341
|
},
|
|
@@ -281,7 +356,7 @@
|
|
|
281
356
|
"type": {
|
|
282
357
|
"text": "'none' | 'right'"
|
|
283
358
|
},
|
|
284
|
-
"description": "Sets chevron
|
|
359
|
+
"description": "Sets where the chevron appears. Use `right` to place it at the right end of the trigger, or `none` to hide it. When not set, the chevron appears before the trigger text.",
|
|
285
360
|
"attribute": "chevron",
|
|
286
361
|
"reflects": true
|
|
287
362
|
},
|
|
@@ -292,7 +367,7 @@
|
|
|
292
367
|
"type": {
|
|
293
368
|
"text": "boolean"
|
|
294
369
|
},
|
|
295
|
-
"description": "
|
|
370
|
+
"description": "Turns the accordion off. A disabled trigger is shown in a muted color and can't be selected to expand or collapse the content. Calling `toggle()` or setting `expanded` still works.",
|
|
296
371
|
"attribute": "disabled",
|
|
297
372
|
"reflects": true
|
|
298
373
|
},
|
|
@@ -303,7 +378,7 @@
|
|
|
303
378
|
"type": {
|
|
304
379
|
"text": "boolean"
|
|
305
380
|
},
|
|
306
|
-
"description": "
|
|
381
|
+
"description": "Adds a highlighted left border to the trigger and the expanded content. Set `emphasis` on `auro-accordion-group` instead to also move each chevron to the right.",
|
|
307
382
|
"attribute": "emphasis",
|
|
308
383
|
"reflects": true
|
|
309
384
|
},
|
|
@@ -314,7 +389,7 @@
|
|
|
314
389
|
"type": {
|
|
315
390
|
"text": "boolean"
|
|
316
391
|
},
|
|
317
|
-
"description": "
|
|
392
|
+
"description": "Expands the accordion to show its content.",
|
|
318
393
|
"default": "false",
|
|
319
394
|
"attribute": "expanded",
|
|
320
395
|
"reflects": true
|
|
@@ -326,17 +401,14 @@
|
|
|
326
401
|
"type": {
|
|
327
402
|
"text": "boolean"
|
|
328
403
|
},
|
|
329
|
-
"description": "
|
|
404
|
+
"description": "Reveals the expanded content above the trigger instead of below it.",
|
|
330
405
|
"attribute": "expandup",
|
|
331
406
|
"reflects": true
|
|
332
407
|
},
|
|
333
408
|
{
|
|
334
409
|
"kind": "method",
|
|
335
410
|
"name": "focus",
|
|
336
|
-
"description": "Moves keyboard focus to the accordion's trigger (the header that expands/collapses the accordion)."
|
|
337
|
-
"type": {
|
|
338
|
-
"text": "focus() => void"
|
|
339
|
-
}
|
|
411
|
+
"description": "Moves keyboard focus to the accordion's trigger (the header that expands/collapses the accordion)."
|
|
340
412
|
},
|
|
341
413
|
{
|
|
342
414
|
"kind": "method",
|
|
@@ -365,7 +437,7 @@
|
|
|
365
437
|
"type": {
|
|
366
438
|
"text": "boolean"
|
|
367
439
|
},
|
|
368
|
-
"description": "
|
|
440
|
+
"description": "Marks the accordion as part of a group and adds a divider below it. The group sets this automatically.",
|
|
369
441
|
"attribute": "grouped",
|
|
370
442
|
"reflects": true
|
|
371
443
|
},
|
|
@@ -397,17 +469,14 @@
|
|
|
397
469
|
{
|
|
398
470
|
"name": "name",
|
|
399
471
|
"default": "\"auro-accordion\"",
|
|
400
|
-
"description": "The name
|
|
472
|
+
"description": "The tag name to register the element under.",
|
|
401
473
|
"optional": true,
|
|
402
474
|
"type": {
|
|
403
475
|
"text": "string"
|
|
404
476
|
}
|
|
405
477
|
}
|
|
406
478
|
],
|
|
407
|
-
"description": "
|
|
408
|
-
"type": {
|
|
409
|
-
"text": "register(name?: string = \"auro-accordion\") => void"
|
|
410
|
-
}
|
|
479
|
+
"description": "Registers the element with the browser under a tag name. Also registers the group element as that name plus `-group`."
|
|
411
480
|
},
|
|
412
481
|
{
|
|
413
482
|
"kind": "method",
|
|
@@ -439,10 +508,7 @@
|
|
|
439
508
|
{
|
|
440
509
|
"kind": "method",
|
|
441
510
|
"name": "toggle",
|
|
442
|
-
"description": "
|
|
443
|
-
"type": {
|
|
444
|
-
"text": "toggle() => void"
|
|
445
|
-
}
|
|
511
|
+
"description": "Expands the accordion if it's collapsed, or collapses it if it's expanded, and fires `toggleExpanded`. Works even when the accordion is disabled."
|
|
446
512
|
},
|
|
447
513
|
{
|
|
448
514
|
"kind": "field",
|
|
@@ -451,7 +517,7 @@
|
|
|
451
517
|
"type": {
|
|
452
518
|
"text": "'sm' | 'lg' | 'min'"
|
|
453
519
|
},
|
|
454
|
-
"description": "Sets
|
|
520
|
+
"description": "Sets the size of the trigger. Use `sm` for a smaller trigger, `lg` for a larger one, or `min` to remove all trigger padding so the slotted content sets the size, ideally with `chevron=\"none\"`. Omit it for the default, medium size.",
|
|
455
521
|
"attribute": "variant",
|
|
456
522
|
"reflects": true
|
|
457
523
|
}
|
|
@@ -462,7 +528,7 @@
|
|
|
462
528
|
"type": {
|
|
463
529
|
"text": "CustomEvent"
|
|
464
530
|
},
|
|
465
|
-
"description": "
|
|
531
|
+
"description": "Fires when someone expands or collapses the accordion, or when `toggle()` is called. Doesn't fire when `expanded` is set directly. `detail.expanded` holds the new state."
|
|
466
532
|
}
|
|
467
533
|
],
|
|
468
534
|
"attributes": [
|
|
@@ -471,7 +537,7 @@
|
|
|
471
537
|
"type": {
|
|
472
538
|
"text": "boolean"
|
|
473
539
|
},
|
|
474
|
-
"description": "
|
|
540
|
+
"description": "Aligns the trigger to the right edge of the accordion's container.",
|
|
475
541
|
"fieldName": "alignRight"
|
|
476
542
|
},
|
|
477
543
|
{
|
|
@@ -479,7 +545,7 @@
|
|
|
479
545
|
"type": {
|
|
480
546
|
"text": "'none' | 'right'"
|
|
481
547
|
},
|
|
482
|
-
"description": "Sets chevron
|
|
548
|
+
"description": "Sets where the chevron appears. Use `right` to place it at the right end of the trigger, or `none` to hide it. When not set, the chevron appears before the trigger text.",
|
|
483
549
|
"fieldName": "chevron"
|
|
484
550
|
},
|
|
485
551
|
{
|
|
@@ -487,7 +553,7 @@
|
|
|
487
553
|
"type": {
|
|
488
554
|
"text": "boolean"
|
|
489
555
|
},
|
|
490
|
-
"description": "
|
|
556
|
+
"description": "Turns the accordion off. A disabled trigger is shown in a muted color and can't be selected to expand or collapse the content. Calling `toggle()` or setting `expanded` still works.",
|
|
491
557
|
"fieldName": "disabled"
|
|
492
558
|
},
|
|
493
559
|
{
|
|
@@ -495,7 +561,7 @@
|
|
|
495
561
|
"type": {
|
|
496
562
|
"text": "boolean"
|
|
497
563
|
},
|
|
498
|
-
"description": "
|
|
564
|
+
"description": "Adds a highlighted left border to the trigger and the expanded content. Set `emphasis` on `auro-accordion-group` instead to also move each chevron to the right.",
|
|
499
565
|
"fieldName": "emphasis"
|
|
500
566
|
},
|
|
501
567
|
{
|
|
@@ -503,7 +569,7 @@
|
|
|
503
569
|
"type": {
|
|
504
570
|
"text": "boolean"
|
|
505
571
|
},
|
|
506
|
-
"description": "
|
|
572
|
+
"description": "Expands the accordion to show its content.",
|
|
507
573
|
"default": "false",
|
|
508
574
|
"fieldName": "expanded"
|
|
509
575
|
},
|
|
@@ -512,7 +578,7 @@
|
|
|
512
578
|
"type": {
|
|
513
579
|
"text": "boolean"
|
|
514
580
|
},
|
|
515
|
-
"description": "
|
|
581
|
+
"description": "Reveals the expanded content above the trigger instead of below it.",
|
|
516
582
|
"fieldName": "expandUp"
|
|
517
583
|
},
|
|
518
584
|
{
|
|
@@ -520,7 +586,7 @@
|
|
|
520
586
|
"type": {
|
|
521
587
|
"text": "boolean"
|
|
522
588
|
},
|
|
523
|
-
"description": "
|
|
589
|
+
"description": "Marks the accordion as part of a group and adds a divider below it. The group sets this automatically.",
|
|
524
590
|
"fieldName": "grouped"
|
|
525
591
|
},
|
|
526
592
|
{
|
|
@@ -528,7 +594,7 @@
|
|
|
528
594
|
"type": {
|
|
529
595
|
"text": "'sm' | 'lg' | 'min'"
|
|
530
596
|
},
|
|
531
|
-
"description": "Sets
|
|
597
|
+
"description": "Sets the size of the trigger. Use `sm` for a smaller trigger, `lg` for a larger one, or `min` to remove all trigger padding so the slotted content sets the size, ideally with `chevron=\"none\"`. Omit it for the default, medium size.",
|
|
532
598
|
"fieldName": "variant"
|
|
533
599
|
}
|
|
534
600
|
],
|
|
@@ -538,7 +604,7 @@
|
|
|
538
604
|
},
|
|
539
605
|
"tagName": "auro-accordion",
|
|
540
606
|
"customElement": true,
|
|
541
|
-
"
|
|
607
|
+
"summary": "An accessible accordion with chevron, size, and expand-up options."
|
|
542
608
|
}
|
|
543
609
|
],
|
|
544
610
|
"exports": [
|
|
@@ -561,7 +627,7 @@
|
|
|
561
627
|
"kind": "js",
|
|
562
628
|
"name": "default",
|
|
563
629
|
"declaration": {
|
|
564
|
-
"name": "9.2.
|
|
630
|
+
"name": "9.2.1",
|
|
565
631
|
"module": "src/iconVersion.js"
|
|
566
632
|
}
|
|
567
633
|
}
|
|
@@ -596,5 +662,6 @@
|
|
|
596
662
|
"declarations": [],
|
|
597
663
|
"exports": []
|
|
598
664
|
}
|
|
599
|
-
]
|
|
665
|
+
],
|
|
666
|
+
"package": "@aurodesignsystem-dev/auro-accordion@0.0.0-pr258.0"
|
|
600
667
|
}
|