Closed sun-mota closed 1 month ago
This pull request adds a static register
method to both AuroMenu
and AuroMenuOption
classes, allowing for easier registration of custom elements. It also updates the component to support custom element names and modifies the documentation and examples accordingly.
classDiagram
class AuroMenu {
+static register(name="auro-menu")
+handleNoCheckmarkAttr()
+initItems()
+handleNestedMenus(menu)
+handleSlotItems()
}
class AuroMenuOption {
+static register(name="auro-menuoption")
+firstUpdated()
}
note for AuroMenu "Added static register method to register custom element names"
note for AuroMenuOption "Added static register method to register custom element names"
Change | Details | Files |
---|---|---|
Added static register method to AuroMenu and AuroMenuOption classes |
|
src/auro-menu.js src/auro-menuoption.js demo/index.md docs/partials/index.md demo/index.js |
Updated component to support custom element names |
|
src/auro-menu.js src/style-menu.scss demo/index.md apiExamples/custom.html |
Refactored component registration process |
|
demo/index.js demo/index.html docs/partials/index.md |
:tada: This PR is included in version 4.1.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Alaska Airlines Pull Request
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Resolves: #218
Summary:
AuroMenu.register
andAuroMenuOption.register
are to easily register the element without extra importingimport "@aurodesignsystem/auro-menu"
will still register this element to<auro-menu>
import { AuroMenu } from '@aurodesignsystem/auro-menu/src/auro-menu.js
wont register this element untilAuroMenu.register
gets calledType of change:
Please delete options that are not relevant.
Checklist:
By submitting this Pull Request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Pull Requests will be evaluated by their quality of update and whether it is consistent with the goals and values of this project. Any submission is to be considered a conversation between the submitter and the maintainers of this project and may require changes to your submission.
Thank you for your submission!
-- Auro Design System Team
Summary by Sourcery
Add static register methods to AuroMenu and AuroMenuOption for manual element registration, update query selectors to support attribute selectors, and revise documentation to guide users on the new registration process.
New Features:
Enhancements:
Documentation: