@@ -15,18 +15,34 @@ import eventMatches from '../../globals/js/misc/event-matches';
15
15
16
16
const { prefix } = settings ;
17
17
18
- export default class SideNav extends mixin (
19
- createComponent ,
20
- initComponentBySearch ,
21
- handles
22
- ) {
18
+ class SideNav extends mixin ( createComponent , initComponentBySearch , handles ) {
23
19
/**
24
20
* The map associating DOM element and copy button UI instance.
25
21
* @member SideNav.components
26
22
* @type {WeakMap }
27
23
*/
28
24
static components /* #__PURE_CLASS_PROPERTY__ */ = new WeakMap ( ) ;
29
25
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
+ */
30
46
constructor ( element , options ) {
31
47
super ( element , options ) ;
32
48
this . manage ( on ( element , 'click' , this . _handleClick ) ) ;
@@ -118,6 +134,16 @@ export default class SideNav extends mixin(
118
134
* @member SideNav.options
119
135
* @type {object }
120
136
* @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.
121
147
*/
122
148
static options /* #__PURE_CLASS_PROPERTY__ */ = {
123
149
selectorInit : '[data-side-nav]' ,
@@ -131,3 +157,5 @@ export default class SideNav extends mixin(
131
157
classSideNavLinkCurrent : `${ prefix } --side-nav__link--current` ,
132
158
} ;
133
159
}
160
+
161
+ export default SideNav ;
0 commit comments