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

docs: refactor/doc slots #6502

Merged
merged 51 commits into from
Feb 28, 2019
Merged
Show file tree
Hide file tree
Changes from 39 commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
f4ebc82
docs(examples): convert autocomplete slots
MajesticPotatoe Feb 13, 2019
d052e9f
docs(examples): convert avatar slots
MajesticPotatoe Feb 13, 2019
186ab36
docs(examples): convert badge slots
MajesticPotatoe Feb 13, 2019
01cf803
docs(examples): convert bottom-sheet slots
MajesticPotatoe Feb 13, 2019
05b0865
docs(examples): convert breadcrumb slots
MajesticPotatoe Feb 13, 2019
cb77b93
docs(examples): convert button slots
MajesticPotatoe Feb 13, 2019
16f16c8
docs(examples): convert calendar slots
MajesticPotatoe Feb 13, 2019
3eea721
docs(examples): convert chip slots
MajesticPotatoe Feb 13, 2019
d96ccc5
docs(examples): convert combobox slots
MajesticPotatoe Feb 13, 2019
a34c895
docs(examples): convert data-iterator slots
MajesticPotatoe Feb 13, 2019
9a28179
Merge branch 'master' into refactor/doc-slots
MajesticPotatoe Feb 13, 2019
8e0dd11
docs(examples): convert slider slots
MajesticPotatoe Feb 14, 2019
b8e502e
docs(examples): convert spacing slots
MajesticPotatoe Feb 14, 2019
b9ef41b
docs(examples): convert sparkline slots
MajesticPotatoe Feb 14, 2019
ad2b754
docs(examples): convert tab slots
MajesticPotatoe Feb 14, 2019
aaea106
docs(examples): convert textfield slots
MajesticPotatoe Feb 14, 2019
c496c8e
docs(examples): convert textarea slots
MajesticPotatoe Feb 14, 2019
7a53ea1
docs(examples): convert timepicker slots
MajesticPotatoe Feb 14, 2019
90b31dc
docs(examples): convert timeline slots
MajesticPotatoe Feb 14, 2019
1d0fc0c
docs(examples): convert toolbar slots
MajesticPotatoe Feb 14, 2019
8967859
docs(examples): convert transition slots
MajesticPotatoe Feb 14, 2019
1991d2f
docs(examples): convert treeview slots
MajesticPotatoe Feb 14, 2019
995e2ac
docs(examples): update misc slot errors
MajesticPotatoe Feb 14, 2019
3c0b8f7
docs(examples): convert image slots
MajesticPotatoe Feb 14, 2019
6d6e085
docs(examples): convert list slots
MajesticPotatoe Feb 14, 2019
c8457d0
docs(examples): convert navdrawer slots
MajesticPotatoe Feb 14, 2019
802fe22
docs(examples): convert rating slots
MajesticPotatoe Feb 14, 2019
5bfe3f2
docs(examples): convert selection-control slots
MajesticPotatoe Feb 14, 2019
ecf262e
docs(examples): convert select slots
MajesticPotatoe Feb 14, 2019
ff55b05
docs(examples): convert datatable slots
MajesticPotatoe Feb 15, 2019
0900dcd
docs(examples): convert datepicker slots
MajesticPotatoe Feb 15, 2019
3d4afdc
docs(examples): convert dialog slots
MajesticPotatoe Feb 15, 2019
5c8912c
docs(examples): convert menu slots
MajesticPotatoe Feb 15, 2019
390d787
docs(examples): convert layout slots
MajesticPotatoe Feb 15, 2019
ed306a2
docs(examples): convert expansionpanel slots
MajesticPotatoe Feb 15, 2019
dc92ebe
docs(examples): convert fab slots
MajesticPotatoe Feb 15, 2019
0704444
docs: convert ui slots
MajesticPotatoe Feb 15, 2019
1ee7cda
docs: revert modified tests
MajesticPotatoe Feb 15, 2019
f2a7460
Merge branch 'master' into refactor/doc-slots
MajesticPotatoe Feb 15, 2019
8737fad
Merge branch 'master' into refactor/doc-slots
Feb 15, 2019
998ed1b
docs: remove spreads
MajesticPotatoe Feb 15, 2019
f3808c1
docs(examples): normalize to v-slot syntax
MajesticPotatoe Feb 15, 2019
46349d4
Merge branch 'master' into refactor/doc-slots
Feb 15, 2019
c6146ef
docs(examples): fix combobox errors
MajesticPotatoe Feb 16, 2019
2c0d80b
docs(examples): fix errors
MajesticPotatoe Feb 16, 2019
51ebc3d
docs(examples): switch to on/on syntax
MajesticPotatoe Feb 16, 2019
9efb189
docs(examples): fix premium dual activator
MajesticPotatoe Feb 16, 2019
ef1a0e6
Merge branch 'master' into refactor/doc-slots
jacekkarczmarczyk Feb 16, 2019
65674d1
docs: use object desctructing
jacekkarczmarczyk Feb 16, 2019
d8516c2
Merge branch 'master' into refactor/doc-slots
MajesticPotatoe Feb 28, 2019
45b8fd5
Merge branch 'master' into refactor/doc-slots
MajesticPotatoe Feb 28, 2019
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
10 changes: 2 additions & 8 deletions packages/docs/src/components/components/ApiExplorer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@
chips
return-object
>
<template
slot="selection"
slot-scope="props"
>
<template v-slot:selection="props">
<v-chip
:selected="props.selected"
color="primary"
Expand All @@ -31,10 +28,7 @@
<span v-text="props.item.text" />
</v-chip>
</template>
<template
slot="item"
slot-scope="props"
>
<template v-slot:item="props">
<v-list-tile-action>
<v-icon v-text="props.item.icon" />
</v-list-tile-action>
Expand Down
28 changes: 15 additions & 13 deletions packages/docs/src/components/core/Ecosystems.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,21 @@
offset-y
max-height="700"
>
<v-btn
slot="activator"
:aria-label="$t('Vuetify.AppToolbar.ecosystem')"
flat
style="min-width: 48px"
>
<span
class="hidden-sm-and-down mr-1"
v-text="$t('Vuetify.AppToolbar.ecosystem')"
/>
<v-icon class="hidden-sm-and-down">mdi-menu-down</v-icon>
<v-icon class="hidden-md-and-up">mdi-earth</v-icon>
</v-btn>
<template #activator="{ on: menu }">
<v-btn
:aria-label="$t('Vuetify.AppToolbar.ecosystem')"
flat
style="min-width: 48px"
v-on="{ ...menu }"
MajesticPotatoe marked this conversation as resolved.
Show resolved Hide resolved
>
<span
class="hidden-sm-and-down mr-1"
v-text="$t('Vuetify.AppToolbar.ecosystem')"
/>
<v-icon class="hidden-sm-and-down">mdi-menu-down</v-icon>
<v-icon class="hidden-md-and-up">mdi-earth</v-icon>
</v-btn>
</template>

