} ev */
12 | function handleChecked(ev) {
13 | if (ev.value) {
14 | console.log(ev.target.text + ' checked');
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/snippets/refreshcomposite.jsx:
--------------------------------------------------------------------------------
1 | import {RefreshComposite, TextView, contentView} from 'tabris';
2 |
3 | contentView.append(
4 |
5 |
6 | Pull to refresh
7 |
8 |
9 |
10 | );
11 |
12 | const refreshComposite = $(RefreshComposite).only();
13 | const log = $(TextView).only('#log');
14 |
15 | function handleRefresh() {
16 | setTimeout(() => {
17 | refreshComposite.refreshIndicator = false;
18 | log.text = `last refresh: ${new Date()}\n${log.text}`;
19 | }, 1000);
20 | }
21 |
--------------------------------------------------------------------------------
/snippets/resource-management.tsx:
--------------------------------------------------------------------------------
1 | import {contentView, TextView} from 'tabris';
2 | import {colors, fonts, texts} from './resources';
3 |
4 | contentView.set({padding: 16, background: colors.myBackground}).append(
5 |
6 | {texts.tintColor}
7 | {texts.emphasisFont}
8 |
9 | );
10 |
--------------------------------------------------------------------------------
/snippets/resources/Sources.md:
--------------------------------------------------------------------------------
1 | target_200.png based on
2 | http://commons.wikimedia.org/wiki/File:Archery_Target_80cm.svg
3 |
--------------------------------------------------------------------------------
/snippets/resources/arrow-back-black-24dp@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eclipsesource/tabris-js/a8486c58cfa414c06c130a7727c7f53b3911140d/snippets/resources/arrow-back-black-24dp@3x.png
--------------------------------------------------------------------------------
/snippets/resources/arrow-forward-black-24dp@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eclipsesource/tabris-js/a8486c58cfa414c06c130a7727c7f53b3911140d/snippets/resources/arrow-forward-black-24dp@3x.png
--------------------------------------------------------------------------------
/snippets/resources/arrow-upward-white-24pt@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eclipsesource/tabris-js/a8486c58cfa414c06c130a7727c7f53b3911140d/snippets/resources/arrow-upward-white-24pt@3x.png
--------------------------------------------------------------------------------
/snippets/resources/card-filled@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eclipsesource/tabris-js/a8486c58cfa414c06c130a7727c7f53b3911140d/snippets/resources/card-filled@2x.png
--------------------------------------------------------------------------------
/snippets/resources/card@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eclipsesource/tabris-js/a8486c58cfa414c06c130a7727c7f53b3911140d/snippets/resources/card@2x.png
--------------------------------------------------------------------------------
/snippets/resources/cart-filled@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eclipsesource/tabris-js/a8486c58cfa414c06c130a7727c7f53b3911140d/snippets/resources/cart-filled@2x.png
--------------------------------------------------------------------------------
/snippets/resources/cart@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eclipsesource/tabris-js/a8486c58cfa414c06c130a7727c7f53b3911140d/snippets/resources/cart@2x.png
--------------------------------------------------------------------------------
/snippets/resources/chart-filled@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eclipsesource/tabris-js/a8486c58cfa414c06c130a7727c7f53b3911140d/snippets/resources/chart-filled@2x.png
--------------------------------------------------------------------------------
/snippets/resources/chart@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eclipsesource/tabris-js/a8486c58cfa414c06c130a7727c7f53b3911140d/snippets/resources/chart@2x.png
--------------------------------------------------------------------------------
/snippets/resources/close-black-24dp@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eclipsesource/tabris-js/a8486c58cfa414c06c130a7727c7f53b3911140d/snippets/resources/close-black-24dp@3x.png
--------------------------------------------------------------------------------
/snippets/resources/close-white-24dp@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eclipsesource/tabris-js/a8486c58cfa414c06c130a7727c7f53b3911140d/snippets/resources/close-white-24dp@3x.png
--------------------------------------------------------------------------------
/snippets/resources/cloud-check.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eclipsesource/tabris-js/a8486c58cfa414c06c130a7727c7f53b3911140d/snippets/resources/cloud-check.png
--------------------------------------------------------------------------------
/snippets/resources/colors.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "../node_modules/tabris/schema/colors.json",
3 | "myBackground": "#DFFF94",
4 | "myBlue": "#435FBD",
5 | "myRed": {
6 | "android": "#8F0B12",
7 | "ios": "#EC2121"
8 | },
9 | "tint": {
10 | "android": {"ref": "myBlue"},
11 | "ios": {"ref": "myRed"}
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/snippets/resources/cover.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eclipsesource/tabris-js/a8486c58cfa414c06c130a7727c7f53b3911140d/snippets/resources/cover.jpg
--------------------------------------------------------------------------------
/snippets/resources/delete-black-24dp@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eclipsesource/tabris-js/a8486c58cfa414c06c130a7727c7f53b3911140d/snippets/resources/delete-black-24dp@3x.png
--------------------------------------------------------------------------------
/snippets/resources/example.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eclipsesource/tabris-js/a8486c58cfa414c06c130a7727c7f53b3911140d/snippets/resources/example.pdf
--------------------------------------------------------------------------------
/snippets/resources/fonts.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "../node_modules/tabris/schema/fonts.json",
3 | "main": {
4 | "1x": "medium 22px 'serif'",
5 | "2x": "medium 26px 'serif'"
6 | },
7 | "emphasis": {
8 | "1x": {
9 | "android": {
10 | "size": 22,
11 | "family": ["san-serif"],
12 | "style": "italic"
13 | },
14 | "ios": {
15 | "size": 22,
16 | "family": ["san-serif"],
17 | "weight": "black"
18 | }
19 | },
20 | "2x": {
21 | "size": 26,
22 | "family": ["san-serif"],
23 | "weight": "black",
24 | "style": "italic"
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/snippets/resources/holger.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eclipsesource/tabris-js/a8486c58cfa414c06c130a7727c7f53b3911140d/snippets/resources/holger.jpg
--------------------------------------------------------------------------------
/snippets/resources/ian.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eclipsesource/tabris-js/a8486c58cfa414c06c130a7727c7f53b3911140d/snippets/resources/ian.jpg
--------------------------------------------------------------------------------
/snippets/resources/index.ts:
--------------------------------------------------------------------------------
1 | import {ColorResources, FontResources, TextResources} from 'tabris';
2 | import * as colorData from './colors.json';
3 | import * as fontData from './fonts.json';
4 | import * as textData from './texts.json';
5 |
6 | export const colors = ColorResources.from(colorData);
7 | export const fonts = FontResources.from(fontData);
8 | export const texts = TextResources.from(textData);
9 |
--------------------------------------------------------------------------------
/snippets/resources/jochen.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eclipsesource/tabris-js/a8486c58cfa414c06c130a7727c7f53b3911140d/snippets/resources/jochen.jpg
--------------------------------------------------------------------------------
/snippets/resources/jordi.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eclipsesource/tabris-js/a8486c58cfa414c06c130a7727c7f53b3911140d/snippets/resources/jordi.jpg
--------------------------------------------------------------------------------
/snippets/resources/landscape.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eclipsesource/tabris-js/a8486c58cfa414c06c130a7727c7f53b3911140d/snippets/resources/landscape.jpg
--------------------------------------------------------------------------------
/snippets/resources/markus.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eclipsesource/tabris-js/a8486c58cfa414c06c130a7727c7f53b3911140d/snippets/resources/markus.jpg
--------------------------------------------------------------------------------
/snippets/resources/moritz.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eclipsesource/tabris-js/a8486c58cfa414c06c130a7727c7f53b3911140d/snippets/resources/moritz.jpg
--------------------------------------------------------------------------------
/snippets/resources/pacifico.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eclipsesource/tabris-js/a8486c58cfa414c06c130a7727c7f53b3911140d/snippets/resources/pacifico.ttf
--------------------------------------------------------------------------------
/snippets/resources/ralf.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eclipsesource/tabris-js/a8486c58cfa414c06c130a7727c7f53b3911140d/snippets/resources/ralf.jpg
--------------------------------------------------------------------------------
/snippets/resources/salad.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eclipsesource/tabris-js/a8486c58cfa414c06c130a7727c7f53b3911140d/snippets/resources/salad.jpg
--------------------------------------------------------------------------------
/snippets/resources/search-black-24dp@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eclipsesource/tabris-js/a8486c58cfa414c06c130a7727c7f53b3911140d/snippets/resources/search-black-24dp@3x.png
--------------------------------------------------------------------------------
/snippets/resources/search-white-24dp@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eclipsesource/tabris-js/a8486c58cfa414c06c130a7727c7f53b3911140d/snippets/resources/search-white-24dp@3x.png
--------------------------------------------------------------------------------
/snippets/resources/settings-black-24dp@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eclipsesource/tabris-js/a8486c58cfa414c06c130a7727c7f53b3911140d/snippets/resources/settings-black-24dp@3x.png
--------------------------------------------------------------------------------
/snippets/resources/settings-white-24dp@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eclipsesource/tabris-js/a8486c58cfa414c06c130a7727c7f53b3911140d/snippets/resources/settings-white-24dp@3x.png
--------------------------------------------------------------------------------
/snippets/resources/share-black-24dp@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eclipsesource/tabris-js/a8486c58cfa414c06c130a7727c7f53b3911140d/snippets/resources/share-black-24dp@3x.png
--------------------------------------------------------------------------------
/snippets/resources/share-white-24dp@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eclipsesource/tabris-js/a8486c58cfa414c06c130a7727c7f53b3911140d/snippets/resources/share-white-24dp@3x.png
--------------------------------------------------------------------------------
/snippets/resources/target_200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eclipsesource/tabris-js/a8486c58cfa414c06c130a7727c7f53b3911140d/snippets/resources/target_200.png
--------------------------------------------------------------------------------
/snippets/resources/texts.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "../node_modules/tabris/schema/texts.json",
3 | "$fallbackLanguage": "en-US",
4 | "emphasisFont": {
5 | "en": "Emphasis Font",
6 | "de": "Hervorgehobene Schrift"
7 | },
8 | "tintColor": {
9 | "en-us": "Tint Color",
10 | "en-gb": "Tint Colour",
11 | "de": "Akzentfarbe"
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/snippets/resources/tim.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eclipsesource/tabris-js/a8486c58cfa414c06c130a7727c7f53b3911140d/snippets/resources/tim.jpg
--------------------------------------------------------------------------------
/snippets/resources/website.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
13 |
14 |
15 | Web Messaging
16 | No message received from Tabris.js
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/snippets/resources/worker-script.js:
--------------------------------------------------------------------------------
1 | // Makes the log output from the Worker appear on the CLI:
2 | tabris.logPushInterval = 100;
3 |
4 | console.log('Worker running...');
5 |
6 | tabris.onMessage(e => {
7 | const number1 = e.data[0];
8 | const number2 = e.data[1];
9 | console.log(`Adding numbers ${number1} and ${number2}`);
10 | const result = number1 + number2;
11 | setTimeout(() => {
12 | console.log('Posting result of ' + result + ' to main script');
13 | tabris.postMessage(result);
14 | }, 2000);
15 | });
16 |
--------------------------------------------------------------------------------
/snippets/row-alignment.jsx:
--------------------------------------------------------------------------------
1 | import {contentView, TextView, Row, Button} from 'tabris';
2 |
3 | contentView.append(
4 |
5 | lorem
6 | ipsum
7 | dolor
8 | sit
9 |
10 |
11 | ).find(TextView).set({font: '24px', textColor: 'white'});
12 |
--------------------------------------------------------------------------------
/snippets/row-halign.jsx:
--------------------------------------------------------------------------------
1 | import {contentView, TextView, Row} from 'tabris';
2 |
3 | contentView.append(
4 |
5 | Left
6 | Stretch
7 | Right
8 |
9 | );
10 |
11 | $(TextView).set({textColor: 'white', font: '24px'});
12 |
--------------------------------------------------------------------------------
/snippets/row.jsx:
--------------------------------------------------------------------------------
1 | import {contentView, TextView, Row} from 'tabris';
2 |
3 | contentView.append(
4 |
5 | lorem
6 | ipsum
7 | dolor
8 | sit amet
9 |
10 | ).find(TextView).set({font: '24px', textColor: 'white'});
11 |
--------------------------------------------------------------------------------
/snippets/scrollview.jsx:
--------------------------------------------------------------------------------
1 | import {Button, contentView, ScrollView, TextView} from 'tabris';
2 |
3 | contentView.append(
4 | <$>
5 | $(TextView)[1].text = `Scroll state: ${e.value}`}>
7 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
8 | eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation
9 | ullamco laboris nisi ut aliquip ex ea commodo consequat.
10 |
11 |
12 |
13 |