@@ -15,18 +15,34 @@ import eventMatches from '../../globals/js/misc/event-matches';
1515
1616const { prefix } = settings ;
1717
18- export default class SideNav extends mixin (
19- createComponent ,
20- initComponentBySearch ,
21- handles
22- ) {
18+ class SideNav extends mixin ( createComponent , initComponentBySearch , handles ) {
2319 /**
2420 * The map associating DOM element and copy button UI instance.
2521 * @member SideNav.components
2622 * @type {WeakMap }
2723 */
2824 static components /* #__PURE_CLASS_PROPERTY__ */ = new WeakMap ( ) ;
2925
26+ /**
27+ * Side nav.
28+ * @extends CreateComponent
29+ * @extends InitComponentBySearch
30+ * @extends Handles
31+ * @param {HTMLElement } element The element working as a side nav.
32+ * @param {object } [options] The component options.
33+ * @param {string } [options.selectorSideNavToggle]
34+ * The CSS selector to find the toggle button.
35+ * @param {string } [options.selectorSideNavSubmenu] The CSS selector to find the trigger buttons for sub nav items.
36+ * @param {string } [options.selectorSideNavItem] The CSS selector to find the nav items.
37+ * @param {string } [options.selectorSideNavLink] The CSS selector to find the interactive potions in non-nested nav items.
38+ * @param {string } [options.selectorSideNavLinkCurrent]
39+ * The CSS selector to find the interactive potion in active non-nested nav item.
40+ * @param {string } [options.classSideNavExpanded] The CSS class for the expanded state.
41+ * @param {string } [options.classSideNavItemActive]
42+ * The CSS class for the active/inactive state for nav items.
43+ * @param {string } [options.classSideNavLinkCurrent]
44+ * The CSS class for the active/inactive state of the interactive potion in non-nested nav items.
45+ */
3046 constructor ( element , options ) {
3147 super ( element , options ) ;
3248 this . manage ( on ( element , 'click' , this . _handleClick ) ) ;
@@ -118,6 +134,16 @@ export default class SideNav extends mixin(
118134 * @member SideNav.options
119135 * @type {object }
120136 * @property {string } selectorInit The data attribute to find side navs.
137+ * @property {string } [selectorSideNavToggle] The CSS selector to find the toggle button.
138+ * @property {string } [selectorSideNavSubmenu] The CSS selector to find the trigger buttons for sub nav items.
139+ * @property {string } [selectorSideNavItem] The CSS selector to find the nav items.
140+ * @property {string } [selectorSideNavLink] The CSS selector to find the interactive portions in non-nested nav items.
141+ * @property {string } [selectorSideNavLinkCurrent]
142+ * The CSS selector to find the interactive potion in active non-nested nav item.
143+ * @property {string } [classSideNavExpanded] The CSS class for the expanded state.
144+ * @property {string } [classSideNavItemActive] The CSS class for the active/inactive state for nav items.
145+ * @property {string } [classSideNavLinkCurrent]
146+ * The CSS class for the active/inactive state of the interactive portion in non-nested nav items.
121147 */
122148 static options /* #__PURE_CLASS_PROPERTY__ */ = {
123149 selectorInit : '[data-side-nav]' ,
@@ -131,3 +157,5 @@ export default class SideNav extends mixin(
131157 classSideNavLinkCurrent : `${ prefix } --side-nav__link--current` ,
132158 } ;
133159}
160+
161+ export default SideNav ;
0 commit comments