Skip to content

Commit 5e0bccb

Browse files
author
Ryan A. Johnson
committed
docs(jsdoc): basic class and event defs
1 parent e1af72e commit 5e0bccb

25 files changed

+329
-42
lines changed

src/helix-ui/elements/HXAccordionElement.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { HXElement } from './HXElement';
99
*/
1010

1111
/**
12-
* Defines behavior for an `<hx-accordion>` element.
12+
* Defines behavior for the `<hx-accordion>` element.
1313
*
1414
* @emits Accordion:panelchange
1515
* @extends HXElement
@@ -140,4 +140,4 @@ export class HXAccordionElement extends HXElement {
140140
});
141141
}
142142
}
143-
}//HXAccordionElement
143+
}

src/helix-ui/elements/HXAccordionPanelElement.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,23 @@ import shadowMarkup from './HXAccordionPanelElement.html';
33
import shadowStyles from './HXAccordionPanelElement.less';
44

55
/**
6-
* Fires when contents of the accordion panel are revealed.
6+
* Fires when the element's contents are concealed.
77
*
8-
* @event AccordionPanel:open
9-
* @since 0.4.0
8+
* @event AccordionPanel:close
9+
* @since 0.6.0
1010
* @type {CustomEvent}
1111
*/
1212

1313
/**
14-
* Fires when contents of the accordion panel are disclosed.
14+
* Fires when the element's contents are revealed.
1515
*
16-
* @event AccordionPanel:close
17-
* @since 0.6.0
16+
* @event AccordionPanel:open
17+
* @since 0.4.0
1818
* @type {CustomEvent}
1919
*/
2020

2121
/**
22-
* Defines behavior for an `<hx-accordion-panel>` element.
22+
* Defines behavior for the `<hx-accordion-panel>` element.
2323
*
2424
* @emits AccordionPanel:close
2525
* @emits AccordionPanel:open

src/helix-ui/elements/HXAlertElement.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,23 @@ const ICONS = {
1010
};
1111

1212
/**
13-
* Fires when the user triggers the dismiss button.
13+
* Fires when the dismiss button ("X") is pressed.
1414
*
1515
* @event Alert:dismiss
1616
* @since 0.6.0
1717
* @type {CustomEvent}
1818
*/
1919

2020
/**
21-
* Fires when the user triggers the CTA button.
21+
* Fires when the CTA button is pressed.
2222
*
2323
* @event Alert:submit
2424
* @since 0.6.0
2525
* @type {CustomEvent}
2626
*/
2727

2828
/**
29-
* Defines behavior for an `<hx-alert>` element.
29+
* Defines behavior for the `<hx-alert>` element.
3030
*
3131
* @emits Alert:dismiss
3232
* @emits Alert:submit

src/helix-ui/elements/HXBusyElement.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import { HXElement } from './HXElement';
22

33
/**
4-
* Defines behavior for an `<hx-busy>` element.
4+
* Defines behavior for the `<hx-busy>` element.
55
*
66
* @extends HXElement
77
* @hideconstructor
8+
* @since 0.4.0
89
*/
910
export class HXBusyElement extends HXElement {
1011
static get is () {
@@ -36,4 +37,4 @@ export class HXBusyElement extends HXElement {
3637
this.removeAttribute('paused');
3738
}
3839
}
39-
}//HXBusyElement
40+
}

src/helix-ui/elements/HXCheckboxElement.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,16 @@ import shadowMarkup from './HXCheckboxElement.html';
44
import shadowStyles from './HXCheckboxElement.less';
55

66
/**
7-
* Fires when the checked state changes
7+
* Fires when the element's `checked` state changes
88
*
99
* @event Checkbox:change
1010
* @since 0.1.8
1111
* @type {CustomEvent}
1212
*/
1313

