This repository has been archived by the owner on Aug 27, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 0.6.0-a2 * somewhat working start of textbox element * paper textbox * added dropdown to paper set * extract setter logger * improve dropdown readability * version in header * fix knobs * validation * vaadin * initial dropdown value * v0.6.0-a3.0 * vaadin * better api to replace entire component set * move lit-any sources * component set doc * fix tests * first tests for paper components * ignore "bad" imports in test code * test which import element * browserstack in place of sauce * remove sauce connect * dropdown tests * stylistic change
- Loading branch information
Showing
61 changed files
with
3,157 additions
and
995 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,6 @@ end_of_line = lf | |
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
[*.json] | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=WebAnimations"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,5 +5,3 @@ node_js: | |
before_script: | ||
- yarn bower i | ||
- yarn lint | ||
addons: | ||
sauce_connect: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import { html } from 'lit-html/lib/lit-extended'; | ||
import { repeat } from 'lit-html/lib/repeat'; | ||
|
||
export function textbox({ | ||
type = 'single line', | ||
} = { }) { | ||
return (f, id, v, set) => { | ||
if (type === 'multi line') { | ||
return html`<paper-textarea | ||
label="${f.title}" | ||
value="${v}" | ||
required?="${f.required}" | ||
auto-validate | ||
on-value-changed="${e => set(e.target.value)}" ></paper-textarea>`; | ||
} | ||
|
||
return html`<paper-input | ||
label="${f.title}" | ||
type="text" | ||
value="${v}" | ||
required?="${f.required}" | ||
auto-validate | ||
on-value-changed="${e => set(e.target.value)}" ></paper-input>`; | ||
}; | ||
} | ||
|
||
export function dropdown({ | ||
items = [], | ||
} = {}) { | ||
return async (f, id, v, set) => { | ||
function setValue(e) { | ||
e.target.validate(); | ||
return set(e.target.querySelector('paper-listbox').selected); | ||
} | ||
|
||
let options = items; | ||
if (typeof items === 'function') { | ||
options = await items(f); | ||
} | ||
|
||
return html`<paper-dropdown-menu label="${f.title}" | ||
no-animations?="${!window.KeyframeEffect}" | ||
on-value-changed="${setValue}" | ||
required?="${f.required}"> | ||
<paper-listbox slot="dropdown-content" attr-for-selected="value" selected="${v}"> | ||
${repeat(options, option => | ||
html`<paper-item value="${option.value}">${option.label}</paper-item>`)} | ||
</paper-listbox> | ||
</paper-dropdown-menu>`; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"name": "@lit-any/components-paper-elements", | ||
"version": "0.6.0-a3.0", | ||
"main": "index.js", | ||
"license": "MIT", | ||
"peerDependencies": { | ||
"lit-any": "^0.6.0-a3.0", | ||
"lit-html": "^0.10.2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import { html } from 'lit-html/lib/lit-extended'; | ||
import { repeat } from 'lit-html/lib/repeat'; | ||
|
||
export function textbox({ | ||
type = 'single line', | ||
} = { }) { | ||
return (f, id, v, set) => { | ||
if (type === 'multi line') { | ||
return html`<vaadin-text-area | ||
label="${f.title}" | ||
type="${type}" | ||
value="${v}" | ||
required?="${f.required}" | ||
auto-validate | ||
on-value-changed="${e => set(e.target.value)}" ></vaadin-text-area>`; | ||
} | ||
|
||
return html`<vaadin-text-field | ||
label="${f.title}" | ||
type="${type}" | ||
value="${v}" | ||
required?="${f.required}" | ||
auto-validate | ||
on-value-changed="${e => set(e.target.value)}"></vaadin-text-field>`; | ||
}; | ||
} | ||
|
||
export function dropdown({ | ||
items = [], | ||
} = {}) { | ||
return async (f, id, v, set) => { | ||
let options = items; | ||
if (typeof items === 'function') { | ||
options = await items(f); | ||
} | ||
|
||
return html`<vaadin-dropdown-menu label="${f.title}" | ||
on-value-changed="${e => set(e.target.value)}" | ||
required?="${f.required}" | ||
value="${v}"> | ||
<template> | ||
<vaadin-list-box> | ||
${repeat(options, option => `<vaadin-item value$="${option.value}" label$="${option.label}"></vaadin-item>`)} | ||
</vaadin-list-box> | ||
</template> | ||
</vaadin-dropdown-menu>`; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"name": "@lit-any/components-vaadin", | ||
"version": "0.6.0-a3.0", | ||
"main": "index.js", | ||
"license": "MIT", | ||
"peerDependencies": { | ||
"lit-any": "^0.6.0-a3.0", | ||
"lit-html": "^0.11.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"lerna": "2.11.0", | ||
"useWorkspaces": true, | ||
"version": "0.6.0-a3.0", | ||
"npmClient": "yarn" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
export function textbox(options) { | ||
return { | ||
name: 'textbox', | ||
options, | ||
}; | ||
} | ||
|
||
export function dropdown(options) { | ||
return { | ||
name: 'dropdown', | ||
options, | ||
}; | ||
} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"name": "lit-any", | ||
"main": "src/index.js", | ||
"module": "src/index.js", | ||
"version": "0.6.0-a3.0", | ||
"dependencies": { | ||
"@polymer/lit-element": "^0.5.2", | ||
"@polymer/polymer": "^3.0.0-pre.11", | ||
"core-js": "^2.5.1", | ||
"lit-html": "^0.10.2" | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
{ | ||
"root": false, | ||
"rules": { | ||
"import/no-extraneous-dependencies": false | ||
"import/no-extraneous-dependencies": false, | ||
"import/first": false | ||
} | ||
} |
Oops, something went wrong.