Skip to content

Commit

Permalink
Merge pull request #3 from sashafirsov/develop
Browse files Browse the repository at this point in the history
release 1.0.1
  • Loading branch information
sashafirsov authored Mar 8, 2021
2 parents 46161e3 + 8be2ad7 commit 4fb1d8b
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 8 deletions.
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ are covering the typical UI tasks:
3. control UI parts(slots) depending on fetch state.

[![git](https://cdnjs.cloudflare.com/ajax/libs/octicons/8.5.0/svg/mark-github.svg) GitHub](https://github.com/sashafirsov/slotted-element)
| Demo: [fetch-element](https://unpkg.com/slotted-element@1.0.0/demo/index.html)
, [JSON as table](https://unpkg.com/slotted-element@1.0.0/demo/render-from-json.html)
| Demo: [slotted-element](https://unpkg.com/slotted-element@1.0.1/demo/index.html)
, [fetch-element JSON as table](https://unpkg.com/slotted-element@1.0.1/demo/render-from-json.html)
| [tests project](https://github.com/sashafirsov/slotted-element-test)

[![NPM version][npm-image]][npm-url]
Expand All @@ -33,6 +33,7 @@ the `slotted-element` is derived from `fetch-element`.
</fieldset>
</slotted-element>
```
![screenshot][screenshot]

# slotted-element
Gives ability to use slots **without shadowDOM** and exposes API to work with slots programmatically by adding and
Expand All @@ -46,7 +47,8 @@ The slots concept is described in
Originally it works in conjunction with shadowDOM when slots defined in content of element and referenced in
rendered shadowDOM by name. I.e. rendered DOM defines which slot and where will be displayed inside of web component.

`slotted-element` gives ability to manipulate slots programmatically without engaging shadows dom.
`slotted-element` gives ability to manipulate slots programmatically without engaging
[Shadow DOM](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM).

## API
* `slotsInit()` read slots from internal DOM to be cloned later by
Expand Down Expand Up @@ -118,4 +120,5 @@ source repo and npm.


[npm-image]: https://img.shields.io/npm/v/slotted-element.svg
[npm-url]: https://npmjs.org/package/slotted-element
[npm-url]: https://npmjs.org/package/slotted-element
[screenshot]: ./demo/Screenshot-fetch-element.png
Binary file added demo/Screenshot-fetch-element.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<body>

<h1> slotted-element demo </h1>
<a href=""><img src="https://cdnjs.cloudflare.com/ajax/libs/octicons/8.5.0/svg/mark-github.svg">git</a> |
<a href="https://github.com/sashafirsov/slotted-element"><img src="https://cdnjs.cloudflare.com/ajax/libs/octicons/8.5.0/svg/mark-github.svg">git</a> |
<a href="render-from-json.html"> fetch-element demo </a>
<p>
<var>slotted-element</var> is web component implementing slots without shadow DOM.
Expand Down Expand Up @@ -55,7 +55,7 @@ <h1> slotted-element demo </h1>
</slotted-element>
</html-demo-element>

<script type="module" src="https://unpkg.com/html-demo-element@1.0.0/html-demo-element.js"></script>
<script type="module" src="https://unpkg.com/html-demo-element@1.0.1/html-demo-element.js"></script>
<script type="module" src="../slotted-element.js"></script>

</body>
Expand Down
2 changes: 1 addition & 1 deletion demo/render-from-json.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<title>render from json - FetchElement</title>
</head>
<body>
<script type="module" src="https://unpkg.com/html-demo-element@1.0.0/html-demo-element.js"></script>
<script type="module" src="https://unpkg.com/html-demo-element@1.0.1/html-demo-element.js"></script>

<html-demo-element title="Custom renderer">
<json-render-element src="doc.json"></json-render-element>
Expand Down
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "slotted-element",
"version": "1.0.0",
"version": "1.0.1",
"description": "Web component fetch-element for ajax and render JSON as table and slotted-element without shadow DOM",
"author":
{ "name": "Sasha Firsov",
Expand All @@ -9,6 +9,11 @@
},
"homepage": "https://github.com/sashafirsov/slotted-element",
"bugs": "https://github.com/sashafirsov/slotted-element/issues",
"repository": {
"type": "git",
"url": "https://github.com/sashafirsov/slotted-element.git"
},

"keywords":
[ "JS",
"Vanilla",
Expand Down

0 comments on commit 4fb1d8b

Please sign in to comment.