1414
/**
15-
* Defines behavior for an `<hx-checkbox>` element.
15+
* Defines behavior for the `<hx-checkbox>` element.
1616
*
17-
* @class
1817
* @emits Checkbox:change
1918
* @extends HXElement
2019
* @hideconstructor
@@ -118,4 +117,4 @@ export class HXCheckboxElement extends HXElement {
118117
get _input () {
119118
return this.shadowRoot.getElementById('nativeControl');
120119
}
121-
}//HXCheckboxElement
120+
}

src/helix-ui/elements/HXDisclosureElement.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ import { HXElement } from './HXElement';
22
import { KEYS } from '../util';
33

44
/**
5-
* Defines behavior for an `<hx-disclosure>` element.
5+
* Defines behavior for the `<hx-disclosure>` element.
66
*
77
* @extends HXElement
88
* @hideconstructor
9+
* @since 0.2.0
910
*/
1011
export class HXDisclosureElement extends HXElement {
1112
static get is () {
@@ -124,4 +125,4 @@ export class HXDisclosureElement extends HXElement {
124125
_onTargetClose () {
125126
this.expanded = false;
126127
}
127-
}//HXDisclosureElement
128+
}

src/helix-ui/elements/HXElement.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import { KEYS } from '../util';
1717
* @extends external:HTMLElement
1818
* @hideconstructor
1919
* @requires util
20+
* @since 0.2.0
2021
*/
2122
export class HXElement extends HTMLElement {
2223
/**
@@ -319,4 +320,4 @@ export class HXElement extends HTMLElement {
319320
this.removeAttribute('disabled');
320321
}
321322
}
322-
}//HXElement
323+
}

src/helix-ui/elements/HXErrorElement.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@ import { HXElement } from './HXElement';
22
import shadowStyles from './HXErrorElement.less';
33
import shadowMarkup from './HXErrorElement.html';
44

5+
/**
6+
* Defines behavior for the `<hx-error>` element.
7+
*
8+
* @extends HXElement
9+
* @hideconstructor
10+
* @since 0.4.0
11+
*/
512
export class HXErrorElement extends HXElement {
613
static get is () {
714
return 'hx-error';
@@ -10,4 +17,4 @@ export class HXErrorElement extends HXElement {
1017
static get template () {
1118
return `<style>${shadowStyles}</style>${shadowMarkup}`;
1219
}
13-
}//HXErrorElement
20+
}

src/helix-ui/elements/HXIconElement.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
import { HXElement } from './HXElement';
22
import Icons from '../icons';
33

4+
/**
5+
* Defines behavior for the `<hx-icon>` element.
6+
*
7+
* @extends HXElement
8+
* @since 0.1.0
9+
*/
410
export class HXIconElement extends HXElement {
511
static get is () {
612
return 'hx-icon';
@@ -57,4 +63,4 @@ export class HXIconElement extends HXElement {
5763
this.appendChild(svg);
5864
}
5965
}//_render()
60-
}//HXIconElement
66+
}

src/helix-ui/elements/HXMenuElement.js

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,31 @@
11
import { HXElement } from './HXElement';
22
import { getPosition } from '../util';
33

4+
/**
5+
* Fires when the element is concealed.
6+
*
7+
* @event Menu:close
8+
* @since 0.6.0
9+
* @type {CustomEvent}
10+
*/
11+
12+
/**
13+
* Fires when the element is revealed.
14+
*
15+
* @event Menu:open
16+
* @since 0.6.0
17+
* @type {CustomEvent}
18+
*/
19+
20+
/**
21+
* Defines behavior for the `<hx-menu>` element.
22+
*
23+
* @emits Menu:close
24+
* @emits Menu:open
25+
* @extends HXElement
26+
* @hideconstructor
27+
* @since 0.2.0
28+
*/
429
export class HXMenuElement extends HXElement {
530
static get is () {
631
return 'hx-menu';
@@ -110,4 +135,4 @@ export class HXMenuElement extends HXElement {
110135
this.open = false;
111136
}
112137
}
113-
}//HXMenuElement
138+
}

0 commit comments

Comments
 (0)