chemicaljs 1.7.2 → 1.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -11
- package/client/chemical.components.js +42 -25
- package/client/chemical.js +8 -0
- package/examples/example/package-lock.json +313 -1541
- package/examples/example/package.json +1 -1
- package/examples/example-build/package-lock.json +313 -1541
- package/examples/example-build/package.json +1 -1
- package/examples/example-components/index.js +1 -1
- package/examples/example-components/package-lock.json +313 -1541
- package/examples/example-components/package.json +1 -1
- package/examples/example-components/public/index.html +9 -9
- package/examples/example-styled/package-lock.json +313 -1541
- package/examples/example-styled/package.json +1 -1
- package/examples/example-styled/public/index.html +2 -2
- package/examples/example-vite/package-lock.json +277 -1475
- package/examples/example-vite/package.json +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<h1>Chemical Example</h1>
|
|
2
2
|
|
|
3
3
|
<p>Open on click</p>
|
|
4
|
-
<a href="https://example.com" is="chemical-link">Example Link</a>
|
|
4
|
+
<a data-href="https://example.com" is="chemical-link">Example Link</a>
|
|
5
5
|
<style>
|
|
6
6
|
a {
|
|
7
7
|
color: blue;
|
|
@@ -13,25 +13,25 @@
|
|
|
13
13
|
}
|
|
14
14
|
</style>
|
|
15
15
|
<p>Open in current tab</p>
|
|
16
|
-
<input target="_self" placeholder="Enter URL" is="chemical-input">
|
|
16
|
+
<input data-target="_self" placeholder="Enter URL" is="chemical-input">
|
|
17
17
|
<p>Open in new tab</p>
|
|
18
|
-
<input target="_blank" placeholder="Enter URL" is="chemical-input">
|
|
18
|
+
<input data-target="_blank" placeholder="Enter URL" is="chemical-input">
|
|
19
19
|
<p>Custom action (console log)</p>
|
|
20
|
-
<input action="logURL" placeholder="Enter URL" is="chemical-input">
|
|
20
|
+
<input data-action="logURL" placeholder="Enter URL" is="chemical-input">
|
|
21
21
|
<script>
|
|
22
22
|
function logURL(url) {
|
|
23
23
|
console.log(url)
|
|
24
24
|
}
|
|
25
25
|
</script>
|
|
26
26
|
<p>With button</p>
|
|
27
|
-
<input id="my-input" target="_blank" placeholder="Enter URL" is="chemical-input">
|
|
28
|
-
<button for="my-input" is="chemical-button">Go!</button>
|
|
27
|
+
<input id="my-input" data-target="_blank" placeholder="Enter URL" is="chemical-input">
|
|
28
|
+
<button data-for="my-input" is="chemical-button">Go!</button>
|
|
29
29
|
<p>With iframe</p>
|
|
30
|
-
<input frame="my-iframe" placeholder="Enter URL" is="chemical-input">
|
|
30
|
+
<input data-frame="my-iframe" placeholder="Enter URL" is="chemical-input">
|
|
31
31
|
<br>
|
|
32
32
|
<iframe id="my-iframe" is="chemical-iframe"></iframe>
|
|
33
33
|
<p>With iframe and controls</p>
|
|
34
|
-
<input frame="my-iframe-2" placeholder="Enter URL" is="chemical-input">
|
|
34
|
+
<input data-frame="my-iframe-2" placeholder="Enter URL" is="chemical-input">
|
|
35
35
|
<section id="my-controls-2" is="chemical-controls">
|
|
36
36
|
<button onclick="chemicalAction('back', 'my-iframe-2')">←</button>
|
|
37
37
|
<button onclick="chemicalAction('forward', 'my-iframe-2')">→</button>
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
<button onclick="chemicalAction('close', 'my-iframe-2')">🗙</button>
|
|
40
40
|
</section>
|
|
41
41
|
<br>
|
|
42
|
-
<iframe controls="my-controls-2" id="my-iframe-2" is="chemical-iframe"></iframe>
|
|
42
|
+
<iframe data-controls="my-controls-2" id="my-iframe-2" is="chemical-iframe"></iframe>
|
|
43
43
|
|
|
44
44
|
<script src="/chemical.js"></script>
|
|
45
45
|
<script src="/chemical.components.js"></script>
|