Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

Commit a3e10c7

Browse files
author
george
committed
finish doc updates
1 parent f9ec9fd commit a3e10c7

File tree

5 files changed

+9
-11
lines changed

5 files changed

+9
-11
lines changed

app/assets/fonts/.gitkeep

Lines changed: 0 additions & 1 deletion
This file was deleted.

app/docs/branding.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,8 @@ In order for the previous html snippet to work, you will need to add a `div` or
3535
<p>This is some random text</p>
3636
</div>
3737
</div>
38-
3938
<button>Press me, too!</button>
40-
<p>This is some other random text!<p>
39+
<p>This is some other random text!</p>
4140
```
4241

4342
Now any elements within the `my-scope` wrapper will use Undernet's styling, and the other elements will not.

app/docs/javascript.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ A number of components are available for you to use in your site:
1111

1212
Additionally, there are two utilities you can use to manipulate certain behavior outside of components using the `ContextUtil` plugin:
1313

14-
1. Focus Trapping: Use `ContextUtil.captureFocus(selector)` to trap focus within a given container. `selector` can be any valid class, id, attribute, or other identifier in the DOM. E.g., `.my-cool-class`. To release focus, use `ContextUtil.releaseFocus()`; it assumes you are releasing the focus on the same element you captured focus on, so don't call `captureFocus` twice in a row!
15-
2. Focus Outline: Use `ContextUtil.enableFocusOutline()` to enable a focus outline when keyboard navigation activity is detected (spacebar, enter, escape, arrow keys, etc). Use `ContextUtil.disableFocusOutline()` to manually turn it off.
14+
1. **Focus Trap**: Use `ContextUtil.captureFocus(selector)` to trap focus within a given container. `selector` can be any valid class, id, attribute, or other identifier in the DOM. E.g., `.my-cool-class`. To release focus, use `ContextUtil.releaseFocus()`; it assumes you are releasing focus on the same element you captured focus on, so don't call `captureFocus` twice in a row!
15+
2. **Focus Outline**: Use `ContextUtil.enableFocusOutline()` to enable a focus outline when keyboard navigation activity is detected (tab, shift, spacebar, enter, escape, arrow keys, etc). Use `ContextUtil.disableFocusOutline()` to manually turn it off.
1616

17-
# API Patterns
17+
## API Pattern
1818

1919
Undernet's components and focus outline plugin can all be enabled using a one line "start" method:
2020

@@ -36,13 +36,13 @@ Modals.start()
3636
Modals.stop()
3737
```
3838

39-
## Bundling
39+
## Bundle & Install Options
4040

4141
There's two main ways to gain access to the JavaScript: the CDN and NPM package. The API is the same in either case.
4242

43-
### CDN
43+
### CDN or Static Assets
4444

45-
Just like in the [Introduction](/docs/overview/introduction) article, the fastest option is to add the compiled assets right to your layout. Then in a separate script tag, call the API.
45+
Similar the [Introduction](/docs/overview/introduction) article (CDN example is used there), the fastest option is to add the compiled assets right to your layout. Then in a separate script tag, call the API.
4646

4747
```html
4848
<!DOCTYPE html>

js/src/index.bundle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
import Undernet from "./index"
22

33
window.Undernet = Undernet
4-
export { default as Undernet, Modals, Accordions, Dropdowns, Tooltips, Utils } from "./index"
4+
export { default as Undernet, Modals, Accordions, Dropdowns, Tooltips, ContextUtil } from "./index"

js/src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ export const Tooltips = new _Tooltips()
1111
export const ContextUtil = new _ContextUtil()
1212

1313
const Undernet = {
14-
// Components
1514
Modals,
1615
Accordions,
1716
Dropdowns,
@@ -31,6 +30,7 @@ Undernet.stop = () => {
3130
Undernet.Modals.stop()
3231
Undernet.Accordions.stop()
3332
Undernet.Dropdowns.stop()
33+
Undernet.Tooltips.stop()
3434
ContextUtil.disableFocusOutline()
3535
}
3636

0 commit comments

Comments
 (0)