Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Material theme tabs #22

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"vaadin-progress-bar": "vaadin/vaadin-progress-bar#^v1.0.0-alpha3",
"vaadin-radio-button": "vaadin/vaadin-radio-button#^v1.0.0-alpha3",
"vaadin-split-layout": "vaadin/vaadin-split-layout#^v3.0.0-beta1",
"vaadin-tabs": "vaadin/vaadin-tabs#^2.0.0",
"vaadin-text-field": "vaadin/vaadin-text-field#^v1.2.0",
"iron-ajax": "PolymerElements/iron-ajax#^2.0.2",
"elements-demo-resources": "vaadin/elements-demo-resources#new-menu-and-styles",
Expand Down
1 change: 1 addition & 0 deletions demo/common.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
{name: 'checkboxes', title: 'Checkbox'},
{name: 'date-pickers', title: 'Date picker'},
{name: 'grids', title: 'Data grid'},
{name: 'tabs', title: 'Tabs'},
{name: 'text-fields', title: 'Text field'},
{name: 'split-layouts', title: 'Split layout', group: 'Layouts'}
];
Expand Down
320 changes: 320 additions & 0 deletions demo/tabs.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,320 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

<title>Material Theme Tabs</title>

<script src="../../webcomponentsjs/webcomponents-loader.js"></script>
<link rel="import" href="common.html">

<link rel="import" href="../vaadin-tabs.html">

<link rel="import" href="../../iron-icons/iron-icons.html">

<style>
[unresolved] {
opacity: 0;
}

nice-demo-snippet {
padding-top: 20px;
}

div[theme="dark"] nice-demo-snippet {
--nice-demo-snippet-code-background-color: #f7f7f7;
--nice-demo-snippet-view-source-background-color: #070707;
--nice-demo-snippet-code-color: #000000;
}
</style>
</head>

<body unresolved>

<div class="vertical-section-container centered">

<demo-navigation>
<span slot="header">Material</span>
</demo-navigation>

<h1>Tabs</h1>

<h3 demo-section>Default configuration</h3>
<nice-demo-snippet>
<template slot="source">
<vaadin-tabs>
<vaadin-tab>Tab one</vaadin-tab>
<vaadin-tab>Tab two</vaadin-tab>
<vaadin-tab>Tab three with a long name</vaadin-tab>
</vaadin-tabs>
</template>
</nice-demo-snippet>

<h3 demo-section>Tabs with fixed width</h3>
<nice-demo-snippet>
<template slot="source">
<vaadin-tabs theme="fixed">
<vaadin-tab>Tab one</vaadin-tab>
</vaadin-tabs>
</template>
</nice-demo-snippet>

<nice-demo-snippet>
<template slot="source">
<vaadin-tabs theme="fixed">
<vaadin-tab>Tab one</vaadin-tab>
<vaadin-tab>Tab two</vaadin-tab>
</vaadin-tabs>
</template>
</nice-demo-snippet>

<nice-demo-snippet>
<template slot="source">
<vaadin-tabs theme="fixed">
<vaadin-tab>Tab one</vaadin-tab>
<vaadin-tab>Tab two</vaadin-tab>
<vaadin-tab>Tab three with a long name</vaadin-tab>
</vaadin-tabs>
</template>
</nice-demo-snippet>

<h3 demo-section>Scrollable tabs</h3>
<nice-demo-snippet>
<template slot="source">
<vaadin-tabs>
<vaadin-tab>Tab one</vaadin-tab>
<vaadin-tab>Tab two</vaadin-tab>
<vaadin-tab>Tab three</vaadin-tab>
<vaadin-tab>Tab four</vaadin-tab>
<vaadin-tab>Tab five</vaadin-tab>
<vaadin-tab>Tab six</vaadin-tab>
<vaadin-tab>Tab seven</vaadin-tab>
<vaadin-tab>Tab eight</vaadin-tab>
<vaadin-tab>Tab nine</vaadin-tab>
<vaadin-tab>Tab ten</vaadin-tab>
<vaadin-tab>Tab eleven</vaadin-tab>
<vaadin-tab>Tab twelve</vaadin-tab>
<vaadin-tab>Tab thirteen</vaadin-tab>
<vaadin-tab>Tab fourteen</vaadin-tab>
<vaadin-tab>Tab fifteen</vaadin-tab>
</vaadin-tabs>
</template>
</nice-demo-snippet>

