Skip to content

Commit 30ac771

Browse files
committed
Merge remote-tracking branch 'origin/master'
# Conflicts: # README.md # demos/smart-button-attributes-synchronization.htm # demos/smart-button-create-from-script.htm # demos/smart-button-custom-module.htm # demos/smart-button-events.htm # demos/smart-button-image.htm # demos/smart-button-overview.htm # demos/smart-button-ready.htm # demos/smart-button-rounded-corners.htm # demos/smart-button-theme.htm # package.json
2 parents 4f646f0 + 0ec8e4d commit 30ac771

12 files changed

+524
-6
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66
|
77
[Documentation ↗](https://www.htmlelements.com/docs/)
88
|
9+
<<<<<<< HEAD
910
[Installation ↗](https://www.npmjs.com/package/@smarthtmlelements/smart-core)
11+
=======
12+
[Installation ↗](https://www.npmjs.com/package/@smarthtmlelements/smarthtmlelements-core)
13+
>>>>>>> origin/master
1014
1115
[&lt;smart-button&gt;](http://htmlelements.com/demos/button/) is a Custom HTML Element providing an alternative of the standard button, part of the [Smart HTML Elements](https://htmlelements.com/).
1216

@@ -15,10 +19,19 @@
1519
<custom-element-demo>
1620
<template>
1721
<script src="../webcomponentsjs/webcomponents-lite.js"></script>
22+
<<<<<<< HEAD
1823
<script src="../smart-core/source/smart.element.js"></script>
1924
<script src="../smart-core/source/smart.button.js"></script>
2025
<link rel="stylesheet" href="../smart-core/source/styles/smart.base.css" type="text/css" />
2126
<link rel="stylesheet" href="../smart-core/source/styles/smart.material.css" type="text/css" />
27+
=======
28+
<script src="../smart-core/source-minified/native-shim.js"></script>
29+
<script src="../smart-core/source-minified/smart.element-polyfills.js"></script>
30+
<script src="../smart-core/source-minified/smart.element.js"></script>
31+
<script src="../smart-core/source-minified/smart.button.js"></script>
32+
<link rel="stylesheet" href="../smart-core/source-minified/styles/smart.base.css" type="text/css" />
33+
<link rel="stylesheet" href="../smart-core/source-minified/styles/smart.material.css" type="text/css" />
34+
>>>>>>> origin/master
2235
<next-code-block></next-code-block>
2336
</template>
2437
</custom-element-demo>

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@
1818
],
1919
"dependencies": {
2020
"webcomponentsjs": "^1.0.0",
21-
"smarthtmlelements-core": "HTMLElements/smarthtmlelements-core"
21+
"smart-core": "HTMLElements/smart-core"
2222
}
2323
}

demos/smart-button-attributes-synchronization.htm

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,38 @@
11
<!DOCTYPE html>
22
<html lang="en">
33
<head>
4+
<<<<<<< HEAD
45
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/1.2.0/webcomponents-lite.js"></script>
56
<link rel="stylesheet" href="../../smart-core/source/styles/smart.base.css" type="text/css" />
67
<link rel="stylesheet" href="../styles/demos.css" type="text/css" />
78

89
<script type="text/javascript" src="../../smart-core/source/smart.element.js"></script>
910
<script type="text/javascript" src="../../smart-core/source/smart.button.js"></script>
11+
=======
12+
<script>
13+
// IE/Edge polyfill.
14+
if (!window.customElements) {
15+
document.writeln('<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/0.7.23/webcomponents-lite.js"><\/script>');
16+
document.write('<!--');
17+
}
18+
</script>
19+
<script type="text/javascript" src="../../smart-core/source-minified/native-shim.js"></script>
20+
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/1.0.22/webcomponents-lite.js"></script>
21+
<!--! do not remove -->
22+
<script>
23+
// IE polyfill.
24+
if (!(window.CSS && window.CSS.supports && window.CSS.supports('(--fake-var: 0)'))) {
25+
document.writeln('<link rel="stylesheet" href="../../smart-core/source-minified/styles/smart.base-novars.css" type="text/css" />');
26+
document.write('<!--');
27+
}
28+
</script>
29+
<link rel="stylesheet" href="../../smart-core/source-minified/styles/smart.base.css" type="text/css" />
30+
<!--! do not remove -->
31+
<link rel="stylesheet" href="../styles/demos.css" type="text/css" />
32+
<script type="text/javascript" src="../../smart-core/source-minified/smart.element-polyfills.js"></script>
33+
<script type="text/javascript" src="../../smart-core/source-minified/smart.element.js"></script>
34+
<script type="text/javascript" src="../../smart-core/source-minified/smart.button.js"></script>
35+
>>>>>>> origin/master
1036
<script>
1137
function clickMe(event) {
1238
var button = document.querySelector("smart-button");

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

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,38 @@
11
<!DOCTYPE html>
22
<html lang="en">
33
<head>
4+
<<<<<<< HEAD
45
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/1.2.0/webcomponents-lite.js"></script>
56
<link rel="stylesheet" href="../../smart-core/source/styles/smart.base.css" type="text/css" />
67
<link rel="stylesheet" href="../styles/demos.css" type="text/css" />
78

89
<script type="text/javascript" src="../../smart-core/source/smart.element.js"></script>
910
<script type="text/javascript" src="../../smart-core/source/smart.button.js"></script>
11+
=======
12+
<script>
13+
// IE/Edge polyfill.
14+
if (!window.customElements) {
15+
document.writeln('<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/0.7.23/webcomponents-lite.js"><\/script>');
16+
document.write('<!--');
17+
}
18+
</script>
19+
<script type="text/javascript" src="../../smart-core/source-minified/native-shim.js"></script>
20+
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/1.0.22/webcomponents-lite.js"></script>
21+
<!--! do not remove -->
22+
<script>
23+
// IE polyfill.
24+
if (!(window.CSS && window.CSS.supports && window.CSS.supports('(--fake-var: 0)'))) {
25+
document.writeln('<link rel="stylesheet" href="../../smart-core/source-minified/styles/smart.base-novars.css" type="text/css" />');
26+
document.write('<!--');
27+
}
28+
</script>
29+
<link rel="stylesheet" href="../../smart-core/source-minified/styles/smart.base.css" type="text/css" />
30+
<!--! do not remove -->
31+
<link rel="stylesheet" href="../styles/demos.css" type="text/css" />
32+
<script type="text/javascript" src="../../smart-core/source-minified/smart.element-polyfills.js"></script>
33+
<script type="text/javascript" src="../../smart-core/source-minified/smart.element.js"></script>
34+
<script type="text/javascript" src="../../smart-core/source-minified/smart.button.js"></script>
35+
>>>>>>> origin/master
1036
<script>
1137
window.onload = function () {
1238
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: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,38 @@
11
<!DOCTYPE html>
22
<html lang="en">
33
<head>
4+
<<<<<<< HEAD
45
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/1.2.0/webcomponents-lite.js"></script>
56
<link rel="stylesheet" href="../../smart-core/source/styles/smart.base.css" type="text/css" />
67
<link rel="stylesheet" href="../styles/demos.css" type="text/css" />
78

89
<script type="text/javascript" src="../../smart-core/source/smart.element.js"></script>
910
<script type="text/javascript" src="../../smart-core/source/smart.button.js"></script>
11+
=======
12+
<script>
13+
// IE/Edge polyfill.
14+
if (!window.customElements) {
15+
document.writeln('<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/0.7.23/webcomponents-lite.js"><\/script>');
16+
document.write('<!--');
17+
}
18+
</script>
19+
<script type="text/javascript" src="../../smart-core/source-minified/native-shim.js"></script>
20+
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/1.0.22/webcomponents-lite.js"></script>
21+
<!--! do not remove -->
22+
<script>
23+
// IE polyfill.
24+
if (!(window.CSS && window.CSS.supports && window.CSS.supports('(--fake-var: 0)'))) {
25+
document.writeln('<link rel="stylesheet" href="../../smart-core/source-minified/styles/smart.base-novars.css" type="text/css" />');
26+
document.write('<!--');
27+
}
28+
</script>
29+
<link rel="stylesheet" href="../../smart-core/source-minified/styles/smart.base.css" type="text/css" />
30+
<!--! do not remove -->
31+
<link rel="stylesheet" href="../styles/demos.css" type="text/css" />
32+
<script type="text/javascript" src="../../smart-core/source-minified/smart.element-polyfills.js"></script>
33+
<script type="text/javascript" src="../../smart-core/source-minified/smart.element.js"></script>
34+
<script type="text/javascript" src="../../smart-core/source-minified/smart.button.js"></script>
35+
>>>>>>> origin/master
1036
<script>
1137
window.onload = function () {
1238
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: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,38 @@
11
<!DOCTYPE html>
22
<html lang="en">
33
<head>
4+
<<<<<<< HEAD
45
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/1.2.0/webcomponents-lite.js"></script>
56
<link rel="stylesheet" href="../../smart-core/source/styles/smart.base.css" type="text/css" />
67
<link rel="stylesheet" href="../styles/demos.css" type="text/css" />
78

89
<script type="text/javascript" src="../../smart-core/source/smart.element.js"></script>
910
<script type="text/javascript" src="../../smart-core/source/smart.button.js"></script>
11+
=======
12+
<script>
13+
// IE/Edge polyfill.
14+
if (!window.customElements) {
15+
document.writeln('<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/0.7.23/webcomponents-lite.js"><\/script>');
16+
document.write('<!--');
17+
}
18+
</script>
19+
<script type="text/javascript" src="../../smart-core/source-minified/native-shim.js"></script>
20+
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/1.0.22/webcomponents-lite.js"></script>
21+
<!--! do not remove -->
22+
<script>
23+
// IE polyfill.
24+
if (!(window.CSS && window.CSS.supports && window.CSS.supports('(--fake-var: 0)'))) {
25+
document.writeln('<link rel="stylesheet" href="../../smart-core/source-minified/styles/smart.base-novars.css" type="text/css" />');
26+
document.write('<!--');
27+
}
28+
</script>
29+
<link rel="stylesheet" href="../../smart-core/source-minified/styles/smart.base.css" type="text/css" />
30+
<!--! do not remove -->
31+
<link rel="stylesheet" href="../styles/demos.css" type="text/css" />
32+
<script type="text/javascript" src="../../smart-core/source-minified/smart.element-polyfills.js"></script>
33+
<script type="text/javascript" src="../../smart-core/source-minified/smart.element.js"></script>
34+
<script type="text/javascript" src="../../smart-core/source-minified/smart.button.js"></script>
35+
>>>>>>> origin/master
1036
</head>
1137
<body>
1238
<smart-button id="button">Click Me</smart-button>

0 commit comments

Comments
 (0)