@aurodesignsystem-dev/auro-accordion 0.0.0-pr254.0 → 0.0.0-pr257.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 +4 -5
- package/custom-elements.json +12 -29
- package/demo/api.md +24 -28
- package/demo/api.min.js +17 -12
- package/demo/index.md +2 -2
- package/demo/index.min.js +17 -12
- package/demo/readme.md +4 -5
- package/dist/{auro-accordion-Cp2R77Nu.js → auro-accordion-D7rNefWr.js} +10 -8
- package/dist/index.d.ts +63 -55
- package/dist/index.js +1 -1
- package/dist/registered.js +1 -1
- package/package.json +14 -7
package/README.md
CHANGED
|
@@ -66,7 +66,7 @@ Defining the dependency within each project that is using the `<auro-accordion>`
|
|
|
66
66
|
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/bundleInstallDescription.md) -->
|
|
67
67
|
In cases where the project is not able to process JS assets, there are pre-processed assets available for use. Legacy browsers such as IE11 are no longer 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
|
|
|
@@ -89,7 +89,7 @@ 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
95
|
## Custom Component Registration for Version Management
|
|
@@ -108,8 +108,7 @@ You can do this by importing only the component class and using the `register(na
|
|
|
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
|
|
|
@@ -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
|
@@ -106,10 +106,7 @@
|
|
|
106
106
|
},
|
|
107
107
|
{
|
|
108
108
|
"kind": "method",
|
|
109
|
-
"name": "handleSlotContentChange"
|
|
110
|
-
"type": {
|
|
111
|
-
"text": "handleSlotContentChange() => void"
|
|
112
|
-
}
|
|
109
|
+
"name": "handleSlotContentChange"
|
|
113
110
|
},
|
|
114
111
|
{
|
|
115
112
|
"kind": "method",
|
|
@@ -141,10 +138,7 @@
|
|
|
141
138
|
}
|
|
142
139
|
}
|
|
143
140
|
],
|
|
144
|
-
"description": "This will register this element with the browser."
|
|
145
|
-
"type": {
|
|
146
|
-
"text": "register(name?: string = \"auro-accordion-group\") => void"
|
|
147
|
-
}
|
|
141
|
+
"description": "This will register this element with the browser."
|
|
148
142
|
},
|
|
149
143
|
{
|
|
150
144
|
"kind": "field",
|
|
@@ -201,8 +195,7 @@
|
|
|
201
195
|
"package": "lit"
|
|
202
196
|
},
|
|
203
197
|
"tagName": "auro-accordion-group",
|
|
204
|
-
"customElement": true
|
|
205
|
-
"modulePath": "src/auro-accordion-group.js"
|
|
198
|
+
"customElement": true
|
|
206
199
|
}
|
|
207
200
|
],
|
|
208
201
|
"exports": [
|
|
@@ -261,7 +254,7 @@
|
|
|
261
254
|
"text": "boolean"
|
|
262
255
|
},
|
|
263
256
|
"description": "If set, the trigger content will align right.",
|
|
264
|
-
"attribute": "
|
|
257
|
+
"attribute": "alignright",
|
|
265
258
|
"reflects": true
|
|
266
259
|
},
|
|
267
260
|
{
|
|
@@ -327,16 +320,13 @@
|
|
|
327
320
|
"text": "boolean"
|
|
328
321
|
},
|
|
329
322
|
"description": "If set, expanded content is revealed above the trigger instead of below it.",
|
|
330
|
-
"attribute": "
|
|
323
|
+
"attribute": "expandup",
|
|
331
324
|
"reflects": true
|
|
332
325
|
},
|
|
333
326
|
{
|
|
334
327
|
"kind": "method",
|
|
335
328
|
"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
|
-
}
|
|
329
|
+
"description": "Moves keyboard focus to the accordion's trigger (the header that expands/collapses the accordion)."
|
|
340
330
|
},
|
|
341
331
|
{
|
|
342
332
|
"kind": "method",
|
|
@@ -404,10 +394,7 @@
|
|
|
404
394
|
}
|
|
405
395
|
}
|
|
406
396
|
],
|
|
407
|
-
"description": "This will register this element with the browser."
|
|
408
|
-
"type": {
|
|
409
|
-
"text": "register(name?: string = \"auro-accordion\") => void"
|
|
410
|
-
}
|
|
397
|
+
"description": "This will register this element with the browser."
|
|
411
398
|
},
|
|
412
399
|
{
|
|
413
400
|
"kind": "method",
|
|
@@ -430,7 +417,7 @@
|
|
|
430
417
|
"kind": "field",
|
|
431
418
|
"name": "shadowRootOptions",
|
|
432
419
|
"type": {
|
|
433
|
-
"text": "
|
|
420
|
+
"text": "ShadowRootInit"
|
|
434
421
|
},
|
|
435
422
|
"static": true,
|
|
436
423
|
"default": "{ ...LitElement.shadowRootOptions, delegatesFocus: true, }",
|
|
@@ -439,10 +426,7 @@
|
|
|
439
426
|
{
|
|
440
427
|
"kind": "method",
|
|
441
428
|
"name": "toggle",
|
|
442
|
-
"description": "Toggles the visibility of the accordion content."
|
|
443
|
-
"type": {
|
|
444
|
-
"text": "toggle() => void"
|
|
445
|
-
}
|
|
429
|
+
"description": "Toggles the visibility of the accordion content."
|
|
446
430
|
},
|
|
447
431
|
{
|
|
448
432
|
"kind": "field",
|
|
@@ -467,7 +451,7 @@
|
|
|
467
451
|
],
|
|
468
452
|
"attributes": [
|
|
469
453
|
{
|
|
470
|
-
"name": "
|
|
454
|
+
"name": "alignright",
|
|
471
455
|
"type": {
|
|
472
456
|
"text": "boolean"
|
|
473
457
|
},
|
|
@@ -508,7 +492,7 @@
|
|
|
508
492
|
"fieldName": "expanded"
|
|
509
493
|
},
|
|
510
494
|
{
|
|
511
|
-
"name": "
|
|
495
|
+
"name": "expandup",
|
|
512
496
|
"type": {
|
|
513
497
|
"text": "boolean"
|
|
514
498
|
},
|
|
@@ -537,8 +521,7 @@
|
|
|
537
521
|
"package": "lit"
|
|
538
522
|
},
|
|
539
523
|
"tagName": "auro-accordion",
|
|
540
|
-
"customElement": true
|
|
541
|
-
"modulePath": "src/auro-accordion.js"
|
|
524
|
+
"customElement": true
|
|
542
525
|
}
|
|
543
526
|
],
|
|
544
527
|
"exports": [
|
package/demo/api.md
CHANGED
|
@@ -9,12 +9,12 @@ The `auro-accordion` element provides users a way to have collapsible content on
|
|
|
9
9
|
|
|
10
10
|
| Properties | Attributes | Modifiers | Type | Default | Description |
|
|
11
11
|
| ---------- | ---------- | --------- | --------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
12
|
-
| alignRight |
|
|
12
|
+
| alignRight | alignright | | boolean | | If set, the trigger content will align right. |
|
|
13
13
|
| chevron | chevron | | `none` \| `right` | | Sets chevron variant option. |
|
|
14
14
|
| disabled | disabled | | boolean | | If set, the accordion is disabled and have reduced opacity. |
|
|
15
15
|
| emphasis | emphasis | | boolean | | If set, emphasis styles will be applied to the auro-accordion. This feature is best used on the auro-accordion-group component. |
|
|
16
16
|
| expanded | expanded | | boolean | `false` | If set, the accordion is expanded. |
|
|
17
|
-
| expandUp |
|
|
17
|
+
| expandUp | expandup | | boolean | | If set, expanded content is revealed above the trigger instead of below it. |
|
|
18
18
|
| grouped | grouped | | boolean | | Attribute will be set on accordion when it appears in an accordion group. |
|
|
19
19
|
| variant | variant | | `sm` \| `lg` \| `min` | | Sets accordion variant option. `sm` and `lg` adjust the trigger size; `min` removes all trigger padding so slotted trigger content controls the trigger size (best paired with `chevron="none"` for a fully flush trigger). |
|
|
20
20
|
|
|
@@ -158,7 +158,7 @@ Using the `alignRight` attribute will cause the trigger to align to the right ed
|
|
|
158
158
|
<p>
|
|
159
159
|
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
160
160
|
</p>
|
|
161
|
-
</auro-accordion></code></pre>
|
|
161
|
+
</auro-accordion></code></pre>
|
|
162
162
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
163
163
|
</auro-accordion>
|
|
164
164
|
|
|
@@ -207,7 +207,7 @@ Using the `expandUp` attribute will reveal the expanded content above the trigge
|
|
|
207
207
|
<p>
|
|
208
208
|
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
209
209
|
</p>
|
|
210
|
-
</auro-accordion></code></pre>
|
|
210
|
+
</auro-accordion></code></pre>
|
|
211
211
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
212
212
|
</auro-accordion>
|
|
213
213
|
|
|
@@ -254,7 +254,7 @@ Using the `chevron="right"` will cause the chevron to appear on the right side o
|
|
|
254
254
|
<p>
|
|
255
255
|
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
256
256
|
</p>
|
|
257
|
-
</auro-accordion></code></pre>
|
|
257
|
+
</auro-accordion></code></pre>
|
|
258
258
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
259
259
|
</auro-accordion>
|
|
260
260
|
|
|
@@ -301,7 +301,7 @@ The chevron icon within the trigger of the `auro-accordion` will not render when
|
|
|
301
301
|
<p>
|
|
302
302
|
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
303
303
|
</p>
|
|
304
|
-
</auro-accordion></code></pre>
|
|
304
|
+
</auro-accordion></code></pre>
|
|
305
305
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
306
306
|
</auro-accordion>
|
|
307
307
|
|
|
@@ -348,7 +348,7 @@ Use the `disabled` attribute to disable the expand/collapse function and reduce
|
|
|
348
348
|
<p>
|
|
349
349
|
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
350
350
|
</p>
|
|
351
|
-
</auro-accordion></code></pre>
|
|
351
|
+
</auro-accordion></code></pre>
|
|
352
352
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
353
353
|
</auro-accordion>
|
|
354
354
|
|
|
@@ -399,7 +399,7 @@ The accordion can be programatically expanded or collapsed by setting the `expan
|
|
|
399
399
|
<p>
|
|
400
400
|
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
401
401
|
</p>
|
|
402
|
-
</auro-accordion></code></pre>
|
|
402
|
+
</auro-accordion></code></pre>
|
|
403
403
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
404
404
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/expanded.js) -->
|
|
405
405
|
<!-- The below code snippet is automatically added from ./../apiExamples/expanded.js -->
|
|
@@ -408,14 +408,12 @@ The accordion can be programatically expanded or collapsed by setting the `expan
|
|
|
408
408
|
const expandedExampleElem = document.querySelector(
|
|
409
409
|
"#accordionExpandedExample",
|
|
410
410
|
);
|
|
411
|
-
|
|
412
|
-
document
|
|
411
|
+
document
|
|
413
412
|
.querySelector("#accordionExpandedExampleBtnTrue")
|
|
414
413
|
.addEventListener("click", () => {
|
|
415
414
|
expandedExampleElem.expanded = true;
|
|
416
415
|
});
|
|
417
|
-
|
|
418
|
-
document
|
|
416
|
+
document
|
|
419
417
|
.querySelector("#accordionExpandedExampleBtnFalse")
|
|
420
418
|
.addEventListener("click", () => {
|
|
421
419
|
expandedExampleElem.expanded = false;
|
|
@@ -471,7 +469,7 @@ The `variant` attribute sets the size and spacing of the accordion trigger. Omit
|
|
|
471
469
|
<p>
|
|
472
470
|
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
473
471
|
</p>
|
|
474
|
-
</auro-accordion></code></pre>
|
|
472
|
+
</auro-accordion></code></pre>
|
|
475
473
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
476
474
|
</auro-accordion>
|
|
477
475
|
|
|
@@ -518,7 +516,7 @@ The `variant` attribute sets the size and spacing of the accordion trigger. Omit
|
|
|
518
516
|
<p>
|
|
519
517
|
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
520
518
|
</p>
|
|
521
|
-
</auro-accordion></code></pre>
|
|
519
|
+
</auro-accordion></code></pre>
|
|
522
520
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
523
521
|
</auro-accordion>
|
|
524
522
|
|
|
@@ -555,7 +553,7 @@ Keep the slotted trigger content **presentational only** (e.g. a styled `<span>`
|
|
|
555
553
|
<p>
|
|
556
554
|
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
|
|
557
555
|
</p>
|
|
558
|
-
</auro-accordion></code></pre>
|
|
556
|
+
</auro-accordion></code></pre>
|
|
559
557
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
560
558
|
</auro-accordion>
|
|
561
559
|
Because `variant="min"` hands sizing to the slotted trigger content, you can style that content to give the trigger a custom size and appearance — here a full-width, fixed-height block.
|
|
@@ -591,7 +589,7 @@ Because `variant="min"` hands sizing to the slotted trigger content, you can sty
|
|
|
591
589
|
<p>
|
|
592
590
|
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
|
|
593
591
|
</p>
|
|
594
|
-
</auro-accordion></code></pre>
|
|
592
|
+
</auro-accordion></code></pre>
|
|
595
593
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
596
594
|
</auro-accordion>
|
|
597
595
|
|
|
@@ -642,7 +640,7 @@ Using the `toggle()` method will change the state of the accordion from expanded
|
|
|
642
640
|
<p>
|
|
643
641
|
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
644
642
|
</p>
|
|
645
|
-
</auro-accordion></code></pre>
|
|
643
|
+
</auro-accordion></code></pre>
|
|
646
644
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
647
645
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/toggle.js) -->
|
|
648
646
|
<!-- The below code snippet is automatically added from ./../apiExamples/toggle.js -->
|
|
@@ -651,8 +649,7 @@ Using the `toggle()` method will change the state of the accordion from expanded
|
|
|
651
649
|
const expandedExampleElem = document.querySelector(
|
|
652
650
|
"#accordionToggleExample",
|
|
653
651
|
);
|
|
654
|
-
|
|
655
|
-
document
|
|
652
|
+
document
|
|
656
653
|
.querySelector("#accordionToggleExampleBtn")
|
|
657
654
|
.addEventListener("click", () => {
|
|
658
655
|
expandedExampleElem.toggle();
|
|
@@ -706,7 +703,7 @@ Using the `alignRight` attribute in conjuction with the `chevron="right"` attrib
|
|
|
706
703
|
<p>
|
|
707
704
|
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
708
705
|
</p>
|
|
709
|
-
</auro-accordion></code></pre>
|
|
706
|
+
</auro-accordion></code></pre>
|
|
710
707
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
711
708
|
</auro-accordion>
|
|
712
709
|
|
|
@@ -821,7 +818,7 @@ Use the `disabled` attribute to disable the expand/collapse function and reduce
|
|
|
821
818
|
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
822
819
|
</p>
|
|
823
820
|
</auro-accordion>
|
|
824
|
-
</auro-accordion-group></code></pre>
|
|
821
|
+
</auro-accordion-group></code></pre>
|
|
825
822
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
826
823
|
</auro-accordion>
|
|
827
824
|
|
|
@@ -932,7 +929,7 @@ Use the `emphasis` attribute to apply border highlights to the `auro-accordion`
|
|
|
932
929
|
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
933
930
|
</p>
|
|
934
931
|
</auro-accordion>
|
|
935
|
-
</auro-accordion-group></code></pre>
|
|
932
|
+
</auro-accordion-group></code></pre>
|
|
936
933
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
937
934
|
</auro-accordion>
|
|
938
935
|
|
|
@@ -1043,7 +1040,7 @@ Using the `noToggleExpanded` attribute will allow for multiple accordions in an
|
|
|
1043
1040
|
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
1044
1041
|
</p>
|
|
1045
1042
|
</auro-accordion>
|
|
1046
|
-
</auro-accordion-group></code></pre>
|
|
1043
|
+
</auro-accordion-group></code></pre>
|
|
1047
1044
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1048
1045
|
</auro-accordion>
|
|
1049
1046
|
|
|
@@ -1158,7 +1155,7 @@ Setting `variant` on the group applies the same trigger size and spacing to ever
|
|
|
1158
1155
|
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
1159
1156
|
</p>
|
|
1160
1157
|
</auro-accordion>
|
|
1161
|
-
</auro-accordion-group></code></pre>
|
|
1158
|
+
</auro-accordion-group></code></pre>
|
|
1162
1159
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1163
1160
|
</auro-accordion>
|
|
1164
1161
|
|
|
@@ -1269,7 +1266,7 @@ Setting `variant` on the group applies the same trigger size and spacing to ever
|
|
|
1269
1266
|
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
1270
1267
|
</p>
|
|
1271
1268
|
</auro-accordion>
|
|
1272
|
-
</auro-accordion-group></code></pre>
|
|
1269
|
+
</auro-accordion-group></code></pre>
|
|
1273
1270
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1274
1271
|
</auro-accordion>
|
|
1275
1272
|
|
|
@@ -1344,7 +1341,7 @@ Setting `variant` on the group applies the same trigger size and spacing to ever
|
|
|
1344
1341
|
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
|
|
1345
1342
|
</p>
|
|
1346
1343
|
</auro-accordion>
|
|
1347
|
-
</auro-accordion-group></code></pre>
|
|
1344
|
+
</auro-accordion-group></code></pre>
|
|
1348
1345
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1349
1346
|
</auro-accordion>
|
|
1350
1347
|
|
|
@@ -1356,8 +1353,7 @@ The component may be restyled by changing the values of the following token(s).
|
|
|
1356
1353
|
<!-- The below code snippet is automatically added from ./../src/styles/tokens.scss -->
|
|
1357
1354
|
|
|
1358
1355
|
<pre class="language-scss"><code class="language-scss">@use "@aurodesignsystem/design-tokens/dist/themes/alaska/SCSSVariables--alaska" as v;
|
|
1359
|
-
|
|
1360
|
-
:host {
|
|
1356
|
+
:host {
|
|
1361
1357
|
--ds-auro-accordion-content-border-color: transparent;
|
|
1362
1358
|
--ds-auro-accordion-group-border-color: var(--ds-basic-color-border-divider, #{v.$ds-basic-color-border-divider});
|
|
1363
1359
|
--ds-auro-accordion-trigger-border-color: transparent;
|