-
Notifications
You must be signed in to change notification settings - Fork 634
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/useOverlayManager' of https://github.com/genu/ui …
…into feature/useOverlayManager
- Loading branch information
Showing
326 changed files
with
3,006 additions
and
370 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
docs/app/components/content/examples/tree/TreeCustomSlotExample.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<script setup lang="ts"> | ||
import type { TreeItem } from '@nuxt/ui' | ||
const items: TreeItem[] = [ | ||
{ | ||
label: 'app/', | ||
slot: 'app', | ||
defaultExpanded: true, | ||
children: [{ | ||
label: 'composables/', | ||
children: [ | ||
{ label: 'useAuth.ts', icon: 'i-vscode-icons-file-type-typescript' }, | ||
{ label: 'useUser.ts', icon: 'i-vscode-icons-file-type-typescript' } | ||
] | ||
}, | ||
{ | ||
label: 'components/', | ||
defaultExpanded: true, | ||
children: [ | ||
{ label: 'Card.vue', icon: 'i-vscode-icons-file-type-vue' }, | ||
{ label: 'Button.vue', icon: 'i-vscode-icons-file-type-vue' } | ||
] | ||
}] | ||
}, | ||
{ label: 'app.vue', icon: 'i-vscode-icons-file-type-vue' }, | ||
{ label: 'nuxt.config.ts', icon: 'i-vscode-icons-file-type-nuxt' } | ||
] | ||
</script> | ||
|
||
<template> | ||
<UTree :items="items"> | ||
<template #app="{ item }"> | ||
<p class="italic font-bold"> | ||
{{ item.label }} | ||
</p> | ||
</template> | ||
</UTree> | ||
</template> |
34 changes: 34 additions & 0 deletions
34
docs/app/components/content/examples/tree/TreeExpandedExample.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<script setup lang="ts"> | ||
import type { TreeItem } from '@nuxt/ui' | ||
const items: TreeItem[] = [ | ||
{ | ||
label: 'app/', | ||
value: 'app', | ||
children: [{ | ||
label: 'composables/', | ||
value: 'composables', | ||
children: [ | ||
{ label: 'useAuth.ts', icon: 'i-vscode-icons-file-type-typescript' }, | ||
{ label: 'useUser.ts', icon: 'i-vscode-icons-file-type-typescript' } | ||
] | ||
}, | ||
{ | ||
label: 'components/', | ||
value: 'components', | ||
children: [ | ||
{ label: 'Card.vue', icon: 'i-vscode-icons-file-type-vue' }, | ||
{ label: 'Button.vue', icon: 'i-vscode-icons-file-type-vue' } | ||
] | ||
}] | ||
}, | ||
{ label: 'app.vue', icon: 'i-vscode-icons-file-type-vue' }, | ||
{ label: 'nuxt.config.ts', icon: 'i-vscode-icons-file-type-nuxt' } | ||
] | ||
const expanded = ref(['app', 'composables']) | ||
</script> | ||
|
||
<template> | ||
<UTree v-model:expanded="expanded" :items="items" /> | ||
</template> |
33 changes: 33 additions & 0 deletions
33
docs/app/components/content/examples/tree/TreeModelValueExample.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<script setup lang="ts"> | ||
import type { TreeItem } from '@nuxt/ui' | ||
const items: TreeItem[] = [ | ||
{ | ||
label: 'app/', | ||
defaultExpanded: true, | ||
children: [{ | ||
label: 'composables/', | ||
children: [ | ||
{ label: 'useAuth.ts', icon: 'i-vscode-icons-file-type-typescript' }, | ||
{ label: 'useUser.ts', icon: 'i-vscode-icons-file-type-typescript' } | ||
] | ||
}, | ||
{ | ||
label: 'components/', | ||
defaultExpanded: true, | ||
children: [ | ||
{ label: 'Card.vue', icon: 'i-vscode-icons-file-type-vue' }, | ||
{ label: 'Button.vue', icon: 'i-vscode-icons-file-type-vue' } | ||
] | ||
}] | ||
}, | ||
{ label: 'app.vue', icon: 'i-vscode-icons-file-type-vue' }, | ||
{ label: 'nuxt.config.ts', icon: 'i-vscode-icons-file-type-nuxt' } | ||
] | ||
const value = ref(items[items.length - 1]) | ||
</script> | ||
|
||
<template> | ||
<UTree v-model="value" :items="items" /> | ||
</template> |
34 changes: 34 additions & 0 deletions
34
docs/app/components/content/examples/tree/TreeOnSelectExample.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<script setup lang="ts"> | ||
import type { TreeItem } from '@nuxt/ui' | ||
const items: TreeItem[] = [ | ||
{ | ||
label: 'app/', | ||
defaultExpanded: true, | ||
onSelect: (e: Event) => { | ||
e.preventDefault() | ||
}, | ||
children: [{ | ||
label: 'composables/', | ||
children: [ | ||
{ label: 'useAuth.ts', icon: 'i-vscode-icons-file-type-typescript' }, | ||
{ label: 'useUser.ts', icon: 'i-vscode-icons-file-type-typescript' } | ||
] | ||
}, | ||
{ | ||
label: 'components/', | ||
defaultExpanded: true, | ||
children: [ | ||
{ label: 'Card.vue', icon: 'i-vscode-icons-file-type-vue' }, | ||
{ label: 'Button.vue', icon: 'i-vscode-icons-file-type-vue' } | ||
] | ||
}] | ||
}, | ||
{ label: 'app.vue', icon: 'i-vscode-icons-file-type-vue' }, | ||
{ label: 'nuxt.config.ts', icon: 'i-vscode-icons-file-type-nuxt' } | ||
] | ||
</script> | ||
|
||
<template> | ||
<UTree :items="items" /> | ||
</template> |
34 changes: 34 additions & 0 deletions
34
docs/app/components/content/examples/tree/TreeOnToggleExample.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<script setup lang="ts"> | ||
import type { TreeItem } from '@nuxt/ui' | ||
const items: TreeItem[] = [ | ||
{ | ||
label: 'app/', | ||
defaultExpanded: true, | ||
onToggle: (e: Event) => { | ||
e.preventDefault() | ||
}, | ||
children: [{ | ||
label: 'composables/', | ||
children: [ | ||
{ label: 'useAuth.ts', icon: 'i-vscode-icons-file-type-typescript' }, | ||
{ label: 'useUser.ts', icon: 'i-vscode-icons-file-type-typescript' } | ||
] | ||
}, | ||
{ | ||
label: 'components/', | ||
defaultExpanded: true, | ||
children: [ | ||
{ label: 'Card.vue', icon: 'i-vscode-icons-file-type-vue' }, | ||
{ label: 'Button.vue', icon: 'i-vscode-icons-file-type-vue' } | ||
] | ||
}] | ||
}, | ||
{ label: 'app.vue', icon: 'i-vscode-icons-file-type-vue' }, | ||
{ label: 'nuxt.config.ts', icon: 'i-vscode-icons-file-type-nuxt' } | ||
] | ||
</script> | ||
|
||
<template> | ||
<UTree :items="items" /> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.