<v-list
light
Expand Down
7 changes: 3 additions & 4 deletions packages/docs/src/components/core/Group.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
:sub-group="subGroup"
no-action
>
<core-item
slot="activator"
:text="item.text"
/>
<template v-slot:activator>
<core-item :text="item.text" />
</template>
<template v-for="(child, i) in children">
<core-sub-group
v-if="child.group != null"
Expand Down
28 changes: 15 additions & 13 deletions packages/docs/src/components/core/Locales.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,21 @@
left
offset-y
>
<v-btn
slot="activator"
:aria-label="$t('Vuetify.AppToolbar.translations')"
flat
style="min-width: 48px"
>
<v-icon v-if="currentLanguage.locale === 'eo-UY'">language</v-icon>
<v-img
v-else
:src="`https://cdn.vuetifyjs.com/images/flags/${currentLanguage.country}.png`"
width="26px"
/>
</v-btn>
<template #activator="{ on: menu }">
<v-btn
:aria-label="$t('Vuetify.AppToolbar.translations')"
flat
style="min-width: 48px"
v-on="{ ...menu }"
>
<v-icon v-if="currentLanguage.locale === 'eo-UY'">language</v-icon>
<v-img
v-else
:src="`https://cdn.vuetifyjs.com/images/flags/${currentLanguage.country}.png`"
width="26px"
/>
</v-btn>
</template>
<v-list
dense
light
Expand Down
28 changes: 15 additions & 13 deletions packages/docs/src/components/core/Supports.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,21 @@
offset-y
max-height="500"
>
<v-btn
slot="activator"
:aria-label="$t('Vuetify.AppToolbar.support')"
flat
style="min-width: 48px"
>
<span
class="hidden-sm-and-down mr-1"
v-text="$t('Vuetify.AppToolbar.support')"
/>
<v-icon class="hidden-sm-and-down">mdi-menu-down</v-icon>
<v-icon class="hidden-md-and-up">mdi-comment-question</v-icon>
</v-btn>
<template #activator="{ on: menu }">
<v-btn
:aria-label="$t('Vuetify.AppToolbar.support')"
flat
style="min-width: 48px"
v-on="{ ...menu }"
>
<span
class="hidden-sm-and-down mr-1"
v-text="$t('Vuetify.AppToolbar.support')"
/>
<v-icon class="hidden-sm-and-down">mdi-menu-down</v-icon>
<v-icon class="hidden-md-and-up">mdi-comment-question</v-icon>
</v-btn>
</template>
<v-list dense>
<v-subheader v-text="$t('Vuetify.AppToolbar.getHelp')" />
<core-item
Expand Down
24 changes: 13 additions & 11 deletions packages/docs/src/components/core/Versions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,19 @@
offset-y
max-height="500"
>
<v-btn
slot="activator"
class="hidden-md-and-down"
flat
>
<span
class="text-lowercase mr-1"
v-text="version"
/>
<v-icon class="hidden-sm-and-down">mdi-menu-down</v-icon>
</v-btn>
<template #activator="{ on: menu }">
<v-btn
class="hidden-md-and-down"
flat
v-on="{ ...menu }"
>
<span
class="text-lowercase mr-1"
v-text="version"
/>
<v-icon class="hidden-sm-and-down">mdi-menu-down</v-icon>
</v-btn>
</template>

