Skip to content

Commit 99170f6

Browse files
authored
Add files via upload
1 parent 09d8919 commit 99170f6

9 files changed

Lines changed: 366 additions & 37 deletions

demos/smart-button-attributes-synchronization.htm

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,22 @@
88
document.write('<!--');
99
}
1010
</script>
11-
<script type="text/javascript" src="../../smarthtmlelements-core/source-minified/native-shim.js"></script>
11+
<script type="text/javascript" src="../../smart-core/source-minified/native-shim.js"></script>
1212
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/1.0.22/webcomponents-lite.js"></script>
1313
<!--! do not remove -->
1414
<script>
1515
// IE polyfill.
1616
if (!(window.CSS && window.CSS.supports && window.CSS.supports('(--fake-var: 0)'))) {
17-
document.writeln('<link rel="stylesheet" href="../../smarthtmlelements-core/source-minified/styles/smart.base-novars.css" type="text/css" />');
17+
document.writeln('<link rel="stylesheet" href="../../smart-core/source-minified/styles/smart.base-novars.css" type="text/css" />');
1818
document.write('<!--');
1919
}
2020
</script>
21-
<link rel="stylesheet" href="../../smarthtmlelements-core/source-minified/styles/smart.base.css" type="text/css" />
21+
<link rel="stylesheet" href="../../smart-core/source-minified/styles/smart.base.css" type="text/css" />
2222
<!--! do not remove -->
2323
<link rel="stylesheet" href="../styles/demos.css" type="text/css" />
24-
<script type="text/javascript" src="../../smarthtmlelements-core/source-minified/smart.element-polyfills.js"></script>
25-
<script type="text/javascript" src="../../smarthtmlelements-core/source-minified/smart.element.js"></script>
26-
<script type="text/javascript" src="../../smarthtmlelements-core/source-minified/smart.button.js"></script>
24+
<script type="text/javascript" src="../../smart-core/source-minified/smart.element-polyfills.js"></script>
25+
<script type="text/javascript" src="../../smart-core/source-minified/smart.element.js"></script>
26+
<script type="text/javascript" src="../../smart-core/source-minified/smart.button.js"></script>
2727
<script>
2828
function clickMe(event) {
2929
var button = document.querySelector("smart-button");

demos/smart-button-create-from-script.htm

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,22 @@
88
document.write('<!--');
99
}
1010
</script>
11-
<script type="text/javascript" src="../../smarthtmlelements-core/source-minified/native-shim.js"></script>
11+
<script type="text/javascript" src="../../smart-core/source-minified/native-shim.js"></script>
1212
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/1.0.22/webcomponents-lite.js"></script>
1313
<!--! do not remove -->
1414
<script>
1515
// IE polyfill.
1616
if (!(window.CSS && window.CSS.supports && window.CSS.supports('(--fake-var: 0)'))) {
17-
document.writeln('<link rel="stylesheet" href="../../smarthtmlelements-core/source-minified/styles/smart.base-novars.css" type="text/css" />');
17+
document.writeln('<link rel="stylesheet" href="../../smart-core/source-minified/styles/smart.base-novars.css" type="text/css" />');
1818
document.write('<!--');
1919
}
2020
</script>
21-
<link rel="stylesheet" href="../../smarthtmlelements-core/source-minified/styles/smart.base.css" type="text/css" />
21+
<link rel="stylesheet" href="../../smart-core/source-minified/styles/smart.base.css" type="text/css" />
2222
<!--! do not remove -->
2323
<link rel="stylesheet" href="../styles/demos.css" type="text/css" />
24-
<script type="text/javascript" src="../../smarthtmlelements-core/source-minified/smart.element-polyfills.js"></script>
25-
<script type="text/javascript" src="../../smarthtmlelements-core/source-minified/smart.element.js"></script>
26-
<script type="text/javascript" src="../../smarthtmlelements-core/source-minified/smart.button.js"></script>
24+
<script type="text/javascript" src="../../smart-core/source-minified/smart.element-polyfills.js"></script>
25+
<script type="text/javascript" src="../../smart-core/source-minified/smart.element.js"></script>
26+
<script type="text/javascript" src="../../smart-core/source-minified/smart.button.js"></script>
2727
<script>
2828
window.onload = function () {
2929
var button = document.createElement("smart-button");
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<script>
5+
// IE/Edge polyfill.
6+
if (!window.customElements) {
7+
document.writeln('<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/0.7.23/webcomponents-lite.js"><\/script>');
8+
document.write('<!--');
9+
}
10+
</script>
11+
<script type="text/javascript" src="../../smart-core/smart-core/source-minified/native-shim.js"></script>
12+
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/1.0.22/webcomponents-lite.js"></script>
13+
<!--! do not remove -->
14+
<script>
15+
// IE polyfill.
16+
if (!(window.CSS && window.CSS.supports && window.CSS.supports('(--fake-var: 0)'))) {
17+
document.writeln('<link rel="stylesheet" href="../../smart-core/smart-core/source-minified/styles/smart.base-novars.css" type="text/css" />');
18+
document.write('<!--');
19+
}
20+
</script>
21+
<link rel="stylesheet" href="../../smart-core/smart-core/source-minified/styles/smart.base.css" type="text/css" />
22+
<!--! do not remove -->
23+
<link rel="stylesheet" href="../styles/demos.css" type="text/css" />
24+
<script type="text/javascript" src="../../smart-core/smart-core/source-minified/smart.element-polyfills.js"></script>
25+
<script type="text/javascript" src="../../smart-core/smart-core/source-minified/smart.element.js"></script>
26+
<script type="text/javascript" src="../../smart-core/smart-core/source-minified/smart.button.js"></script>
27+
<script>
28+
class ColorModule {
29+
static get properties() {
30+
var properties =
31+
{
32+
'color': {
33+
value: 'red',
34+
type: 'string',
35+
observer: 'setColor'
36+
}
37+
}
38+
39+
return properties;
40+
}
41+
42+
attached() {
43+
}
44+
45+
detached() {
46+
}
47+
48+
created() {
49+
}
50+
51+
ready() {
52+
this.ownerElement.$.button.style.color = this.color;
53+
}
54+
55+
setColor(oldColor, color) {
56+
this.ownerElement.$.button.style.color = this.color;
57+
}
58+
}
59+
60+
window.Smart.Elements.whenRegistered('smart-button', function (proto) {
61+
proto.addModule(ColorModule);
62+
});
63+
</script>
64+
65+
<script>
66+
function clickMe(event) {
67+
var button = document.getElementById("button");
68+
button.color = 'green';
69+
}
70+
</script>
71+
</head>
72+
<body>
73+
<smart-button id="button" onclick="clickMe(event)">Click Me</smart-button>
74+
</body>
75+
</html>

demos/smart-button-events.htm

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,22 @@
88
document.write('<!--');
99
}
1010
</script>
11-
<script type="text/javascript" src="../../smarthtmlelements-core/source-minified/native-shim.js"></script>
11+
<script type="text/javascript" src="../../smart-core/source-minified/native-shim.js"></script>
1212
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/1.0.22/webcomponents-lite.js"></script>
1313
<!--! do not remove -->
1414
<script>
1515
// IE polyfill.
1616
if (!(window.CSS && window.CSS.supports && window.CSS.supports('(--fake-var: 0)'))) {
17-
document.writeln('<link rel="stylesheet" href="../../smarthtmlelements-core/source-minified/styles/smart.base-novars.css" type="text/css" />');
17+
document.writeln('<link rel="stylesheet" href="../../smart-core/source-minified/styles/smart.base-novars.css" type="text/css" />');
1818
document.write('<!--');
1919
}
2020
</script>
21-
<link rel="stylesheet" href="../../smarthtmlelements-core/source-minified/styles/smart.base.css" type="text/css" />
21+
<link rel="stylesheet" href="../../smart-core/source-minified/styles/smart.base.css" type="text/css" />
2222
<!--! do not remove -->
2323
<link rel="stylesheet" href="../styles/demos.css" type="text/css" />
24-
<script type="text/javascript" src="../../smarthtmlelements-core/source-minified/smart.element-polyfills.js"></script>
25-
<script type="text/javascript" src="../../smarthtmlelements-core/source-minified/smart.element.js"></script>
26-
<script type="text/javascript" src="../../smarthtmlelements-core/source-minified/smart.button.js"></script>
24+
<script type="text/javascript" src="../../smart-core/source-minified/smart.element-polyfills.js"></script>
25+
<script type="text/javascript" src="../../smart-core/source-minified/smart.element.js"></script>
26+
<script type="text/javascript" src="../../smart-core/source-minified/smart.button.js"></script>
2727
<script>
2828
window.onload = function () {
2929
var myElement = document.querySelector('smart-button');

demos/smart-button-image.htm

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<script>
5+
// IE/Edge polyfill.
6+
if (!window.customElements) {
7+
document.writeln('<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/0.7.23/webcomponents-lite.js"><\/script>');
8+
document.write('<!--');
9+
}
10+
</script>
11+
<script type="text/javascript" src="../../smart-core/source-minified/native-shim.js"></script>
12+
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/1.0.22/webcomponents-lite.js"></script>
13+
<!--! do not remove -->
14+
<script>
15+
// IE polyfill.
16+
if (!(window.CSS && window.CSS.supports && window.CSS.supports('(--fake-var: 0)'))) {
17+
document.writeln('<link rel="stylesheet" href="../../smart-core/source-minified/styles/smart.base-novars.css" type="text/css" />');
18+
document.write('<!--');
19+
}
20+
</script>
21+
<link rel="stylesheet" href="../../smart-core/source-minified/styles/smart.base.css" type="text/css" />
22+
<!--! do not remove -->
23+
<link rel="stylesheet" href="../styles/demos.css" type="text/css" />
24+
<script type="text/javascript" src="../../smart-core/source-minified/smart.element-polyfills.js"></script>
25+
<script type="text/javascript" src="../../smart-core/source-minified/smart.element.js"></script>
26+
<script type="text/javascript" src="../../smart-core/source-minified/smart.button.js"></script>
27+
<script type="text/javascript" src="../../smart-core/source-minified/smart.button.js"></script>
28+
<style>
29+
smart-button {
30+
width: auto;
31+
height: auto;
32+
}
33+
</style>
34+
</head>
35+
<body>
36+
<smart-button class="smart-button-large"><span class="glyphicon glyphicon-ok"></span> OK</smart-button>
37+
<smart-button class="smart-button"><span class="glyphicon glyphicon-ok"></span> OK</smart-button>
38+
<smart-button class="smart-button-small"><span class="glyphicon glyphicon-ok"></span> OK</smart-button>
39+
<smart-button class="smart-button-very-small"><span class="glyphicon glyphicon-ok"></span> OK</smart-button>
40+
</body>
41+
</html>

demos/smart-button-overview.htm

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,22 @@
88
document.write('<!--');
99
}
1010
</script>
11-
<script type="text/javascript" src="../../smarthtmlelements-core/source-minified/native-shim.js"></script>
11+
<script type="text/javascript" src="../../smart-core/source-minified/native-shim.js"></script>
1212
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/1.0.22/webcomponents-lite.js"></script>
1313
<!--! do not remove -->
1414
<script>
1515
// IE polyfill.
1616
if (!(window.CSS && window.CSS.supports && window.CSS.supports('(--fake-var: 0)'))) {
17-
document.writeln('<link rel="stylesheet" href="../../smarthtmlelements-core/source-minified/styles/smart.base-novars.css" type="text/css" />');
17+
document.writeln('<link rel="stylesheet" href="../../smart-core/source-minified/styles/smart.base-novars.css" type="text/css" />');
1818
document.write('<!--');
1919
}
2020
</script>
21-
<link rel="stylesheet" href="../../smarthtmlelements-core/source-minified/styles/smart.base.css" type="text/css" />
21+
<link rel="stylesheet" href="../../smart-core/source-minified/styles/smart.base.css" type="text/css" />
2222
<!--! do not remove -->
2323
<link rel="stylesheet" href="../styles/demos.css" type="text/css" />
24-
<script type="text/javascript" src="../../smarthtmlelements-core/source-minified/smart.element-polyfills.js"></script>
25-
<script type="text/javascript" src="../../smarthtmlelements-core/source-minified/smart.element.js"></script>
26-
<script type="text/javascript" src="../../smarthtmlelements-core/source-minified/smart.button.js"></script>
24+
<script type="text/javascript" src="../../smart-core/source-minified/smart.element-polyfills.js"></script>
25+
<script type="text/javascript" src="../../smart-core/source-minified/smart.element.js"></script>
26+
<script type="text/javascript" src="../../smart-core/source-minified/smart.button.js"></script>
2727
</head>
2828
<body>
2929
<smart-button id="button">Click Me</smart-button>

0 commit comments

Comments
 (0)