<h3 demo-section>Disabled tabs</h3>
<nice-demo-snippet>
<template slot="source">
<vaadin-tabs>
<vaadin-tab>Tab one</vaadin-tab>
<vaadin-tab>Tab two</vaadin-tab>
<vaadin-tab disabled>Disabled tab</vaadin-tab>
<vaadin-tab>Tab four</vaadin-tab>
<vaadin-tab>Tab five</vaadin-tab>
</vaadin-tabs>
</template>
</nice-demo-snippet>

<h3 demo-section>Icons and text</h3>

<nice-demo-snippet>
<template slot="source">
<vaadin-tabs>
<vaadin-tab theme="icon-on-top">
<iron-icon icon="alarm"></iron-icon>
<span>Tab one</span>
</vaadin-tab>
<vaadin-tab theme="icon-on-top">
<iron-icon icon="face"></iron-icon>
<span>Tab two</span>
</vaadin-tab>
<vaadin-tab theme="icon-on-top">
<iron-icon icon="info"></iron-icon>
<span>Tab three</span>
</vaadin-tab>
</vaadin-tabs>
</template>
</nice-demo-snippet>

<h3 demo-section>Icons and text with fixed width</h3>

<nice-demo-snippet>
<template slot="source">
<vaadin-tabs theme="fixed">
<vaadin-tab theme="icon-on-top">
<iron-icon icon="alarm"></iron-icon>
<span>Tab one</span>
</vaadin-tab>
<vaadin-tab theme="icon-on-top">
<iron-icon icon="face"></iron-icon>
<span>Tab two</span>
</vaadin-tab>
</vaadin-tabs>
</template>
</nice-demo-snippet>

<nice-demo-snippet>
<template slot="source">
<vaadin-tabs theme="fixed">
<vaadin-tab theme="icon-on-top">
<iron-icon icon="alarm"></iron-icon>
<span>Tab one</span>
</vaadin-tab>
<vaadin-tab theme="icon-on-top">
<iron-icon icon="face"></iron-icon>
<span>Tab two</span>
</vaadin-tab>
<vaadin-tab theme="icon-on-top">
<iron-icon icon="info"></iron-icon>
<span>Tab three</span>
</vaadin-tab>
</vaadin-tabs>
</template>
</nice-demo-snippet>

<h3 demo-section>Icons only</h3>
<nice-demo-snippet>
<template slot="source">
<vaadin-tabs>
<vaadin-tab>
<iron-icon icon="alarm"></iron-icon>
</vaadin-tab>
<vaadin-tab>
<iron-icon icon="face"></iron-icon>
</vaadin-tab>
<vaadin-tab>
<iron-icon icon="info"></iron-icon>
</vaadin-tab>
</vaadin-tabs>
</template>
</nice-demo-snippet>

<hr>

<h3 demo-section>Dark theme default configuration</h3>

<div theme="dark">
<nice-demo-snippet>
<template slot="source">
<vaadin-tabs>
<vaadin-tab>Tab one</vaadin-tab>
<vaadin-tab>Tab two</vaadin-tab>
<vaadin-tab>Tab three</vaadin-tab>
</vaadin-tabs>
</template>
</nice-demo-snippet>
</div>

<h3 demo-section>Tabs with fixed width</h3>
<div theme="dark">
<nice-demo-snippet>
<template slot="source">
<vaadin-tabs theme="fixed">
<vaadin-tab>Tab one</vaadin-tab>
<vaadin-tab>Tab two</vaadin-tab>
<vaadin-tab>Tab three</vaadin-tab>
</vaadin-tabs>
</template>
</nice-demo-snippet>
</div>

