Skip to content

Commit

Permalink
docs: demos updated
Browse files Browse the repository at this point in the history
  • Loading branch information
jd-solanki committed Dec 4, 2022
1 parent d7200d1 commit 298c1a7
Show file tree
Hide file tree
Showing 13 changed files with 64 additions and 51 deletions.
8 changes: 4 additions & 4 deletions docs/demos/list/DemoListBasic.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<script lang="ts" setup>
const items = [
{ title: 'Donut jujubes' },
{ title: 'Sesame snaps' },
{ title: 'I love jelly' },
{ title: 'Cake gummi', disable: true },
{ text: 'Donut jujubes' },
{ text: 'Sesame snaps' },
{ text: 'I love jelly' },
{ text: 'Cake gummi', disable: true },
]
</script>

Expand Down
7 changes: 4 additions & 3 deletions docs/demos/list/DemoListSlots.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,20 @@ const items = [
<template #append="{ index }">
<ABtn
variant="outline"
class="text-[0.6rem] font-semibold opacity-50"
class="text-sm opacity-35 min-h-[24px]"
color="default"
:states="false"
:spacing="50"
>
Shift + {{ index + 1 }}
&#8984; + {{ index + 1 }}
</ABtn>
</template>

<!-- 馃憠 Slot: After -->
<template #after>
<hr class="my-2">
<AList
:items="[{ text: '4 items found' }]"
:items="[{ subtitle: '4 items found' }]"
class="my-0 opacity-75"
/>
</template>
Expand Down
22 changes: 14 additions & 8 deletions docs/demos/list/DemoListVModelSupport.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
import { ref } from 'vue'
const items = [
{ title: 'Donut jujubes' },
{ title: 'Sesame snaps' },
{ title: 'I love jelly' },
{ title: 'Cake gummi', disable: true },
{ text: 'Donut jujubes' },
{ text: 'Sesame snaps' },
{ text: 'I love jelly' },
{ text: 'Cake gummi', disable: true },
]
const itemsPropSelection = ref(0)
Expand All @@ -23,7 +23,10 @@ const slotSelection = ref(0)
>
<template #after>
<hr class="my-2">
<AList :items="[{ text: `Selected: ${itemsPropSelection}` }]" />
<AList
class="mb-0"
:items="[{ subtitle: `Selected: ${itemsPropSelection}` }]"
/>
</template>
</AList>
</ACard>
Expand All @@ -38,8 +41,8 @@ const slotSelection = ref(0)
<template #default="{ handleListItemClick }">
<AListItem
v-for="(item, index) in items"
:key="item.title"
:title="item.title"
:key="item.text"
:text="item.text"
:value="index"
:disable="item.disable"
:is-active="slotSelection === index"
Expand All @@ -48,7 +51,10 @@ const slotSelection = ref(0)
</template>
<template #after>
<hr class="my-2">
<AList :items="[{ text: `Selected: ${slotSelection}` }]" />
<AList
class="mb-0"
:items="[{ subtitle: `Selected: ${slotSelection}` }]"
/>
</template>
</AList>
</ACard>
Expand Down
8 changes: 4 additions & 4 deletions docs/demos/list/DemoListVariants.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
import { ref } from 'vue'
const items = [
{ title: 'Donut jujubes' },
{ title: 'Sesame snaps' },
{ title: 'I love jelly' },
{ title: 'Cake gummi', disable: true },
{ text: 'Donut jujubes' },
{ text: 'Sesame snaps' },
{ text: 'I love jelly' },
{ text: 'Cake gummi', disable: true },
]
const selected = ref(0)
Expand Down
8 changes: 4 additions & 4 deletions docs/demos/menu/DemoMenuBasic.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<script lang="ts" setup>
const items = [
{ title: 'Donut jujubes' },
{ title: 'Sesame snaps' },
{ title: 'I love jelly' },
{ title: 'Cake gummi', disable: true },
{ text: 'Donut jujubes' },
{ text: 'Sesame snaps' },
{ text: 'I love jelly' },
{ text: 'Cake gummi', disable: true },
]
</script>

Expand Down
8 changes: 4 additions & 4 deletions docs/demos/menu/DemoMenuMiddleware.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<script lang="ts" setup>
const items = [
{ title: 'Donut jujubes' },
{ title: 'Sesame snaps' },
{ title: 'I love jelly' },
{ title: 'Cake gummi', disable: true },
{ text: 'Donut jujubes' },
{ text: 'Sesame snaps' },
{ text: 'I love jelly' },
{ text: 'Cake gummi', disable: true },
]
const middleware = (referenceEl: HTMLElement, floatingEl: HTMLElement) => {
Expand Down
8 changes: 4 additions & 4 deletions docs/demos/menu/DemoMenuPersistence.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<script lang="ts" setup>
const items = [
{ title: 'Donut jujubes' },
{ title: 'Sesame snaps' },
{ title: 'I love jelly' },
{ title: 'Cake gummi', disable: true },
{ text: 'Donut jujubes' },
{ text: 'Sesame snaps' },
{ text: 'I love jelly' },
{ text: 'Cake gummi', disable: true },
]
</script>

Expand Down
8 changes: 4 additions & 4 deletions docs/demos/menu/DemoMenuPlacement.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
import { ref } from 'vue'
const items = [
{ title: 'Donut jujubes' },
{ title: 'Sesame snaps' },
{ title: 'I love jelly' },
{ title: 'Cake gummi', disable: true },
{ text: 'Donut jujubes' },
{ text: 'Sesame snaps' },
{ text: 'I love jelly' },
{ text: 'Cake gummi', disable: true },
]
const menuPlacement = ref('bottom-start')
Expand Down
8 changes: 4 additions & 4 deletions docs/demos/menu/DemoMenuStrategy.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<script lang="ts" setup>
const items = [
{ title: 'Donut jujubes' },
{ title: 'Sesame snaps' },
{ title: 'I love jelly' },
{ title: 'Cake gummi', disable: true },
{ text: 'Donut jujubes' },
{ text: 'Sesame snaps' },
{ text: 'I love jelly' },
{ text: 'Cake gummi', disable: true },
]
</script>

Expand Down
8 changes: 4 additions & 4 deletions docs/demos/menu/DemoMenuTransition.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<script lang="ts" setup>
const items = [
{ title: 'Donut jujubes' },
{ title: 'Sesame snaps' },
{ title: 'I love jelly' },
{ title: 'Cake gummi', disable: true },
{ text: 'Donut jujubes' },
{ text: 'Sesame snaps' },
{ text: 'I love jelly' },
{ text: 'Cake gummi', disable: true },
]
</script>

Expand Down
8 changes: 4 additions & 4 deletions docs/demos/menu/DemoMenuTrigger.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<script lang="ts" setup>
const items = [
{ title: 'Donut jujubes' },
{ title: 'Sesame snaps' },
{ title: 'I love jelly' },
{ title: 'Cake gummi', disable: true },
{ text: 'Donut jujubes' },
{ text: 'Sesame snaps' },
{ text: 'I love jelly' },
{ text: 'Cake gummi', disable: true },
]
</script>

Expand Down
8 changes: 4 additions & 4 deletions docs/demos/menu/DemoMenuVModelSupport.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
import { ref } from 'vue'
const items = [
{ title: 'Donut jujubes' },
{ title: 'Sesame snaps' },
{ title: 'I love jelly' },
{ title: 'Cake gummi', disable: true },
{ text: 'Donut jujubes' },
{ text: 'Sesame snaps' },
{ text: 'I love jelly' },
{ text: 'Cake gummi', disable: true },
]
const isMenuVisible = ref(false)
Expand Down
6 changes: 6 additions & 0 deletions docs/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
"types": [
"anu-vue/volar"
],
"lib": [
"esnext",
"dom",
"dom.iterable",
"scripthost"
],
"paths": {
"@anu-vue/*": [
"../packages/anu-vue/*"
Expand Down

0 comments on commit 298c1a7

Please sign in to comment.