@aurodesignsystem-dev/auro-sidenav 0.0.0-pr72.0 → 0.0.0-pr76.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/custom-elements.json +2689 -0
- package/demo/api.md +121 -67
- package/demo/auro-sidenavsection.min.js +497 -3111
- package/dist/auro-sidenavsection-C7L7K2Ru.js +253 -0
- package/dist/index.d.ts +159 -51
- package/dist/index.js +1 -1
- package/dist/registered.js +1 -1
- package/package.json +11 -8
- package/dist/auro-sidenavsection-CYdzk1Q4.js +0 -145
package/demo/api.md
CHANGED
|
@@ -6,89 +6,110 @@
|
|
|
6
6
|
The auro-sidenav element provides users a way to create navigational interfaces on the left-hand
|
|
7
7
|
side of a page to navigate to separate pages or different sections within the same page.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
### Properties & Attributes
|
|
10
10
|
|
|
11
|
-
|
|
|
12
|
-
|
|
13
|
-
|
|
|
11
|
+
| Properties | Attributes | Type | Default | Description |
|
|
12
|
+
| --- | --- | --- | --- | --- |
|
|
13
|
+
static | static | boolean | | When applied the sidenav will expand to an open state and can't be collapsed.
|
|
14
|
+
|
|
15
|
+
### Methods
|
|
14
16
|
|
|
15
|
-
|
|
17
|
+
| Name | Parameters | Return | Description |
|
|
18
|
+
| --- | --- | --- | --- |
|
|
19
|
+
register | `name` (string) - The name of element that you want to register to. | | This will register this element with the browser.
|
|
20
|
+
|
|
21
|
+
### Slots
|
|
16
22
|
|
|
17
|
-
| Name
|
|
18
|
-
|
|
19
|
-
|
|
|
20
|
-
|
|
23
|
+
| Name | Description |
|
|
24
|
+
| --- | --- |
|
|
25
|
+
heading | Defines what to use as the header of the sidenav.
|
|
26
|
+
(default) | Default slot of the sidenav. Please construct using auro-sidenavitems and auro-sidenavsections.
|
|
27
|
+
ariaLabel | Defines what to use as the aria-label of the sidenav.
|
|
28
|
+
|
|
29
|
+
---
|
|
21
30
|
|
|
22
31
|
# auro-sidenavitem
|
|
23
32
|
|
|
24
33
|
The auro-sidenavitem element is the default child element of auro-sidenav.
|
|
25
34
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
| Part | Description |
|
|
45
|
-
|--------------|--------------------------------------------------|
|
|
46
|
-
| [link](#link) | Allows styling to be applied to the `a` element. |
|
|
47
|
-
| [targetIcon](#targetIcon) | Allows styling to be applied to the icon that appears next to the hyperlink. |
|
|
35
|
+
### Properties & Attributes
|
|
36
|
+
|
|
37
|
+
| Properties | Attributes | Type | Default | Description |
|
|
38
|
+
| --- | --- | --- | --- | --- |
|
|
39
|
+
role | | String | | Defines ARIA roles; currently supports `button` for extended experiences.
|
|
40
|
+
safeUri | | | | Returns a safe URI based on the provided `href` and `relative` parameters.<br>If `href` is truthy, it generates a safe URL using the `safeUrl` function.<br>Otherwise, it returns an empty string.
|
|
41
|
+
includesDomain | | | | Checks whether the provided URI (if available) includes the 'http' protocol.<br>If the URI is truthy, it examines whether it contains 'http'.<br>Otherwise, it returns false.
|
|
42
|
+
appearance | appearance | string | 'default' | Defines whether the component will be on lighter or darker backgrounds.
|
|
43
|
+
download | download | boolean | false | If true, the linked resource will be downloaded when the hyperlink is clicked.
|
|
44
|
+
relative | relative | boolean | false | If true, the auto URL re-write feature will be disabled.
|
|
45
|
+
ondark | ondark | boolean | false | DEPRECATED - use `appearance` instead.
|
|
46
|
+
variant | variant | string | "primary" | Sets button variant option.
|
|
47
|
+
href | href | string | | Defines the URL of the linked page.
|
|
48
|
+
rel | rel | string | | Defines the relationship between the current document and the linked document.
|
|
49
|
+
target | target | string | | Defines where to open the linked document.
|
|
50
|
+
type | type | string | | Defines the type of hyperlink; accepts `nav` or `cta`.
|
|
51
|
+
fluid | fluid | boolean | | If true and `type="cta"`, the hyperlink will have a fluid-width UI.
|
|
52
|
+
referrerpolicy | referrerpolicy | boolean | | If true, sets `strict-origin-when-cross-origin` to control the referrer information sent with requests.
|
|
48
53
|
|
|
49
|
-
|
|
54
|
+
### Methods
|
|
50
55
|
|
|
51
|
-
|
|
56
|
+
| Name | Parameters | Return | Description |
|
|
57
|
+
| --- | --- | --- | --- |
|
|
58
|
+
register | `name` (string) - The name of element that you want to register to. | | This will register this element with the browser.
|
|
52
59
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
| Property | Attribute | Type | Default | Description |
|
|
56
|
-
|--------------|--------------|-----------|---------|--------------------------------------------------|
|
|
57
|
-
| [alignRight](#alignRight) | `alignRight` | `Boolean` | | If set, the trigger content will align right. |
|
|
58
|
-
| [chevron](#chevron) | `chevron` | `String` | | Sets chevron variant option. Possible values are: `none`, `right`. |
|
|
59
|
-
| [disabled](#disabled) | `disabled` | `Boolean` | | If set, the accordion is disabled and have reduced opacity. |
|
|
60
|
-
| [emphasis](#emphasis) | `emphasis` | `Boolean` | | If set, emphasis styles will be applied to the auro-accordions. |
|
|
61
|
-
| [expanded](#expanded) | `expanded` | `Boolean` | false | If set, the accordion is expanded. |
|
|
62
|
-
| [grouped](#grouped) | `grouped` | `Boolean` | | Attribute will be set on accordion when it appears in an accordion group. |
|
|
63
|
-
| [variant](#variant) | `variant` | `String` | | Sets accordion variant option. Possible values are: `sm`, `lg`. |
|
|
60
|
+
### CSS Shadow Parts
|
|
64
61
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
| Event | Type | Description |
|
|
74
|
-
|------------------|---------------------------------------|--------------------------------------------------|
|
|
75
|
-
| [toggleExpanded](#toggleExpanded) | `CustomEvent<{ expanded: boolean; }>` | Notifies that the accordion has been expanded or closed. |
|
|
62
|
+
| Name | Description |
|
|
63
|
+
| --- | --- |
|
|
64
|
+
link | Allows styling to be applied to the `a` element.
|
|
65
|
+
targetIcon | Allows styling to be applied to the icon that appears next to the hyperlink.
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
# auro-sidenavsection
|
|
76
70
|
|
|
77
|
-
|
|
71
|
+
The auro-sidenavsection element can be used to create an accordion of auro-sidenavitems within the auro-sidenav.
|
|
72
|
+
|
|
73
|
+
### Properties & Attributes
|
|
74
|
+
|
|
75
|
+
| Properties | Attributes | Type | Default | Description |
|
|
76
|
+
| --- | --- | --- | --- | --- |
|
|
77
|
+
expanded | expanded | boolean | false | If set, the accordion is expanded.
|
|
78
|
+
alignRight | alignRight | boolean | | If set, the trigger content will align right.
|
|
79
|
+
emphasis | emphasis | boolean | | If set, emphasis styles will be applied to the auro-accordions.
|
|
80
|
+
grouped | grouped | boolean | | Attribute will be set on accordion when it appears in an accordion group.
|
|
81
|
+
chevron | chevron | string | | Sets chevron variant option. Possible values are: `none`, `right`.
|
|
82
|
+
variant | variant | string | | Sets accordion variant option. Possible values are: `sm`, `lg`.
|
|
83
|
+
disabled | disabled | boolean | | If set, the accordion is disabled and have reduced opacity.
|
|
84
|
+
|
|
85
|
+
### Methods
|
|
78
86
|
|
|
79
|
-
| Name
|
|
80
|
-
|
|
81
|
-
|
|
|
82
|
-
|
|
|
87
|
+
| Name | Parameters | Return | Description |
|
|
88
|
+
| --- | --- | --- | --- |
|
|
89
|
+
register | `name` (string) - The name of element that you want to register to. | | This will register this element with the browser.
|
|
90
|
+
toggle | None | | Toggles the visibility of the accordion content.
|
|
91
|
+
|
|
92
|
+
### Events
|
|
83
93
|
|
|
84
|
-
|
|
94
|
+
| Name | Description |
|
|
95
|
+
| --- | --- |
|
|
96
|
+
toggleExpanded | Notifies that the accordion has been expanded or closed.
|
|
97
|
+
|
|
98
|
+
### Slots
|
|
85
99
|
|
|
86
|
-
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
100
|
+
| Name | Description |
|
|
101
|
+
| --- | --- |
|
|
102
|
+
(default) | Default slot for the accordion content.
|
|
103
|
+
trigger | Defines the content of the trigger element.
|
|
104
|
+
|
|
105
|
+
### CSS Shadow Parts
|
|
106
|
+
|
|
107
|
+
| Name | Description |
|
|
108
|
+
| --- | --- |
|
|
109
|
+
accordion | Apply CSS to Accordion wrapper.
|
|
110
|
+
trigger | Apply CSS to trigger element.
|
|
111
|
+
chevron | Apply CSS to chevron icon.
|
|
112
|
+
content | Apply CSS to the accordion content.
|
|
92
113
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
93
114
|
|
|
94
115
|
## API Examples
|
|
@@ -126,6 +147,39 @@ The `heading` slot defines what to use as the header of the sidenav.
|
|
|
126
147
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
127
148
|
</auro-accordion>
|
|
128
149
|
|
|
150
|
+
#### ariaLabel
|
|
151
|
+
|
|
152
|
+
The `ariaLabel` slot defines what to use as the aria-label of the sidenav.
|
|
153
|
+
|
|
154
|
+
**Note:** Do not use the `aria-label` attribute on the `auro-sidenav` element itself. This will be ignored in favor of the `ariaLabel` slot.
|
|
155
|
+
|
|
156
|
+
<div class="exampleWrapper">
|
|
157
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../apiExamples/ariaLabelSlot.html) -->
|
|
158
|
+
<!-- The below content is automatically added from ../apiExamples/ariaLabelSlot.html -->
|
|
159
|
+
<auro-sidenav static>
|
|
160
|
+
<span slot="ariaLabel">History of Alaska Airlines</span>
|
|
161
|
+
<auro-sidenavitem href="/content/about-us/history">Historical overview</auro-sidenavitem>
|
|
162
|
+
<auro-sidenavitem href="/content/about-us/history/history-by-decade">History by decade</auro-sidenavitem>
|
|
163
|
+
<auro-sidenavitem href="/content/about-us/history/pioneers">Alaska Airlines pioneers</auro-sidenavitem>
|
|
164
|
+
</auro-sidenav>
|
|
165
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
166
|
+
</div>
|
|
167
|
+
<auro-accordion alignRight>
|
|
168
|
+
<span slot="trigger">See code</span>
|
|
169
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=../apiExamples/ariaLabelSlot.html) -->
|
|
170
|
+
<!-- The below code snippet is automatically added from ../apiExamples/ariaLabelSlot.html -->
|
|
171
|
+
|
|
172
|
+
```html
|
|
173
|
+
<auro-sidenav static>
|
|
174
|
+
<span slot="ariaLabel">History of Alaska Airlines</span>
|
|
175
|
+
<auro-sidenavitem href="/content/about-us/history">Historical overview</auro-sidenavitem>
|
|
176
|
+
<auro-sidenavitem href="/content/about-us/history/history-by-decade">History by decade</auro-sidenavitem>
|
|
177
|
+
<auro-sidenavitem href="/content/about-us/history/pioneers">Alaska Airlines pioneers</auro-sidenavitem>
|
|
178
|
+
</auro-sidenav>
|
|
179
|
+
```
|
|
180
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
181
|
+
</auro-accordion>
|
|
182
|
+
|
|
129
183
|
### Theme Support
|
|
130
184
|
|
|
131
185
|
The component may be restyled using the following code sample and changing the values of the following token(s).
|