UNPKG

i18n-behavior

Version:

Instant and Modular I18N engine for lit-html and Polymer

1,191 lines (990 loc) 86.2 kB
<html lang="en" preferred=""><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes"><script src="../../../webcomponentsjs/webcomponents.min.js"></script><script src="../../../wct-browser-legacy/browser.js"></script><style> .test-container.running-test { display: block; } .test-container:not(.running-test) { display: none; } </style></head><body><div hidden="" by-vulcanize=""><dom-module id="i18n-number" assetpath="../../../i18n-number/"><template strip-whitespace=""><span id="number"></span></template></dom-module><dom-module id="i18n-format" assetpath="../../../i18n-format/"><template></template></dom-module><dom-module id="iron-localstorage" assetpath="../../../iron-localstorage/"></dom-module><dom-module id="i18n-preference" assetpath="../../"><template><iron-localstorage id="storage" name="i18n-behavior-preference"></iron-localstorage></template></dom-module><dom-module id="i18n-attr-repo" assetpath="../../"><template><template id="standard"><input placeholder="" value="type=button|submit"><any-elements title="" aria-label="$" aria-valuetext="$"></any-elements><paper-input label="" error-message="" placeholder=""></paper-input><paper-textarea label="" error-message="" placeholder=""></paper-textarea><paper-dropdown-menu label=""></paper-dropdown-menu><paper-toast text=""></paper-toast><paper-badge label=""></paper-badge><google-chart options="" cols="" rows="" data=""></google-chart><google-signin label-signin="" label-signout="" label-additional=""></google-signin><platinum-push-messaging title="" message=""></platinum-push-messaging><json-data any-attributes=""></json-data></template></template></dom-module><dom-module id="simple-text-element" assetpath="simple-text-element/"><template localizable-text="embedded">{{text.text}}<div><div></div></div><span id="whitespace">&nbsp;</span><h1>{{text.h1_3}}</h1>{{text.text_4}}<span>{{text.span_5}}</span> <span>{{text.span_6}}</span> <span id="label-1">{{text.label-1}}</span> <span id="label-2">{{text.label-2}}</span><div><span>{{text.div_9:span}}</span> <span>{{text.div_9:span_1}}</span><div><div>{{text.div_9:div_2:div}}</div></div></div><div>{{text.div_10:text}}<span>{{text.div_10:span_1}}</span>{{text.div_10:text_2}}<span>{{text.div_10:span_3}}</span><div><div>{{text.div_10:div_4:div}}</div></div>{{text.div_10:text_5}}</div><div id="toplevel-div"><span>{{text.toplevel-div:span}}</span> <span>{{text.toplevel-div:span_1}}</span><div id="second-level-div"><div id="third-level-div">{{text.third-level-div}}</div><div>{{text.second-level-div:div_1}}</div></div></div><div><ul><li>{{text.div_12:ul:li}}</li><li>{{text.div_12:ul:li_1}}</li><li>{{text.div_12:ul:li_2}}</li></ul><ul id="line-items"><li>{{text.line-items:li}}</li><li>{{text.line-items:li_1}}</li><li>{{text.line-items:li_2}}</li></ul></div><p><i18n-format lang="{{effectiveLang}}"><span>{{text.p_13.0}}</span><b param="1">{{text.p_13.1}}</b><code param="2">{{text.p_13.2}}</code></i18n-format></p><p id="paragraph"><i18n-format lang="{{effectiveLang}}"><span>{{text.paragraph.0}}</span><b param="1">{{text.paragraph.1}}</b><code param="2">{{text.paragraph.2}}</code></i18n-format></p>{{text.text_15}}<template id="localizable-text"><json-data>{ "meta": {}, "model": {}, "text": " outermost text at the beginning ", "h1_3": "outermost header 1", "text_4": " outermost text in the middle ", "span_5": "simple text without id", "span_6": "simple text without id 2", "label-1": "simple text with id", "label-2": "simple text with id 2", "div_9:span": "simple text within div", "div_9:span_1": "simple text within div 2", "div_9:div_2:div": "great grandchild text within div", "div_10:text": " simple text as the first element in div ", "div_10:span_1": "simple text within div", "div_10:text_2": " simple text in the middle of div ", "div_10:span_3": "simple text within div 2", "div_10:div_4:div": "great grandchild text within div", "div_10:text_5": " simple text at the last element in div ", "toplevel-div:span": "simple text within div", "toplevel-div:span_1": "simple text within div 2", "third-level-div": "great grandchild text within div", "second-level-div:div_1": "great grandchild text within div without id", "div_12:ul:li": "line item without id 1", "div_12:ul:li_1": "line item without id 2", "div_12:ul:li_2": "line item without id 3", "line-items:li": "line item with id 1", "line-items:li_1": "line item with id 2", "line-items:li_2": "line item with id 3", "p_13": [ "A paragraph with {1} is converted to {2}.", "parameters", "&lt;i18n-format&gt;" ], "paragraph": [ "A paragraph with {1} is converted to {2}.", "id", "&lt;i18n-format&gt;" ], "text_15": " outermost text at the end " }</json-data></template></template></dom-module><dom-module id="commented-simple-text-element" assetpath="commented-simple-text-element/"><template localizable-text="embedded">{{text.text}}<div><div></div></div><span id="whitespace">&nbsp;</span><h1>{{text.h1_3}}</h1>{{text.text_4}} <span>{{text.span_5}}</span> <span>{{text.span_6}}</span> <span id="label-1">{{text.label-1}}</span> <span id="label-2">{{text.label-2}}</span><div><span>{{text.div_9:span}}</span> <span>{{text.div_9:span_1}}</span><div><div>{{text.div_9:div_2:div}}</div></div></div><div>{{text.div_10:text}} <span>{{text.div_10:span_1}}</span>{{text.div_10:text_2}} <span>{{text.div_10:span_3}}</span><div><div>{{text.div_10:div_4:div}}</div></div>{{text.div_10:text_5}}</div><div id="toplevel-div"><span>{{text.toplevel-div:span}}</span> <span>{{text.toplevel-div:span_1}}</span><div id="second-level-div"><div id="third-level-div">{{text.third-level-div}}</div><div>{{text.second-level-div:div_1}}</div></div></div><div><ul><li>{{text.div_12:ul:li}}</li><li>{{text.div_12:ul:li_1}}</li><li>{{text.div_12:ul:li_2}}</li></ul><ul id="line-items"><li>{{text.line-items:li}}</li><li>{{text.line-items:li_1}}</li><li>{{text.line-items:li_2}}</li></ul></div><p><i18n-format lang="{{effectiveLang}}"><span>{{text.p_13.0}}</span><b param="1">{{text.p_13.1}}</b><code param="2">{{text.p_13.2}}</code></i18n-format></p><p id="paragraph"><i18n-format lang="{{effectiveLang}}"><span>{{text.paragraph.0}}</span><b param="1">{{text.paragraph.1}}</b><code param="2">{{text.paragraph.2}}</code></i18n-format></p>{{text.text_15}}<template id="localizable-text"><json-data>{ "meta": {}, "model": {}, "text": " outermost text at the beginning ", "h1_3": "outermost header 1", "text_4": " outermost text in the middle ", "span_5": "simple text without id", "span_6": "simple text without id 2", "label-1": "simple text with id", "label-2": "simple text with id 2", "div_9:span": "simple text within div", "div_9:span_1": "simple text within div 2", "div_9:div_2:div": "great grandchild text within div", "div_10:text": " simple text as the first element in div ", "div_10:span_1": "simple text within div", "div_10:text_2": " simple text in the middle of div ", "div_10:span_3": "simple text within div 2", "div_10:div_4:div": "great grandchild text within div", "div_10:text_5": " simple text at the last element in div ", "toplevel-div:span": "simple text within div", "toplevel-div:span_1": "simple text within div 2", "third-level-div": "great grandchild text within div", "second-level-div:div_1": "great grandchild text within div without id", "div_12:ul:li": "line item without id 1", "div_12:ul:li_1": "line item without id 2", "div_12:ul:li_2": "line item without id 3", "line-items:li": "line item with id 1", "line-items:li_1": "line item with id 2", "line-items:li_2": "line item with id 3", "p_13": [ "A paragraph with {1} is converted to {2}.", "parameters", "&lt;i18n-format&gt;" ], "paragraph": [ "A paragraph with {1} is converted to {2}.", "id", "&lt;i18n-format&gt;" ], "text_15": " outermost text at the end " }</json-data></template></template></dom-module><dom-module id="plural-gender-element" assetpath="plural-gender-element/"><template localizable-text="embedded"><p><i18n-format id="compound-format-text" lang="{{effectiveLang}}"><json-data>{{serialize(text.compound-format-text.0)}}</json-data><i18n-number offset="1" param="1" lang="{{effectiveLang}}">{{recipients.length}}</i18n-number><span param="2">{{recipients.0.gender}}</span> <span param="3">{{sender.name}}</span> <span param="4">{{recipients.0.name}}</span> <span param="5">{{text.compound-format-text.5}}</span></i18n-format></p><template id="localizable-text"><json-data>{ "meta": {}, "model": {}, "compound-format-text": [ { "0": "You ({3}) gave no gifts.", "1": { "male": "You ({3}) gave him ({4}) {5}.", "female": "You ({3}) gave her ({4}) {5}.", "other": "You ({3}) gave them ({4}) {5}." }, "one": { "male": "You ({3}) gave him ({4}) and one other person {5}.", "female": "You ({3}) gave her ({4}) and one other person {5}.", "other": "You ({3}) gave them ({4}) and one other person {5}." }, "other": "You ({3}) gave them ({4}) and {1} other people gifts." }, "{{recipients.length - 1}}", "{{recipients.0.gender}}", "{{sender.name}}", "{{recipients.0.name}}", "a gift" ] }</json-data></template></template></dom-module><dom-module id="iron-a11y-announcer" assetpath="../../../iron-a11y-announcer/"><template><style> :host { display: inline-block; position: fixed; clip: rect(0px,0px,0px,0px); } </style><div aria-live$="[[mode]]">[[_text]]</div></template></dom-module><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:400,300,300italic,400italic,500,500italic,700,700italic"><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto+Mono:400,700"><style is="custom-style"> :root { /* Shared Styles */ --paper-font-common-base: { font-family: 'Roboto', 'Noto', sans-serif; -webkit-font-smoothing: antialiased; }; --paper-font-common-code: { font-family: 'Roboto Mono', 'Consolas', 'Menlo', monospace; -webkit-font-smoothing: antialiased; }; --paper-font-common-expensive-kerning: { text-rendering: optimizeLegibility; }; --paper-font-common-nowrap: { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }; /* Material Font Styles */ --paper-font-display4: { @apply(--paper-font-common-base); @apply(--paper-font-common-nowrap); font-size: 112px; font-weight: 300; letter-spacing: -.044em; line-height: 120px; }; --paper-font-display3: { @apply(--paper-font-common-base); @apply(--paper-font-common-nowrap); font-size: 56px; font-weight: 400; letter-spacing: -.026em; line-height: 60px; }; --paper-font-display2: { @apply(--paper-font-common-base); font-size: 45px; font-weight: 400; letter-spacing: -.018em; line-height: 48px; }; --paper-font-display1: { @apply(--paper-font-common-base); font-size: 34px; font-weight: 400; letter-spacing: -.01em; line-height: 40px; }; --paper-font-headline: { @apply(--paper-font-common-base); font-size: 24px; font-weight: 400; letter-spacing: -.012em; line-height: 32px; }; --paper-font-title: { @apply(--paper-font-common-base); @apply(--paper-font-common-nowrap); font-size: 20px; font-weight: 500; line-height: 28px; }; --paper-font-subhead: { @apply(--paper-font-common-base); font-size: 16px; font-weight: 400; line-height: 24px; }; --paper-font-body2: { @apply(--paper-font-common-base); font-size: 14px; font-weight: 500; line-height: 24px; }; --paper-font-body1: { @apply(--paper-font-common-base); font-size: 14px; font-weight: 400; line-height: 20px; }; --paper-font-caption: { @apply(--paper-font-common-base); @apply(--paper-font-common-nowrap); font-size: 12px; font-weight: 400; letter-spacing: 0.011em; line-height: 20px; }; --paper-font-menu: { @apply(--paper-font-common-base); @apply(--paper-font-common-nowrap); font-size: 13px; font-weight: 500; line-height: 24px; }; --paper-font-button: { @apply(--paper-font-common-base); @apply(--paper-font-common-nowrap); font-size: 14px; font-weight: 500; letter-spacing: 0.018em; line-height: 24px; text-transform: uppercase; }; --paper-font-code2: { @apply(--paper-font-common-code); font-size: 14px; font-weight: 700; line-height: 20px; }; --paper-font-code1: { @apply(--paper-font-common-code); font-size: 14px; font-weight: 500; line-height: 20px; }; } </style><dom-module id="paper-input-char-counter" assetpath="../../../paper-input/"><template><style> :host { display: inline-block; float: right; @apply(--paper-font-caption); @apply(--paper-input-char-counter); } :host([hidden]) { display: none !important; } :host-context([dir="rtl"]) { float: left; } </style><span>[[_charCounterStr]]</span></template></dom-module><style> /* IE 10 support for HTML5 hidden attr */ [hidden] { display: none !important; } </style><style is="custom-style"> :root { --layout: { display: -ms-flexbox; display: -webkit-flex; display: flex; }; --layout-inline: { display: -ms-inline-flexbox; display: -webkit-inline-flex; display: inline-flex; }; --layout-horizontal: { @apply(--layout); -ms-flex-direction: row; -webkit-flex-direction: row; flex-direction: row; }; --layout-horizontal-reverse: { @apply(--layout); -ms-flex-direction: row-reverse; -webkit-flex-direction: row-reverse; flex-direction: row-reverse; }; --layout-vertical: { @apply(--layout); -ms-flex-direction: column; -webkit-flex-direction: column; flex-direction: column; }; --layout-vertical-reverse: { @apply(--layout); -ms-flex-direction: column-reverse; -webkit-flex-direction: column-reverse; flex-direction: column-reverse; }; --layout-wrap: { -ms-flex-wrap: wrap; -webkit-flex-wrap: wrap; flex-wrap: wrap; }; --layout-wrap-reverse: { -ms-flex-wrap: wrap-reverse; -webkit-flex-wrap: wrap-reverse; flex-wrap: wrap-reverse; }; --layout-flex-auto: { -ms-flex: 1 1 auto; -webkit-flex: 1 1 auto; flex: 1 1 auto; }; --layout-flex-none: { -ms-flex: none; -webkit-flex: none; flex: none; }; --layout-flex: { -ms-flex: 1 1 0.000000001px; -webkit-flex: 1; flex: 1; -webkit-flex-basis: 0.000000001px; flex-basis: 0.000000001px; }; --layout-flex-2: { -ms-flex: 2; -webkit-flex: 2; flex: 2; }; --layout-flex-3: { -ms-flex: 3; -webkit-flex: 3; flex: 3; }; --layout-flex-4: { -ms-flex: 4; -webkit-flex: 4; flex: 4; }; --layout-flex-5: { -ms-flex: 5; -webkit-flex: 5; flex: 5; }; --layout-flex-6: { -ms-flex: 6; -webkit-flex: 6; flex: 6; }; --layout-flex-7: { -ms-flex: 7; -webkit-flex: 7; flex: 7; }; --layout-flex-8: { -ms-flex: 8; -webkit-flex: 8; flex: 8; }; --layout-flex-9: { -ms-flex: 9; -webkit-flex: 9; flex: 9; }; --layout-flex-10: { -ms-flex: 10; -webkit-flex: 10; flex: 10; }; --layout-flex-11: { -ms-flex: 11; -webkit-flex: 11; flex: 11; }; --layout-flex-12: { -ms-flex: 12; -webkit-flex: 12; flex: 12; }; /* alignment in cross axis */ --layout-start: { -ms-flex-align: start; -webkit-align-items: flex-start; align-items: flex-start; }; --layout-center: { -ms-flex-align: center; -webkit-align-items: center; align-items: center; }; --layout-end: { -ms-flex-align: end; -webkit-align-items: flex-end; align-items: flex-end; }; --layout-baseline: { -ms-flex-align: baseline; -webkit-align-items: baseline; align-items: baseline; }; /* alignment in main axis */ --layout-start-justified: { -ms-flex-pack: start; -webkit-justify-content: flex-start; justify-content: flex-start; }; --layout-center-justified: { -ms-flex-pack: center; -webkit-justify-content: center; justify-content: center; }; --layout-end-justified: { -ms-flex-pack: end; -webkit-justify-content: flex-end; justify-content: flex-end; }; --layout-around-justified: { -ms-flex-pack: distribute; -webkit-justify-content: space-around; justify-content: space-around; }; --layout-justified: { -ms-flex-pack: justify; -webkit-justify-content: space-between; justify-content: space-between; }; --layout-center-center: { @apply(--layout-center); @apply(--layout-center-justified); }; /* self alignment */ --layout-self-start: { -ms-align-self: flex-start; -webkit-align-self: flex-start; align-self: flex-start; }; --layout-self-center: { -ms-align-self: center; -webkit-align-self: center; align-self: center; }; --layout-self-end: { -ms-align-self: flex-end; -webkit-align-self: flex-end; align-self: flex-end; }; --layout-self-stretch: { -ms-align-self: stretch; -webkit-align-self: stretch; align-self: stretch; }; --layout-self-baseline: { -ms-align-self: baseline; -webkit-align-self: baseline; align-self: baseline; }; /* multi-line alignment in main axis */ --layout-start-aligned: { -ms-flex-line-pack: start; /* IE10 */ -ms-align-content: flex-start; -webkit-align-content: flex-start; align-content: flex-start; }; --layout-end-aligned: { -ms-flex-line-pack: end; /* IE10 */ -ms-align-content: flex-end; -webkit-align-content: flex-end; align-content: flex-end; }; --layout-center-aligned: { -ms-flex-line-pack: center; /* IE10 */ -ms-align-content: center; -webkit-align-content: center; align-content: center; }; --layout-between-aligned: { -ms-flex-line-pack: justify; /* IE10 */ -ms-align-content: space-between; -webkit-align-content: space-between; align-content: space-between; }; --layout-around-aligned: { -ms-flex-line-pack: distribute; /* IE10 */ -ms-align-content: space-around; -webkit-align-content: space-around; align-content: space-around; }; /******************************* Other Layout *******************************/ --layout-block: { display: block; }; --layout-invisible: { visibility: hidden !important; }; --layout-relative: { position: relative; }; --layout-fit: { position: absolute; top: 0; right: 0; bottom: 0; left: 0; }; --layout-scroll: { -webkit-overflow-scrolling: touch; overflow: auto; }; --layout-fullbleed: { margin: 0; height: 100vh; }; /* fixed position */ --layout-fixed-top: { position: fixed; top: 0; left: 0; right: 0; }; --layout-fixed-right: { position: fixed; top: 0; right: 0; bottom: 0; }; --layout-fixed-bottom: { position: fixed; right: 0; bottom: 0; left: 0; }; --layout-fixed-left: { position: fixed; top: 0; bottom: 0; left: 0; }; } </style><style is="custom-style"> :root { /* Material Design color palette for Google products */ --google-red-100: #f4c7c3; --google-red-300: #e67c73; --google-red-500: #db4437; --google-red-700: #c53929; --google-blue-100: #c6dafc; --google-blue-300: #7baaf7; --google-blue-500: #4285f4; --google-blue-700: #3367d6; --google-green-100: #b7e1cd; --google-green-300: #57bb8a; --google-green-500: #0f9d58; --google-green-700: #0b8043; --google-yellow-100: #fce8b2; --google-yellow-300: #f7cb4d; --google-yellow-500: #f4b400; --google-yellow-700: #f09300; --google-grey-100: #f5f5f5; --google-grey-300: #e0e0e0; --google-grey-500: #9e9e9e; --google-grey-700: #616161; /* Material Design color palette from online spec document */ --paper-red-50: #ffebee; --paper-red-100: #ffcdd2; --paper-red-200: #ef9a9a; --paper-red-300: #e57373; --paper-red-400: #ef5350; --paper-red-500: #f44336; --paper-red-600: #e53935; --paper-red-700: #d32f2f; --paper-red-800: #c62828; --paper-red-900: #b71c1c; --paper-red-a100: #ff8a80; --paper-red-a200: #ff5252; --paper-red-a400: #ff1744; --paper-red-a700: #d50000; --paper-pink-50: #fce4ec; --paper-pink-100: #f8bbd0; --paper-pink-200: #f48fb1; --paper-pink-300: #f06292; --paper-pink-400: #ec407a; --paper-pink-500: #e91e63; --paper-pink-600: #d81b60; --paper-pink-700: #c2185b; --paper-pink-800: #ad1457; --paper-pink-900: #880e4f; --paper-pink-a100: #ff80ab; --paper-pink-a200: #ff4081; --paper-pink-a400: #f50057; --paper-pink-a700: #c51162; --paper-purple-50: #f3e5f5; --paper-purple-100: #e1bee7; --paper-purple-200: #ce93d8; --paper-purple-300: #ba68c8; --paper-purple-400: #ab47bc; --paper-purple-500: #9c27b0; --paper-purple-600: #8e24aa; --paper-purple-700: #7b1fa2; --paper-purple-800: #6a1b9a; --paper-purple-900: #4a148c; --paper-purple-a100: #ea80fc; --paper-purple-a200: #e040fb; --paper-purple-a400: #d500f9; --paper-purple-a700: #aa00ff; --paper-deep-purple-50: #ede7f6; --paper-deep-purple-100: #d1c4e9; --paper-deep-purple-200: #b39ddb; --paper-deep-purple-300: #9575cd; --paper-deep-purple-400: #7e57c2; --paper-deep-purple-500: #673ab7; --paper-deep-purple-600: #5e35b1; --paper-deep-purple-700: #512da8; --paper-deep-purple-800: #4527a0; --paper-deep-purple-900: #311b92; --paper-deep-purple-a100: #b388ff; --paper-deep-purple-a200: #7c4dff; --paper-deep-purple-a400: #651fff; --paper-deep-purple-a700: #6200ea; --paper-indigo-50: #e8eaf6; --paper-indigo-100: #c5cae9; --paper-indigo-200: #9fa8da; --paper-indigo-300: #7986cb; --paper-indigo-400: #5c6bc0; --paper-indigo-500: #3f51b5; --paper-indigo-600: #3949ab; --paper-indigo-700: #303f9f; --paper-indigo-800: #283593; --paper-indigo-900: #1a237e; --paper-indigo-a100: #8c9eff; --paper-indigo-a200: #536dfe; --paper-indigo-a400: #3d5afe; --paper-indigo-a700: #304ffe; --paper-blue-50: #e3f2fd; --paper-blue-100: #bbdefb; --paper-blue-200: #90caf9; --paper-blue-300: #64b5f6; --paper-blue-400: #42a5f5; --paper-blue-500: #2196f3; --paper-blue-600: #1e88e5; --paper-blue-700: #1976d2; --paper-blue-800: #1565c0; --paper-blue-900: #0d47a1; --paper-blue-a100: #82b1ff; --paper-blue-a200: #448aff; --paper-blue-a400: #2979ff; --paper-blue-a700: #2962ff; --paper-light-blue-50: #e1f5fe; --paper-light-blue-100: #b3e5fc; --paper-light-blue-200: #81d4fa; --paper-light-blue-300: #4fc3f7; --paper-light-blue-400: #29b6f6; --paper-light-blue-500: #03a9f4; --paper-light-blue-600: #039be5; --paper-light-blue-700: #0288d1; --paper-light-blue-800: #0277bd; --paper-light-blue-900: #01579b; --paper-light-blue-a100: #80d8ff; --paper-light-blue-a200: #40c4ff; --paper-light-blue-a400: #00b0ff; --paper-light-blue-a700: #0091ea; --paper-cyan-50: #e0f7fa; --paper-cyan-100: #b2ebf2; --paper-cyan-200: #80deea; --paper-cyan-300: #4dd0e1; --paper-cyan-400: #26c6da; --paper-cyan-500: #00bcd4; --paper-cyan-600: #00acc1; --paper-cyan-700: #0097a7; --paper-cyan-800: #00838f; --paper-cyan-900: #006064; --paper-cyan-a100: #84ffff; --paper-cyan-a200: #18ffff; --paper-cyan-a400: #00e5ff; --paper-cyan-a700: #00b8d4; --paper-teal-50: #e0f2f1; --paper-teal-100: #b2dfdb; --paper-teal-200: #80cbc4; --paper-teal-300: #4db6ac; --paper-teal-400: #26a69a; --paper-teal-500: #009688; --paper-teal-600: #00897b; --paper-teal-700: #00796b; --paper-teal-800: #00695c; --paper-teal-900: #004d40; --paper-teal-a100: #a7ffeb; --paper-teal-a200: #64ffda; --paper-teal-a400: #1de9b6; --paper-teal-a700: #00bfa5; --paper-green-50: #e8f5e9; --paper-green-100: #c8e6c9; --paper-green-200: #a5d6a7; --paper-green-300: #81c784; --paper-green-400: #66bb6a; --paper-green-500: #4caf50; --paper-green-600: #43a047; --paper-green-700: #388e3c; --paper-green-800: #2e7d32; --paper-green-900: #1b5e20; --paper-green-a100: #b9f6ca; --paper-green-a200: #69f0ae; --paper-green-a400: #00e676; --paper-green-a700: #00c853; --paper-light-green-50: #f1f8e9; --paper-light-green-100: #dcedc8; --paper-light-green-200: #c5e1a5; --paper-light-green-300: #aed581; --paper-light-green-400: #9ccc65; --paper-light-green-500: #8bc34a; --paper-light-green-600: #7cb342; --paper-light-green-700: #689f38; --paper-light-green-800: #558b2f; --paper-light-green-900: #33691e; --paper-light-green-a100: #ccff90; --paper-light-green-a200: #b2ff59; --paper-light-green-a400: #76ff03; --paper-light-green-a700: #64dd17; --paper-lime-50: #f9fbe7; --paper-lime-100: #f0f4c3; --paper-lime-200: #e6ee9c; --paper-lime-300: #dce775; --paper-lime-400: #d4e157; --paper-lime-500: #cddc39; --paper-lime-600: #c0ca33; --paper-lime-700: #afb42b; --paper-lime-800: #9e9d24; --paper-lime-900: #827717; --paper-lime-a100: #f4ff81; --paper-lime-a200: #eeff41; --paper-lime-a400: #c6ff00; --paper-lime-a700: #aeea00; --paper-yellow-50: #fffde7; --paper-yellow-100: #fff9c4; --paper-yellow-200: #fff59d; --paper-yellow-300: #fff176; --paper-yellow-400: #ffee58; --paper-yellow-500: #ffeb3b; --paper-yellow-600: #fdd835; --paper-yellow-700: #fbc02d; --paper-yellow-800: #f9a825; --paper-yellow-900: #f57f17; --paper-yellow-a100: #ffff8d; --paper-yellow-a200: #ffff00; --paper-yellow-a400: #ffea00; --paper-yellow-a700: #ffd600; --paper-amber-50: #fff8e1; --paper-amber-100: #ffecb3; --paper-amber-200: #ffe082; --paper-amber-300: #ffd54f; --paper-amber-400: #ffca28; --paper-amber-500: #ffc107; --paper-amber-600: #ffb300; --paper-amber-700: #ffa000; --paper-amber-800: #ff8f00; --paper-amber-900: #ff6f00; --paper-amber-a100: #ffe57f; --paper-amber-a200: #ffd740; --paper-amber-a400: #ffc400; --paper-amber-a700: #ffab00; --paper-orange-50: #fff3e0; --paper-orange-100: #ffe0b2; --paper-orange-200: #ffcc80; --paper-orange-300: #ffb74d; --paper-orange-400: #ffa726; --paper-orange-500: #ff9800; --paper-orange-600: #fb8c00; --paper-orange-700: #f57c00; --paper-orange-800: #ef6c00; --paper-orange-900: #e65100; --paper-orange-a100: #ffd180; --paper-orange-a200: #ffab40; --paper-orange-a400: #ff9100; --paper-orange-a700: #ff6500; --paper-deep-orange-50: #fbe9e7; --paper-deep-orange-100: #ffccbc; --paper-deep-orange-200: #ffab91; --paper-deep-orange-300: #ff8a65; --paper-deep-orange-400: #ff7043; --paper-deep-orange-500: #ff5722; --paper-deep-orange-600: #f4511e; --paper-deep-orange-700: #e64a19; --paper-deep-orange-800: #d84315; --paper-deep-orange-900: #bf360c; --paper-deep-orange-a100: #ff9e80; --paper-deep-orange-a200: #ff6e40; --paper-deep-orange-a400: #ff3d00; --paper-deep-orange-a700: #dd2c00; --paper-brown-50: #efebe9; --paper-brown-100: #d7ccc8; --paper-brown-200: #bcaaa4; --paper-brown-300: #a1887f; --paper-brown-400: #8d6e63; --paper-brown-500: #795548; --paper-brown-600: #6d4c41; --paper-brown-700: #5d4037; --paper-brown-800: #4e342e; --paper-brown-900: #3e2723; --paper-grey-50: #fafafa; --paper-grey-100: #f5f5f5; --paper-grey-200: #eeeeee; --paper-grey-300: #e0e0e0; --paper-grey-400: #bdbdbd; --paper-grey-500: #9e9e9e; --paper-grey-600: #757575; --paper-grey-700: #616161; --paper-grey-800: #424242; --paper-grey-900: #212121; --paper-blue-grey-50: #eceff1; --paper-blue-grey-100: #cfd8dc; --paper-blue-grey-200: #b0bec5; --paper-blue-grey-300: #90a4ae; --paper-blue-grey-400: #78909c; --paper-blue-grey-500: #607d8b; --paper-blue-grey-600: #546e7a; --paper-blue-grey-700: #455a64; --paper-blue-grey-800: #37474f; --paper-blue-grey-900: #263238; /* opacity for dark text on a light background */ --dark-divider-opacity: 0.12; --dark-disabled-opacity: 0.38; /* or hint text or icon */ --dark-secondary-opacity: 0.54; --dark-primary-opacity: 0.87; /* opacity for light text on a dark background */ --light-divider-opacity: 0.12; --light-disabled-opacity: 0.3; /* or hint text or icon */ --light-secondary-opacity: 0.7; --light-primary-opacity: 1.0; } </style><style is="custom-style"> :root { /* * You can use these generic variables in your elements for easy theming. * For example, if all your elements use `--primary-text-color` as its main * color, then switching from a light to a dark theme is just a matter of * changing the value of `--primary-text-color` in your application. */ --primary-text-color: var(--light-theme-text-color); --primary-background-color: var(--light-theme-background-color); --secondary-text-color: var(--light-theme-secondary-color); --disabled-text-color: var(--light-theme-disabled-color); --divider-color: var(--light-theme-divider-color); --error-color: var(--paper-deep-orange-a700); /* * Primary and accent colors. Also see color.html for more colors. */ --primary-color: var(--paper-indigo-500); --light-primary-color: var(--paper-indigo-100); --dark-primary-color: var(--paper-indigo-700); --accent-color: var(--paper-pink-a200); --light-accent-color: var(--paper-pink-a100); --dark-accent-color: var(--paper-pink-a400); /* * Material Design Light background theme */ --light-theme-background-color: #ffffff; --light-theme-base-color: #000000; --light-theme-text-color: var(--paper-grey-900); --light-theme-secondary-color: #737373; /* for secondary text and icons */ --light-theme-disabled-color: #9b9b9b; /* disabled/hint text */ --light-theme-divider-color: #dbdbdb; /* * Material Design Dark background theme */ --dark-theme-background-color: var(--paper-grey-900); --dark-theme-base-color: #ffffff; --dark-theme-text-color: #ffffff; --dark-theme-secondary-color: #bcbcbc; /* for secondary text and icons */ --dark-theme-disabled-color: #646464; /* disabled/hint text */ --dark-theme-divider-color: #3c3c3c; /* * Deprecated values because of their confusing names. */ --text-primary-color: var(--dark-theme-text-color); --default-primary-color: var(--primary-color); } </style><dom-module id="paper-input-container" assetpath="../../../paper-input/"><template><style> :host { display: block; padding: 8px 0; @apply(--paper-input-container); } :host([inline]) { display: inline-block; } :host([disabled]) { pointer-events: none; opacity: 0.33; @apply(--paper-input-container-disabled); } :host([hidden]) { display: none !important; } .floated-label-placeholder { @apply(--paper-font-caption); } .underline { position: relative; } .focused-line { @apply(--layout-fit); background: var(--paper-input-container-focus-color, --primary-color); height: 2px; -webkit-transform-origin: center center; transform-origin: center center; -webkit-transform: scale3d(0,1,1); transform: scale3d(0,1,1); @apply(--paper-input-container-underline-focus); } .underline.is-highlighted .focused-line { -webkit-transform: none; transform: none; -webkit-transition: -webkit-transform 0.25s; transition: transform 0.25s; @apply(--paper-transition-easing); } .underline.is-invalid .focused-line { background: var(--paper-input-container-invalid-color, --error-color); -webkit-transform: none; transform: none; -webkit-transition: -webkit-transform 0.25s; transition: transform 0.25s; @apply(--paper-transition-easing); } .unfocused-line { @apply(--layout-fit); background: var(--paper-input-container-color, --secondary-text-color); height: 1px; @apply(--paper-input-container-underline); } :host([disabled]) .unfocused-line { border-bottom: 1px dashed; border-color: var(--paper-input-container-color, --secondary-text-color); background: transparent; @apply(--paper-input-container-underline-disabled); } .label-and-input-container { @apply(--layout-flex-auto); @apply(--layout-relative); width: 100%; max-width: 100%; } .input-content { @apply(--layout-horizontal); @apply(--layout-center); position: relative; } .input-content ::content label, .input-content ::content .paper-input-label { position: absolute; top: 0; right: 0; left: 0; width: 100%; font: inherit; color: var(--paper-input-container-color, --secondary-text-color); -webkit-transition: -webkit-transform 0.25s, width 0.25s; transition: transform 0.25s, width 0.25s; -webkit-transform-origin: left top; transform-origin: left top; @apply(--paper-font-common-nowrap); @apply(--paper-font-subhead); @apply(--paper-input-container-label); @apply(--paper-transition-easing); } .input-content.label-is-floating ::content label, .input-content.label-is-floating ::content .paper-input-label { -webkit-transform: translateY(-75%) scale(0.75); transform: translateY(-75%) scale(0.75); /* Since we scale to 75/100 of the size, we actually have 100/75 of the original space now available */ width: 133%; @apply(--paper-input-container-label-floating); } :host-context([dir="rtl"]) .input-content.label-is-floating ::content label, :host-context([dir="rtl"]) .input-content.label-is-floating ::content .paper-input-label { /* TODO(noms): Figure out why leaving the width at 133% before the animation * actually makes * it wider on the right side, not left side, as you would expect in RTL */ width: 100%; -webkit-transform-origin: right top; transform-origin: right top; } .input-content.label-is-highlighted ::content label, .input-content.label-is-highlighted ::content .paper-input-label { color: var(--paper-input-container-focus-color, --primary-color); @apply(--paper-input-container-label-focus); } .input-content.is-invalid ::content label, .input-content.is-invalid ::content .paper-input-label { color: var(--paper-input-container-invalid-color, --error-color); } .input-content.label-is-hidden ::content label, .input-content.label-is-hidden ::content .paper-input-label { visibility: hidden; } .input-content ::content input, .input-content ::content textarea, .input-content ::content iron-autogrow-textarea, .input-content ::content .paper-input-input { position: relative; /* to make a stacking context */ outline: none; box-shadow: none; padding: 0; width: 100%; max-width: 100%; background: transparent; border: none; color: var(--paper-input-container-input-color, --primary-text-color); -webkit-appearance: none; text-align: inherit; @apply(--paper-font-subhead); @apply(--paper-input-container-input); } ::content [prefix] { @apply(--paper-font-subhead); @apply(--paper-input-prefix); @apply(--layout-flex-none); } ::content [suffix] { @apply(--paper-font-subhead); @apply(--paper-input-suffix); @apply(--layout-flex-none); } /* Firefox sets a min-width on the input, which can cause layout issues */ .input-content ::content input { min-width: 0; } .input-content ::content textarea { resize: none; } .add-on-content { position: relative; } .add-on-content.is-invalid ::content * { color: var(--paper-input-container-invalid-color, --error-color); } .add-on-content.is-highlighted ::content * { color: var(--paper-input-container-focus-color, --primary-color); } </style><template is="dom-if" if="[[!noLabelFloat]]"><div class="floated-label-placeholder" aria-hidden="true">&nbsp;</div></template><div class$="[[_computeInputContentClass(noLabelFloat,alwaysFloatLabel,focused,invalid,_inputHasContent)]]"><content select="[prefix]" id="prefix"></content><div class="label-and-input-container" id="labelAndInputContainer"><content select=":not([add-on]):not([prefix]):not([suffix])"></content></div><content select="[suffix]"></content></div><div class$="[[_computeUnderlineClass(focused,invalid)]]"><div class="unfocused-line"></div><div class="focused-line"></div></div><div class$="[[_computeAddOnContentClass(focused,invalid)]]"><content id="addOnContent" select="[add-on]"></content></div></template></dom-module><dom-module id="paper-input-error" assetpath="../../../paper-input/"><template><style> :host { display: inline-block; visibility: hidden; color: var(--paper-input-container-invalid-color, --error-color); @apply(--paper-font-caption); @apply(--paper-input-error); position: absolute; left:0; right:0; } :host([invalid]) { visibility: visible; }; </style><content></content></template></dom-module><dom-module id="paper-input" assetpath="../../../paper-input/"><template><style> :host { display: block; } :host([focused]) { outline: none; } :host([hidden]) { display: none !important; } input::-webkit-input-placeholder { color: var(--paper-input-container-color, --secondary-text-color); } input:-moz-placeholder { color: var(--paper-input-container-color, --secondary-text-color); } input::-moz-placeholder { color: var(--paper-input-container-color, --secondary-text-color); } input:-ms-input-placeholder { color: var(--paper-input-container-color, --secondary-text-color); } label { pointer-events: none; } </style><paper-input-container no-label-float="[[noLabelFloat]]" always-float-label="[[_computeAlwaysFloatLabel(alwaysFloatLabel,placeholder)]]" auto-validate$="[[autoValidate]]" disabled$="[[disabled]]" invalid="[[invalid]]"><content select="[prefix]"></content><label hidden$="[[!label]]" aria-hidden="true" for="input">[[label]]</label> <input is="iron-input" id="input" aria-labelledby$="[[_ariaLabelledBy]]" aria-describedby$="[[_ariaDescribedBy]]" disabled$="[[disabled]]" title$="[[title]]" bind-value="{{value}}" invalid="{{invalid}}" prevent-invalid-input="[[preventInvalidInput]]" allowed-pattern="[[allowedPattern]]" validator="[[validator]]" type$="[[type]]" pattern$="[[pattern]]" required$="[[required]]" autocomplete$="[[autocomplete]]" autofocus$="[[autofocus]]" inputmode$="[[inputmode]]" minlength$="[[minlength]]" maxlength$="[[maxlength]]" min$="[[min]]" max$="[[max]]" step$="[[step]]" name$="[[name]]" placeholder$="[[placeholder]]" readonly$="[[readonly]]" list$="[[list]]" size$="[[size]]" autocapitalize$="[[autocapitalize]]" autocorrect$="[[autocorrect]]" on-change="_onChange" tabindex$="[[tabindex]]" autosave$="[[autosave]]" results$="[[results]]" accept$="[[accept]]" multiple$="[[multiple]]"><content select="[suffix]"></content><template is="dom-if" if="[[errorMessage]]"><paper-input-error aria-live="assertive">[[errorMessage]]</paper-input-error></template><template is="dom-if" if="[[charCounter]]"><paper-input-char-counter></paper-input-char-counter></template></paper-input-container></template></dom-module><script src="https://www.gstatic.com/charts/loader.js"></script><dom-module id="google-chart" assetpath="../../../google-chart/"><template><style> :host { display: -webkit-flex; display: -ms-flex; display: flex; margin: 0; padding: 0; width: 400px; height: 300px; } :host([type="gauge"]) { width: 300px; height: 300px; } #chartdiv { width: 100%; } </style><google-chart-loader id="loader" type="[[type]]"></google-chart-loader><div id="chartdiv"></div></template></dom-module><i18n-attr-repo><template id="custom"><text-attribute-element custom-text-attr2=""></text-attribute-element><text-attribute-element custom-text-attr4="$"></text-attribute-element><text-attribute-element custom-text-attr5="$"></text-attribute-element><text-attribute-element i18n-target=""></text-attribute-element><text-attribute-element i18n-target="boolean-attr,!boolean-attr2,string-attr=abc|def,empty-attr=,type1"></text-attribute-element><text-attribute-element i18n-target="boolean-attr,boolean-attr2,string-attr=aaa,type2"></text-attribute-element><text-attribute-element i18n-target="string-attr=aaa,string-attr2=bbb,type3"></text-attribute-element><text-attribute-element i18n-target="boolean-attr=,type4"></text-attribute-element><text-attribute-element i18n-target2="boolean-attr,!boolean-attr2,string-attr=abc|def,empty-attr=,type1"></text-attribute-element><text-attribute-element i18n-target2="boolean-attr,boolean-attr2,,string-attr=aaa,,type2"></text-attribute-element><text-attribute-element i18n-target2="string-attr=aaa,string-attr2=bbb,type3"></text-attribute-element><text-attribute-element i18n-target2="boolean-attr=,type4"></text-attribute-element><text-attribute-element i18n-target2="type5"></text-attribute-element><text-attribute-element i18n-target3="string-attr=aaa,type1"></text-attribute-element><text-attribute-element i18n-target3=""></text-attribute-element><text-attribute-element i18n-target4=""></text-attribute-element><text-attribute-element i18n-target4="string-attr=aaa,type1"></text-attribute-element><text-attribute-element i18n-target5=""></text-attribute-element><text-attribute-element i18n-target5="type1"></text-attribute-element><text-attribute-element i18n-target="boolean-attr=,type4"></text-attribute-element><text-attribute-element i18n-target="string-attr=aaa,string-attr2=bbb,type3"></text-attribute-element><text-attribute-element i18n-target="boolean-attr,,boolean-attr2,,string-attr=aaa"></text-attribute-element><text-attribute-element i18n-target="boolean-attr,!boolean-attr2,string-attr=abc|def,empty-attr=,type1"></text-attribute-element><text-attribute-element i18n-target=""></text-attribute-element><text-attribute-element i18n-target2="type5"></text-attribute-element><text-attribute-element i18n-target2="boolean-attr="></text-attribute-element><text-attribute-element i18n-target2="string-attr=aaa,string-attr2=bbb,type3"></text-attribute-element><text-attribute-element i18n-target2="boolean-attr,!boolean-attr2,,string-attr=abc|def,,empty-attr=,type1"></text-attribute-element><text-attribute-element i18n-target2="boolean-attr,,boolean-attr2,,string-attr=aaa,type2"></text-attribute-element><text-attribute-element i18n-target3="string-attr=aaa,type1"></text-attribute-element><text-attribute-element i18n-target3=""></text-attribute-element><text-attribute-element i18n-target4=""></text-attribute-element><text-attribute-element i18n-target4="string-attr=aaa,type1"></text-attribute-element><text-attribute-element i18n-target5=""></text-attribute-element><text-attribute-element i18n-target5="type1"></text-attribute-element><text-attribute-element i18n-target6="type5"></text-attribute-element><text-attribute-element i18n-target6="boolean-attr="></text-attribute-element><text-attribute-element i18n-target6="boolean-attr,boolean-attr2,type1"></text-attribute-element><text-attribute-element i18n-target6="boolean-attr,boolean-attr2,string-attr=aaa,type2"></text-attribute-element><text-attribute-element i18n-target7="string-attr=aaa,type1"></text-attribute-element><text-attribute-element i18n-target7="invalid!attr=aaa,typeX"></text-attribute-element></template></i18n-attr-repo><dom-module id="text-attribute-element" assetpath="simple-attribute-element/"><template text-attr="custom-text-attr1 custom-text-attr3" localizable-text="embedded"><span id="attr1">{{customTextAttr1}}</span> <span id="attr2">{{customTextAttr2}}</span> <span id="attr3">{{customTextAttr3}}</span> <span id="attr4">{{outOfScopeAttr}}</span> <span>{{text.span_4}}</span><template id="localizable-text"><json-data>{ "meta": {}, "model": {}, "span_4": "text" }</json-data></template></template></dom-module><dom-module id="simple-attribute-element" assetpath="simple-attribute-element/"><template localizable-text="embedded"><style attr="This is not extracted"> google-chart { width: 300px; } </style><div id="outer-div"><div id="ordinary-div" attr="This is not targeted for extraction">{{text.ordinary-div}}</div><input id="standard-input" placeholder="{{model.standard-input.placeholder}}"> <input placeholder="{{model.outer-div:input_2.placeholder}}"><paper-input id="paper-input-element" label="{{model.paper-input-element.label}}" error-message="{{model.paper-input-element.error-message}}" placeholder="{{model.paper-input-element.placeholder}}" value="this is not a target"></paper-input><paper-input label="{{model.outer-div:paper-input_4.label}}" error-message="{{model.outer-div:paper-input_4.error-message}}" placeholder="{{model.outer-div:paper-input_4.placeholder}}" value="this is not a target"></paper-input><google-chart type="pie" id="pie-chart" options="{{model.pie-chart.options}}" cols="{{model.pie-chart.cols}}" rows="{{model.pie-chart.rows}}"></google-chart><google-chart id="column-chart" type="column" options="{{model.column-chart.options}}" data="{{model.column-chart.data}}"></google-chart><text-attribute-element id="custom-attr" custom-text-attr1="{{model.custom-attr.custom-text-attr1}}" custom-text-attr2="{{model.custom-attr.custom-text-attr2}}" custom-text-attr3="{{model.custom-attr.custom-text-attr3}}" out-of-scope-attr="out of scope attr"></text-attribute-element><text-attribute-element id="selective-attr" boolean-attr="" empty-attr="" string-attr="abc" custom-text-attr4$="{{i18nFormat(model.selective-attr.custom-text-attr4.0,text.ordinary-div,text.ordinary-div,text.ordinary-div,text.ordinary-div)}}" custom-text-attr5$="[[text.ordinary-div]]{{model.selective-attr.custom-text-attr5.1}}{{or('',text.ordinary-div)}}{{model.selective-attr.custom-text-attr5.3}}[[text.ordinary-div]]" i18n-target="{{i18nFormat(model.selective-attr.i18n-target.0,text.ordinary-div,text.ordinary-div)}}" i18n-target2="{{model.selective-attr.i18n-target2.0}}{{or('',text.ordinary-div)}}{{model.selective-attr.i18n-target2.2}}[[text.ordinary-div]]"></text-attribute-element><text-attribute-element id="selective-attr2" boolean-attr="" boolean-attr2="" string-attr="aaa" i18n-target="{{model.selective-attr2.i18n-target}}"></text-attribute-element><text-attribute-element id="selective-attr3" i18n-target6="{{model.selective-attr3.i18n-target6}}"></text-attribute-element><text-attribute-element id="selective-attr4" boolean-attr="" i18n-target6="{{model.selective-attr4.i18n-target6}}" i18n-target7="unmatching i18n-target4 attribute"></text-attribute-element><text-attribute-element id="selective-attr5" string-attr="xxx" i18n-target7="unmatching i18n-target7 attribute"></text-attribute-element><span id="test-json-data-1">{{model.json-data-id.attr1}}</span> <span id="test-json-data-2">{{model.json-data-id.i18n-target-attr}}</span> <span id="test-json-data-3">{{model.template_2:json-data_1.attr1}}</span> <span id="test-json-data-4">{{model.template_2:json-data_1.i18n-target-attr}}</span></div><template><json-data id="json-data-id" attr1="{{model.json-data-id.attr1}}" i18n-target-attr="{{model.json-data-id.i18n-target-attr}}"></json-data><json-data attr1="{{model.template_2:json-data_1.attr1}}" i18n-target-attr="{{model.template_2:json-data_1.i18n-target-attr}}"></json-data></template><template id="localizable-text"><json-data>{ "meta": {}, "model": { "standard-input": { "placeholder": "standard HTML5 attribute" }, "outer-div:input_2": { "placeholder": "standard HTML5 attribute without id" }, "paper-input-element": { "label": "paper-input label", "error-message": "paper-in