Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions docs/core/makeup-expander/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,15 @@ <h2>Auto Collapse On</h2>
<p>A checkbox: <input type="checkbox" aria-label="Dummy checkbox" /></p>
</div>
</span>

<h2>UseAriaExpanded=false</h2>

<span class="expander expander--tooltip flyout">
<button class="expander__host">Btn</button>
<div class="expander__content flyout__content">
<p>A link: <a id="foo" href="http://www.ebay.com">www.ebay.com</a></p>
</div>
</span>
</main>
<script src="index.min.js"></script>
</body>
Expand Down
26 changes: 20 additions & 6 deletions docs/core/makeup-expander/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const hoverExpanderEls = document.querySelectorAll(".expander--hover-only");
const hoverAndFocusExpanderEls = document.querySelectorAll(".expander--focus-and-hover");
const stealthExpanderEls = document.querySelectorAll(".expander--stealth-only");
const clickAndSpacebarExpanderEls = document.querySelectorAll(".expander--click-and-spacebar");
const tooltipEls = document.querySelectorAll(".expander--tooltip");
const expanderWidgets = [];

expanderWidgets.push(new Expander(clickExpanderEls[0], { expandOnClick: true }));
Expand Down Expand Up @@ -49,11 +50,24 @@ clickAndSpacebarExpanderEls.forEach(function (el) {
);
});

expanderWidgets.forEach(function (item) {
item.el.addEventListener("expander-expand", function (e) {
console.log(e);
});
item.el.addEventListener("expander-collapse", function (e) {
console.log(e);
tooltipEls.forEach(function (el) {
expanderWidgets.push(
new Expander(el, {
ariaControls: false,
autoCollapse: true,
expandOnFocus: true,
expandOnHover: true,
useAriaExpanded: false,
expandedClass: "expander__host-container--expanded",
}),
);

expanderWidgets.forEach(function (item) {
item.el.addEventListener("expander-expand", function (e) {
console.log(e);
});
item.el.addEventListener("expander-collapse", function (e) {
console.log(e);
});
});
});
47 changes: 35 additions & 12 deletions docs/core/makeup-expander/index.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/core/makeup-expander/index.min.js.map

Large diffs are not rendered by default.

24 changes: 18 additions & 6 deletions docs/ui/makeup-combobox/index.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/ui/makeup-combobox/index.min.js.map

Large diffs are not rendered by default.

24 changes: 18 additions & 6 deletions docs/ui/makeup-listbox-button/index.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/ui/makeup-listbox-button/index.min.js.map

Large diffs are not rendered by default.

24 changes: 18 additions & 6 deletions docs/ui/makeup-menu-button/index.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/ui/makeup-menu-button/index.min.js.map

Large diffs are not rendered by default.

Loading