Skip to content

Commit 548db34

Browse files
authored
Merge pull request #198 from rackerlabs/RAJ-free-friday
refactor(*): free friday
2 parents 6a7840a + 3453127 commit 548db34

File tree

88 files changed

+393
-361
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+393
-361
lines changed

bin/start.js

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const browserSync = require('browser-sync').create();
77
const exec = require('child_process').exec;
88
const { compileScripts, compileStyles } = require('../lib/compile');
99
const { copyDist } = require('../lib/copy');
10-
const { generateAll } = require('../lib/generate');
10+
const { generateAll, generateApis } = require('../lib/generate');
1111

1212
const serverRoutes = {}
1313
serverRoutes[CONFIG.site.baseHref] = CONFIG.publicDir;
@@ -32,33 +32,41 @@ browserSync.init({
3232
`${CONFIG.publicDir}/*`,
3333
`${CONFIG.publicDir}/**/*`,
3434

35-
// Regenerate docs if anything changes in the docs source
35+
// Regenerate docs if anything changes in the docs directory
36+
// or if any LightDOM CSS changes in the source directory
3637
{
3738
match: [
3839
`${CONFIG.docsDir}/*`,
3940
`${CONFIG.docsDir}/**/*`,
41+
`${CONFIG.sourceDir}/*.less`,
42+
`${CONFIG.sourceDir}/**/*.less`,
43+
`!${CONFIG.sourceDir}/**/_*.less`, // (-) ShadowDOM CSS
4044
],
41-
fn: _.debounce(generateAll, 1500),
45+
fn: _.debounce(function () {
46+
compileStyles();
47+
generateAll();
48+
}, 1500),
4249
},
4350

4451
// Recompile toolkit scripts if any JS file changes in source directory
4552
{
4653
match: [
4754
`${CONFIG.sourceDir}/*.js`,
4855
`${CONFIG.sourceDir}/**/*.js`,
49-
`${CONFIG.sourceDir}/**/_*.less`,
56+
`${CONFIG.sourceDir}/**/_*.less`, // (+) ShadowDOM CSS
5057
],
5158
fn: _.debounce(compileScripts, 1500),
5259
},
5360

54-
// Recompile toolkit styles if any LESS file changes in source directory
61+
// Generate API docs when src files change
5562
{
5663
match: [
57-
`${CONFIG.sourceDir}/*.less`,
58-
`${CONFIG.sourceDir}/**/*.less`,
59-
`!${CONFIG.sourceDir}/**/_*.less`,
64+
`${CONFIG.sourceDir}/*.js`,
65+
`${CONFIG.sourceDir}/**/*.js`,
66+
`${CONFIG.sourceDir}/*.md`,
67+
`${CONFIG.sourceDir}/**/*.md`,
6068
],
61-
fn: _.debounce(compileStyles, 1500),
69+
fn: _.debounce(generateApis, 1500),
6270
},
6371

6472
// Only copy when files change in dist/

docs/docs.less

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
\* ==================================================== */
44
@import (reference) 'vars';
55
// import grid mixins from toolkit
6-
@import (reference) 'modules/grid';
6+
@import (reference) 'components/grid';
77

88
@demo-container-border: 1px dashed @gray-600;
99
@demo-fill-color: fade(@orange-500, 25%);
@@ -96,6 +96,7 @@ hx-status {
9696
hx-dt {
9797
#grid.span(3);
9898
}
99+
99100
hx-dd {
100101
#grid.span(9);
101102
}

docs/elements/hx-tab/index.html

Lines changed: 34 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,15 @@
1212
{% block content %}
1313
<section>
1414
<p>
15-
The custom <code>&lt;hx-tab&gt;</code> element labels a companion
15+
The custom <code>{{page.title}}</code> element labels a companion
1616
<a href="elements/hx-tabpanel">&lt;hx-tabpanel&gt;</a> element.
1717
</p>
18+
<p>
19+
<small class="hxSubdued">
20+
<hx-icon type="info-circle"></hx-icon>
21+
The element is named after the accessible <code>tab</code> role.
22+
</small>
23+
</p>
1824

1925
<hx-dl class="hxBox-md metadata">
2026
<hx-def>
@@ -33,34 +39,46 @@
3339

3440
{% block attributes %}
3541
<dl>
36-
<dt>aria-controls</dt>
42+
<dt>aria-controls {String}</dt>
3743
<dd>
38-
Automatically set by <a href="elements/hx-tabset">&lt;hx-tabset&gt;</a>
39-
when attached to the DOM.
44+
<p>
45+
Automatically set by <a href="elements/hx-tabset">&lt;hx-tabset&gt;</a>
46+
when attached to the DOM.
47+
</p>
4048
</dd>
4149

42-
<dt>aria-selected</dt>
50+
<dt>aria-selected {String="false"} (true|false)</dt>
4351
<dd>
44-
Automatically set as the <code>current</code> attribute/property changes.
52+
<p>
53+
Automatically set as the <code>current</code> attribute changes.
54+
</p>
4555
</dd>
4656

47-
<dt>current</dt>
57+
<dt>current {Boolean}</dt>
4858
<dd>
49-
Automatically applied by <a href="elements/hx-tabset">&lt;hx-tabset&gt;</a>
50-
to identify the current tab in a tablist.
59+
<p>
60+
Automatically applied by <a href="elements/hx-tabset">&lt;hx-tabset&gt;</a>
61+
to identify the current tab in a tablist.
62+
</p>
5163
</dd>
5264

53-
<dt>id</dt>
65+
<dt>id {String}</dt>
5466
<dd>
55-
Used by <a href="elements/hx-tabset">&lt;hx-tabset&gt;</a> to
56-
wire up a tab to its tabpanel using the <code>aria-controls</code> and
57-
<code>aria-labelledby</code> attributes. If you do not define an
58-
<code>id</code> attribute, one will be automatically generated.
67+
<p>
68+
Used by <a href="elements/hx-tabset">&lt;hx-tabset&gt;</a> to
69+
wire up a tab to its tabpanel using the <code>aria-controls</code> and
70+
<code>aria-labelledby</code> attributes.
71+
</p>
72+
<p>
73+
Automatically generated, if not explicitly defined in markup.
74+
</p>
5975
</dd>
6076

61-
<dt>role</dt>
77+
<dt>role {String="tab"}</dt>
6278
<dd>
63-
Automatically set, if not explicitly defined in markup.
79+
<p>
80+
Automatically set to <code>tab</code>, if not explicitly defined in markup.
81+
</p>
6482
</dd>
6583
</dl>
6684
{% endblock %}

docs/elements/hx-tabcontent/index.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,11 @@
3535

3636
{% block attributes %}
3737
<dl>
38-
<dt>role</dt>
38+
<dt>role {String="presentation"}</dt>
3939
<dd>
40-
Automatically set to <code>presentation</code>, if not explicitly defined in markup.
40+
<p>
41+
Automatically set to <code>presentation</code>, if not explicitly defined in markup.
42+
</p>
4143
</dd>
4244
</dl>
4345
{% endblock %}

docs/elements/hx-tablist/index.html

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,15 @@
1212
{% block content %}
1313
<section>
1414
<p>
15-
The custom <code>&lt;hx-tablist&gt;</code> element arranges tabs
15+
The custom <code>{{page.title}}</code> element arranges tabs
1616
within a tabset.
1717
</p>
18+
<p>
19+
<small class="hxSubdued">
20+
<hx-icon type="info-circle"></hx-icon>
21+
The element is named after the accessible <code>tablist</code> role.
22+
</small>
23+
</p>
1824

1925
<hx-dl class="hxBox-md metadata">
2026
<hx-def>
@@ -35,9 +41,11 @@
3541

3642
{% block attributes %}
3743
<dl>
38-
<dt>role</dt>
44+
<dt>role {String="tablist"}</dt>
3945
<dd>
40-
Automatically set to <code>tablist</code>, if not explicitly defined in markup.
46+
<p>
47+
Automatically set to <code>tablist</code>, if not explicitly defined in markup.
48+
</p>
4149
</dd>
4250
</dl>
4351
{% endblock %}

docs/elements/hx-tabpanel/index.html

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,17 @@
1212
{% block content %}
1313
<section>
1414
<p>
15-
The custom <code>&lt;hx-tabpanel&gt;</code> element provides automatic
15+
The custom <code>{{page.title}}</code> element provides automatic
1616
scrolling when content is too long to fit within a height-constrained
17-
tabset. It is usually accompanied by a companion
17+
tabset. It should be accompanied by a companion
1818
<a href="elements/hx-tab">&lt;hx-tab&gt;</a> element.
1919
</p>
20+
<p>
21+
<small class="hxSubdued">
22+
<hx-icon type="info-circle"></hx-icon>
23+
The element is named after the accessible <code>tabpanel</code> role.
24+
</small>
25+
</p>
2026

2127
<hx-dl class="hxBox-md metadata">
2228
<hx-def>
@@ -45,27 +51,37 @@
4551

4652
{% block attributes %}
4753
<dl>
48-
<dt>aria-expanded <small>{String="top"}</small></dt>
54+
<dt>aria-expanded {String="false"}</dt>
4955
<dd>
50-
Automatically set as the <code>open</code> attribute/property changes.
56+
<p>
57+
Automatically set as the <code>open</code> attribute/property changes.
58+
</p>
5159
</dd>
5260

53-
<dt>id</dt>
61+
<dt>id {String}</dt>
5462
<dd>
55-
Used by <a href="elements/hx-tabset">&lt;hx-tabset&gt;</a> to
56-
wire up a tab to its tabpanel using the <code>aria-controls</code> and
57-
<code>aria-labelledby</code> attributes. If you do not define an
58-
<code>id</code> attribute, one will be automatically generated.
63+
<p>
64+
Used by <a href="elements/hx-tabset">&lt;hx-tabset&gt;</a> to
65+
wire up a tab to its tabpanel using the <code>aria-controls</code> and
66+
<code>aria-labelledby</code> attributes.
67+
</p>
68+
<p>
69+
Automatically generated, if not explicitly defined in markup.
70+
</p>
5971
</dd>
6072

61-
<dt>open</dt>
73+
<dt>open {Boolean}</dt>
6274
<dd>
63-
When present, contents are visible.
75+
<p>
76+
When present, contents are visible.
77+
</p>
6478
</dd>
6579

66-
<dt>role</dt>
80+
<dt>role {String="tabpanel"}</dt>
6781
<dd>
68-
Automatically set to <code>tabpanel</code>, if not explicitly defined in markup.
82+
<p>
83+
Automatically set to <code>tabpanel</code>, if not explicitly defined in markup.
84+
</p>
6985
</dd>
7086
</dl>
7187
{% endblock %}

docs/elements/hx-tabset/index.html

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
{% block content %}
1313
<section>
1414
<p>
15-
The custom <code>&lt;hx-tabset&gt;</code> element provides functionality to
15+
The custom <code>{{page.title}}</code> element provides functionality to
1616
navigate between one or more tab panels.
1717
</p>
1818

@@ -46,7 +46,11 @@
4646

4747
{% block attributes %}
4848
<dl>
49-
<dt>current-tab <small>{Number=0}</small></dt>
50-
<dd>Zero-based index of the currently active tab + tabpanel.</dd>
49+
<dt>current-tab {Integer=0}</dt>
50+
<dd>
51+
<p>
52+
Zero-based index of the currently active tab + tabpanel.
53+
</p>
54+
</dd>
5155
</dl>
5256
{% endblock %}

docs/styles/demo/button-docs.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import (reference) 'modules/button';
1+
@import (reference) 'components/buttons';
22

33
.button-demo {
44
height: 6rem;

docs/styles/demo/choice-tiles-docs.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import (reference) 'modules/choice-tiles';
1+
@import (reference) 'components/choice-tiles';
22

33
.choice-tile-demo {
44
label.hxChoice > input {

jsdoc.conf.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"opts": {
3+
"recurse": true,
4+
"destination": "./public/api"
5+
},
6+
"source": {
7+
"include": [
8+
"src/helix-ui"
9+
]
10+
},
11+
"markdown": {
12+
"idInHeadings": true
13+
},
14+
"plugins": [
15+
"plugins/markdown"
16+
]
17+
}

0 commit comments

Comments
 (0)