Skip to content

Commit 52ae057

Browse files
author
Elliott Marquez
committed
auto-converted by polymer-modulizer
1 parent 66d530f commit 52ae057

35 files changed

+2791
-3470
lines changed

.travis.yml

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,20 @@ language: node_js
22
sudo: 'false'
33
before_script:
44
- npm install -g polymer-cli
5-
- polymer install --variants
65
- git checkout package-lock.json
7-
- >-
8-
npm run update-types && git diff --exit-code || (echo -e
9-
'\n\033[31mERROR:\033[0m Typings are stale. Please run "npm run
10-
update-types".' && false)
11-
- >-
12-
npm run format && git diff --exit-code || (echo -e '\n\033[31mERROR:\033[0m
13-
Project is not formatted. Please run "npm run format".' && false)
146
env:
157
global:
16-
- secure: >-
17-
PlKMLY9ofkSDxO7t1V0MUTiUiyyhrI6AOWVneAxpGrvyU1WDd9nCbh+e8wRvLw+4BHYNlrLUTemrnbquh7cyOV2a5ZKSAmXqkaA/4ISWIy+XD2AgLpoDl9ptl+VOSmxND4aTD5ErnueXLUMUI96v50Kj4jDYuTZsy/2q38861tk=
18-
- secure: >-
19-
aV25bA3RceITQ0MOQAh20XDibw067hY5N9BmIHiNi0WN6pEmxicr0535EVZyFHmhvJL2VMCPcVr+YNaRAySCeXTDQ6Mn7uMQ7KfllIoqPEdLjlF3mTW+fhz8pOgrwUDza6FS2tVS7jXscE8CTKfU6rjOxIEnUNBn33UdMyXWotk=
8+
- secure: PlKMLY9ofkSDxO7t1V0MUTiUiyyhrI6AOWVneAxpGrvyU1WDd9nCbh+e8wRvLw+4BHYNlrLUTemrnbquh7cyOV2a5ZKSAmXqkaA/4ISWIy+XD2AgLpoDl9ptl+VOSmxND4aTD5ErnueXLUMUI96v50Kj4jDYuTZsy/2q38861tk=
9+
- secure: aV25bA3RceITQ0MOQAh20XDibw067hY5N9BmIHiNi0WN6pEmxicr0535EVZyFHmhvJL2VMCPcVr+YNaRAySCeXTDQ6Mn7uMQ7KfllIoqPEdLjlF3mTW+fhz8pOgrwUDza6FS2tVS7jXscE8CTKfU6rjOxIEnUNBn33UdMyXWotk=
2010
node_js: '9'
2111
addons:
2212
firefox: latest
2313
chrome: stable
2414
script:
25-
- xvfb-run polymer test
26-
- >-
27-
if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then polymer test -s 'default';
28-
fi
15+
- xvfb-run polymer test --module-resolution=node --npm
16+
- 'if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then polymer test --module-resolution=node --npm -s ''default''; fi'
2917
dist: trusty
3018
cache:
3119
directories:
3220
- node_modules
21+

all-imports.d.ts

Lines changed: 0 additions & 13 deletions
This file was deleted.

all-imports.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
99
-->
1010

11-
<link rel="import" href="paper-input.html">
12-
<link rel="import" href="paper-textarea.html">
11+
<script type="module" src="./paper-input.js"></script>
12+
<script type="module" src="./paper-textarea.js"></script>

bower.json

Lines changed: 0 additions & 84 deletions
This file was deleted.

demo/index.html

Lines changed: 75 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,33 @@
1616

1717
<title>paper-input demo</title>
1818

19-
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
20-
21-
<link rel="import" href="../../iron-demo-helpers/demo-pages-shared-styles.html">
22-
<link rel="import" href="../../iron-demo-helpers/demo-snippet.html">
23-
<link rel="import" href="../../iron-icon/iron-icon.html">
24-
<link rel="import" href="../../iron-icons/iron-icons.html">
25-
<link rel="import" href="../../iron-input/iron-input.html">
26-
<link rel="import" href="../../paper-icon-button/paper-icon-button.html">
27-
<link rel="import" href="../../paper-styles/color.html">
28-
<link rel="import" href="../paper-input-container.html">
29-
<link rel="import" href="../paper-input-error.html">
30-
<link rel="import" href="../paper-input.html">
31-
<link rel="import" href="../paper-textarea.html">
32-
<link rel="import" href="ssn-input.html">
33-
34-
<custom-style>
19+
<script src="../../../@webcomponents/webcomponentsjs/webcomponents-bundle.js"></script>
20+
21+
<script type="module" src="../../iron-demo-helpers/demo-pages-shared-styles.js"></script>
22+
<script type="module" src="../../iron-demo-helpers/demo-snippet.js"></script>
23+
<script type="module" src="../../iron-icon/iron-icon.js"></script>
24+
<script type="module" src="../../iron-icons/iron-icons.js"></script>
25+
<script type="module" src="../../iron-input/iron-input.js"></script>
26+
<script type="module" src="../../paper-icon-button/paper-icon-button.js"></script>
27+
<script type="module" src="../../paper-styles/color.js"></script>
28+
<script type="module" src="../paper-input-container.js"></script>
29+
<script type="module" src="../paper-input-error.js"></script>
30+
<script type="module" src="../paper-input.js"></script>
31+
<script type="module" src="../paper-textarea.js"></script>
32+
<script type="module" src="./ssn-input.js"></script>
33+
34+
<!-- FIXME(polymer-modulizer):
35+
These imperative modules that innerHTML your HTML are
36+
a hacky way to be sure that any mixins in included style
37+
modules are ready before any elements that reference them are
38+
instantiated, otherwise the CSS @apply mixin polyfill won't be
39+
able to expand the underlying CSS custom properties.
40+
See: https://github.com/Polymer/polymer-modulizer/issues/154
41+
-->
42+
<script type="module">
43+
const $_documentContainer = document.createElement('template');
44+
45+
$_documentContainer.innerHTML = `<custom-style>
3546
<style is="custom-style" include="demo-pages-shared-styles">
3647
paper-input {
3748
display: block;
@@ -69,47 +80,53 @@
6980
display: inline-block;
7081
}
7182
</style>
72-
</custom-style>
83+
</custom-style>`;
84+
85+
document.body.appendChild($_documentContainer.content);
86+
</script>
7387
</head>
7488
<body unresolved>
75-
<div class="vertical-section-container centered">
89+
<script type="module">
90+
const $_documentContainer = document.createElement('template');
91+
92+
$_documentContainer.innerHTML = `<div class="vertical-section-container centered">
7693
<h3>Inputs can have different types, and be disabled</h3>
7794
<demo-snippet>
7895
<template>
7996
<paper-input label="text input"></paper-input>
8097
<paper-input label="text input" value="pre-filled"></paper-input>
8198
<paper-textarea label="autoresizing textarea input"></paper-textarea>
8299
<paper-input label="password input" type="password"></paper-input>
83-
<paper-input label="disabled input" disabled value="batman"></paper-input>
100+
<paper-input label="disabled input" disabled="" value="batman"></paper-input>
84101
</template>
85102
</demo-snippet>
86103
87104
<h3>Inputs can have character counters</h3>
88105
<demo-snippet>
89106
<template>
90-
<paper-input label="simple character counter" char-counter></paper-input>
91-
<paper-input label="input with at most 10 characters" char-counter maxlength="10"></paper-input>
107+
<paper-input label="simple character counter" char-counter=""></paper-input>
108+
<paper-input label="input with at most 10 characters" char-counter="" maxlength="10"></paper-input>
92109
</template>
93110
</demo-snippet>
94111
95112
<h3>The label can have different floating states</h3>
96113
<demo-snippet>
97114
<template>
98115
<paper-input label="this label floats after typing"></paper-input>
99-
<paper-input label="this label is always floating" always-float-label></paper-input>
100-
<paper-input label="this label never floats" no-label-float></paper-input>
101-
<paper-input label="this label is always floating" always-float-label placeholder="placeholder text"></paper-input>
116+
<paper-input label="this label is always floating" always-float-label=""></paper-input>
117+
<paper-input label="this label never floats" no-label-float=""></paper-input>
118+
<paper-input label="this label is always floating" always-float-label="" placeholder="placeholder text"></paper-input>
102119
</template>
103120
</demo-snippet>
104121
105122
<h3>Inputs can validate automatically or on demand, and can have custom error messages</h3>
106123
<demo-snippet>
107124
<template>
108-
<paper-input label="this input requires some text" required auto-validate error-message="needs some text!"></paper-input>
109-
<paper-input label="this input requires letters only" auto-validate pattern="[a-zA-Z]*" error-message="letters only!"></paper-input>
110-
<paper-input label="this input requires letters only" auto-validate pattern="[a-zA-Z]*" error-message="letters only!" value="pre-filled 123"></paper-input>
111-
<paper-input label="this input will only let you type letters" auto-validate allowed-pattern="[a-zA-Z]"></paper-input>
112-
<paper-input id="inputForValidation" required label="this input is manually validated" pattern="[a-zA-Z]*" error-message="letters only!"></paper-input>
125+
<paper-input label="this input requires some text" required="" auto-validate="" error-message="needs some text!"></paper-input>
126+
<paper-input label="this input requires letters only" auto-validate="" pattern="[a-zA-Z]*" error-message="letters only!"></paper-input>
127+
<paper-input label="this input requires letters only" auto-validate="" pattern="[a-zA-Z]*" error-message="letters only!" value="pre-filled 123"></paper-input>
128+
<paper-input label="this input will only let you type letters" auto-validate="" allowed-pattern="[a-zA-Z]"></paper-input>
129+
<paper-input id="inputForValidation" required="" label="this input is manually validated" pattern="[a-zA-Z]*" error-message="letters only!"></paper-input>
113130
114131
<button onclick="validate()">Validate!</button>
115132
</template>
@@ -119,14 +136,13 @@ <h3>Inputs can have prefixes and suffixes</h3>
119136
<demo-snippet class="horizontal">
120137
<template>
121138
<paper-input label="total" type="number">
122-
<div slot="prefix">$</div>
139+
<div slot="prefix">\$</div>
123140
</paper-input>
124141
125142
<paper-input label="username" id="inputWithButton">
126143
<iron-icon icon="mail" slot="prefix"></iron-icon>
127144
<div slot="suffix">@email.com</div>
128-
<paper-icon-button slot="suffix" onclick="clearInput()"
129-
icon="clear" alt="clear" title="clear">
145+
<paper-icon-button slot="suffix" onclick="clearInput()" icon="clear" alt="clear" title="clear">
130146
</paper-icon-button>
131147
</paper-input>
132148
</template>
@@ -135,7 +151,7 @@ <h3>Inputs can have prefixes and suffixes</h3>
135151
<h3>Inputs can have custom logic</h3>
136152
<demo-snippet>
137153
<template>
138-
<paper-input-container always-float-label auto-validate attr-for-value="value">
154+
<paper-input-container always-float-label="" auto-validate="" attr-for-value="value">
139155
<label slot="label">Social Security Number</label>
140156
<ssn-input class="paper-input-input" slot="input"></ssn-input>
141157
<paper-input-error slot="add-on">SSN invalid!</paper-input-error>
@@ -214,24 +230,38 @@ <h3>Inputs can be completely restyled</h3>
214230
</style>
215231
</custom-style>
216232
<div class="custom-parent">
217-
<paper-input class="custom" label="Name" value="Batman" always-float-label>
233+
<paper-input class="custom" label="Name" value="Batman" always-float-label="">
218234
</paper-input>
219-
<paper-input class="custom" label="Address (letters only, will autovalidate)"
220-
always-float-label auto-validate pattern="[a-zA-Z]*">
235+
<paper-input class="custom" label="Address (letters only, will autovalidate)" always-float-label="" auto-validate="" pattern="[a-zA-Z]*">
221236
</paper-input>
222237
</div>
223238
</template>
224239
</demo-snippet>
225-
</div>
240+
</div>`;
241+
242+
document.body.appendChild($_documentContainer.content);
243+
</script>
226244

227-
<script>
228-
function validate() {
229-
document.getElementById('inputForValidation').validate();
230-
}
245+
<script type="module">
246+
import '@polymer/iron-demo-helpers/demo-pages-shared-styles.js';
247+
import '@polymer/iron-demo-helpers/demo-snippet.js';
248+
import '@polymer/iron-icon/iron-icon.js';
249+
import '@polymer/iron-icons/iron-icons.js';
250+
import '@polymer/iron-input/iron-input.js';
251+
import '@polymer/paper-icon-button/paper-icon-button.js';
252+
import '@polymer/paper-styles/color.js';
253+
import '../paper-input-container.js';
254+
import '../paper-input-error.js';
255+
import '../paper-input.js';
256+
import '../paper-textarea.js';
257+
import './ssn-input.js';
258+
function validate() {
259+
document.getElementById('inputForValidation').validate();
260+
}
231261

232-
function clearInput() {
233-
document.getElementById('inputWithButton').value = '';
234-
}
235-
</script>
262+
function clearInput() {
263+
document.getElementById('inputWithButton').value = '';
264+
}
265+
</script>
236266
</body>
237267
</html>

0 commit comments

Comments
 (0)