<h3 demo-section>Dark theme scrollable tabs</h3>
<div theme="dark">
<nice-demo-snippet>
<template slot="source">
<vaadin-tabs>
<vaadin-tab>Tab one</vaadin-tab>
<vaadin-tab>Tab two</vaadin-tab>
<vaadin-tab>Tab three</vaadin-tab>
<vaadin-tab>Tab four</vaadin-tab>
<vaadin-tab>Tab five</vaadin-tab>
<vaadin-tab>Tab six</vaadin-tab>
<vaadin-tab>Tab seven</vaadin-tab>
<vaadin-tab>Tab eight</vaadin-tab>
<vaadin-tab>Tab nine</vaadin-tab>
<vaadin-tab>Tab ten</vaadin-tab>
<vaadin-tab>Tab eleven</vaadin-tab>
<vaadin-tab>Tab twelve</vaadin-tab>
<vaadin-tab>Tab thirteen</vaadin-tab>
<vaadin-tab>Tab fourteen</vaadin-tab>
<vaadin-tab>Tab fifteen</vaadin-tab>
</vaadin-tabs>
</template>
</nice-demo-snippet>
</div>

<h3 demo-section>Dark theme disabled tabs</h3>
<div theme="dark">
<nice-demo-snippet>
<template slot="source">
<vaadin-tabs>
<vaadin-tab>Tab one</vaadin-tab>
<vaadin-tab>Tab two</vaadin-tab>
<vaadin-tab disabled>Disabled tab</vaadin-tab>
<vaadin-tab>Tab four</vaadin-tab>
<vaadin-tab>Tab five</vaadin-tab>
</vaadin-tabs>
</template>
</nice-demo-snippet>
</div>

<h3 demo-section>Dark theme icons</h3>
<div theme="dark">
<nice-demo-snippet>
<template slot="source">
<vaadin-tabs>
<vaadin-tab theme="icon-on-top">
<iron-icon icon="alarm"></iron-icon>
<span>Tab one</span>
</vaadin-tab>
<vaadin-tab theme="icon-on-top">
<iron-icon icon="face"></iron-icon>
<span>Tab two</span>
</vaadin-tab>
<vaadin-tab theme="icon-on-top">
<iron-icon icon="info"></iron-icon>
<span>Tab three</span>
</vaadin-tab>
</vaadin-tabs>
</template>
</nice-demo-snippet>
</div>

<h3 demo-section>Dark theme icons only</h3>
<div theme="dark">
<nice-demo-snippet>
<template slot="source">
<vaadin-tabs>
<vaadin-tab>
<iron-icon icon="alarm"></iron-icon>
</vaadin-tab>
<vaadin-tab>
<iron-icon icon="face"></iron-icon>
</vaadin-tab>
<vaadin-tab>
<iron-icon icon="info"></iron-icon>
</vaadin-tab>
</vaadin-tabs>
</template>
</nice-demo-snippet>
</div>

<h2 demo-section>Styling API</h2>

<div class="note warn">
<p>Read the <b><a href="customization.html">customization instructions</a></b> to learn how to customize the component styles.</p>
</div>

<!-- <h3>Custom properties</h3>

<dl class="custom-properties">
</dl> -->

<h3>Shadow parts and states</h3>

<p>See the <a href="https://vaadin.com/elements/vaadin-tabs/html-api/">API documentation for vaadin-tabs</a>.</p>

</div>
</body>
</html>
6 changes: 6 additions & 0 deletions font-icons.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,10 @@
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'valo-icons';
src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAAo0AAsA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AYwBvAG4Ac1JlZ3VsYXIAUgBlAGcAdQBsAGEAcnZhbG8taWNvbnMAdgBhAGwAbwAtAGkAYwBvAG4Ac0ZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=) format('woff');
font-weight: normal;
font-style: normal;
}
</style>
Loading