<v-card>
<v-list dense>
Expand Down
5 changes: 1 addition & 4 deletions packages/docs/src/components/doc/Parameters.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@
content-tag="v-layout"
content-class="wrap"
>
<template
slot="item"
slot-scope="{ item }"
>
<template v-slot:item="{ item }">
<v-flex xs12 grey lighten-2 mt-2>
<v-layout wrap px-2 py-1>
<v-flex
Expand Down
2 changes: 1 addition & 1 deletion packages/docs/src/components/getting-started/Faq.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
content-class="v-data-iterator--faq"
hide-actions
>
<template slot="item" slot-scope="{ item: gotcha, index }">
<template v-slot:item="{ item: gotcha, index }">
<div class="mb-5">
<core-goto :id="`question-${index + 1}`">
<doc-markdown :code="gotcha.q" />
Expand Down
17 changes: 9 additions & 8 deletions packages/docs/src/components/getting-started/Roadmap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
v-if="typeof item === 'number'"
:key="`divider-${i}`"
>
<span slot="opposite">
Completed
</span>
<template v-slot:opposite>
<span>Completed</span>
</template>
</v-timeline-item>
<v-timeline-item
v-else-if="index == null || index >= i"
Expand All @@ -21,11 +21,12 @@
:small="item.complete || item.small"
fill-dot
>
<strong
slot="opposite"
:class="index === i ? 'primary--text' : undefined"
v-text="item.caption"
/>
<template v-slot:opposite>
<strong
:class="index === i ? 'primary--text' : undefined"
v-text="item.caption"
/>
</template>
<v-card
:class="`elevation-${item.value ? 8 : 1}`"
:hover="!item.complete"
Expand Down
34 changes: 19 additions & 15 deletions packages/docs/src/components/themes/Premium.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,22 +48,26 @@
top
right
>
<v-tooltip
slot="activator"
bottom
>
<v-btn
slot="activator"
:href="template.demoUrl.length === 1 ? `${template.demoUrl[0]}?ref=vuetifyjs.com` : undefined"
icon
target="_blank"
rel="noopener"
aria-label="View Demo"
<template #activator="{ on: menu }">
<v-tooltip
bottom
v-on="{ ...menu }"
MajesticPotatoe marked this conversation as resolved.
Show resolved Hide resolved
>
<v-icon color="primary">mdi-eye</v-icon>
</v-btn>
<span v-text="$t('Themes.Premium.viewDemo')" />
</v-tooltip>
<template #activator="{ on: menu }">
<v-btn
:href="template.demoUrl.length === 1 ? `${template.demoUrl[0]}?ref=vuetifyjs.com` : undefined"
icon
target="_blank"
rel="noopener"
aria-label="View Demo"
v-on="{ ...tooltip }"
>
<v-icon color="primary">mdi-eye</v-icon>
</v-btn>
</template>
<span v-text="$t('Themes.Premium.viewDemo')" />
</v-tooltip>
</template>
<v-list v-if="template.demoUrl.length > 1">
<v-list-tile
v-for="([title, demo], i) in template.demoUrl"
Expand Down
33 changes: 14 additions & 19 deletions packages/docs/src/examples/autocompletes/advanced.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,15 @@
label="Search for a coin..."
solo
>
<template slot="no-data">
<template v-slot:no-data>
<v-list-tile>
<v-list-tile-title>
Search for your favorite
<strong>Cryptocurrency</strong>
</v-list-tile-title>
</v-list-tile>
</template>
<template
slot="selection"
slot-scope="{ item, selected }"
>
<template v-slot:selection="{ item, selected }">
<v-chip
:selected="selected"
color="blue-grey"
Expand All @@ -41,10 +38,7 @@
<span v-text="item.name"></span>
</v-chip>
</template>
<template
slot="item"
slot-scope="{ item }"
>
<template v-slot:item="{ item }">
<v-list-tile-avatar
color="indigo"
class="headline font-weight-light white--text"
Expand All @@ -60,16 +54,17 @@
</v-list-tile-action>
</template>
</v-autocomplete>
<v-tabs
slot="extension"
:hide-slider="!model"
color="transparent"
slider-color="blue-grey"
>
<v-tab :disabled="!model">News</v-tab>
<v-tab :disabled="!model">Trading</v-tab>
<v-tab :disabled="!model">Blog</v-tab>
</v-tabs>
<template v-slot:extension>
<v-tabs
:hide-slider="!model"
color="transparent"
slider-color="blue-grey"
>
<v-tab :disabled="!model">News</v-tab>
<v-tab :disabled="!model">Trading</v-tab>
<v-tab :disabled="!model">Blog</v-tab>
</v-tabs>
</template>
</v-toolbar>
</template>

Expand Down
24 changes: 10 additions & 14 deletions packages/docs/src/examples/autocompletes/scopedSlots.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,14 @@
left
transition="slide-y-transition"
>
<v-btn
slot="activator"
icon
>
<v-icon>more_vert</v-icon>
</v-btn>
<template #activator="{ on: menu }">
<v-btn
icon
v-on="{ ...menu }"
>
<v-icon>more_vert</v-icon>
</v-btn>
</template>
<v-list>
<v-list-tile @click="isUpdating = true">
<v-list-tile-action>
Expand Down Expand Up @@ -89,10 +91,7 @@
item-value="name"
multiple
>
<template
slot="selection"
slot-scope="data"
>
<template v-slot:selection="data">
<v-chip
:selected="data.selected"
close
Expand All @@ -105,10 +104,7 @@
{{ data.item.name }}
</v-chip>
</template>
<template
slot="item"
slot-scope="data"
>
<template v-slot:item="data">
<template v-if="typeof data.item !== 'object'">
<v-list-tile-content v-text="data.item"></v-list-tile-content>
</template>
Expand Down
Loading