fulldev-ui 0.7.0-beta.1 → 0.7.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/package.json +1 -3
  2. package/src/blocks/Header.astro +8 -3
  3. package/src/blocks/ProductSingle1.astro +2 -3
  4. package/src/components/Block.astro +46 -0
  5. package/src/schemas/blocks/productSingle.ts +2 -0
  6. package/src/components/Collapsible.vue +0 -21
  7. package/src/components/Tabs.vue +0 -17
  8. package/src/components/Toolbar.vue +0 -115
  9. package/src/components/ui/menubar/Menubar.vue +0 -25
  10. package/src/components/ui/menubar/MenubarCheckboxItem.vue +0 -42
  11. package/src/components/ui/menubar/MenubarContent.vue +0 -35
  12. package/src/components/ui/menubar/MenubarGroup.vue +0 -11
  13. package/src/components/ui/menubar/MenubarItem.vue +0 -32
  14. package/src/components/ui/menubar/MenubarLabel.vue +0 -13
  15. package/src/components/ui/menubar/MenubarMenu.vue +0 -11
  16. package/src/components/ui/menubar/MenubarRadioGroup.vue +0 -20
  17. package/src/components/ui/menubar/MenubarRadioItem.vue +0 -42
  18. package/src/components/ui/menubar/MenubarSeparator.vue +0 -22
  19. package/src/components/ui/menubar/MenubarShortcut.vue +0 -14
  20. package/src/components/ui/menubar/MenubarSub.vue +0 -19
  21. package/src/components/ui/menubar/MenubarSubContent.vue +0 -39
  22. package/src/components/ui/menubar/MenubarSubTrigger.vue +0 -32
  23. package/src/components/ui/menubar/MenubarTrigger.vue +0 -29
  24. package/src/components/ui/menubar/index.ts +0 -15
  25. package/src/components/ui/tabs/Tabs.vue +0 -15
  26. package/src/components/ui/tabs/TabsContent.vue +0 -27
  27. package/src/components/ui/tabs/TabsList.vue +0 -22
  28. package/src/components/ui/tabs/TabsTrigger.vue +0 -31
  29. package/src/components/ui/tabs/index.ts +0 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fulldev-ui",
3
- "version": "0.7.0-beta.1",
3
+ "version": "0.7.0-beta.2",
4
4
  "description": "A component library built for Astro",
5
5
  "homepage": "https://ui.full.dev",
6
6
  "bugs": "https://github.com/fulldotdev/ui/issues",
@@ -43,13 +43,11 @@
43
43
  "./components/ui/dialog": "./src/components/ui/dialog/index.ts",
44
44
  "./components/ui/drawer": "./src/components/ui/drawer/index.ts",
45
45
  "./components/ui/form": "./src/components/ui/form/index.ts",
46
- "./components/ui/menubar": "./src/components/ui/menubar/index.ts",
47
46
  "./components/ui/navigation-menu": "./src/components/ui/navigation-menu/index.ts",
48
47
  "./components/ui/popover": "./src/components/ui/popover/index.ts",
49
48
  "./components/ui/radio-group": "./src/components/ui/radio-group/index.ts",
50
49
  "./components/ui/seperator": "./src/components/ui/seperator/index.ts",
51
50
  "./components/ui/switch": "./src/components/ui/switch/index.ts",
52
- "./components/ui/tabs": "./src/components/ui/tabs/index.ts",
53
51
  "./components/ui/command": "./src/components/ui/command/index.ts",
54
52
  "./components/ui/input": "./src/components/ui/input/index.ts",
55
53
  "./components/ui/label": "./src/components/ui/label/index.ts",
@@ -12,9 +12,11 @@ import Search from 'fulldev-ui/components/Search.vue'
12
12
  import Socials from 'fulldev-ui/components/Socials.astro'
13
13
  import type { HeaderSchema } from 'fulldev-ui/schemas/blocks/header'
14
14
 
15
- interface Props extends HeaderSchema {}
15
+ interface Props extends HeaderSchema {
16
+ search?: any
17
+ }
16
18
 
17
- const { logo, menus, socials, buttons } = Astro.props
19
+ const { logo, menus, socials, buttons, search } = Astro.props
18
20
  ---
19
21
 
20
22
  <Box
@@ -31,7 +33,10 @@ const { logo, menus, socials, buttons } = Astro.props
31
33
  />
32
34
  </Box>
33
35
  <Box class="inline-flex items-center gap-2">
34
- <Search client:load />
36
+ <Search
37
+ client:load
38
+ groups={search}
39
+ />
35
40
  <Socials {socials} />
36
41
  <Buttons
37
42
  class="max-sm:hidden"
@@ -14,7 +14,7 @@ import type { ProductSingleSchema } from 'fulldev-ui/schemas/blocks/productSingl
14
14
 
15
15
  interface Props extends ProductSingleSchema {}
16
16
 
17
- const { title, description, list, images, price } = Astro.props
17
+ const { title, description, list, images, price, button } = Astro.props
18
18
  ---
19
19
 
20
20
  <Section class="pt-4 lg:pt-16">
@@ -49,8 +49,7 @@ const { title, description, list, images, price } = Astro.props
49
49
  <Button
50
50
  class="mt-4"
51
51
  size="lg"
52
- text="In winkelwagen"
53
- icon="shopping-cart"
52
+ {...button}
54
53
  />
55
54
  <List
56
55
  class="pt-4 text-muted-foreground"
@@ -0,0 +1,46 @@
1
+ ---
2
+ // @ts-nocheck
3
+ // FIXME
4
+ import { getEntries } from 'astro:content'
5
+
6
+ // interface Props extends BlockSchema {}
7
+
8
+ let { block, cards, pages, categories, products, ...rest } = Astro.props
9
+
10
+ const blocks = {
11
+ ...import.meta.glob('/src/blocks/**/*.astro'),
12
+ ...import.meta.glob('../blocks/**/*.astro'),
13
+ }
14
+
15
+ const path = Object.keys(blocks).find((path) => path.split('/').pop()?.split('.')[0] === block)
16
+
17
+ const BlockComponent = path && (await (blocks[path] as any)()).default
18
+
19
+ const categoriesEntries =
20
+ categories &&
21
+ (await getEntries(categories)).map((category) => ({
22
+ slug: category.id,
23
+ ...category.data,
24
+ }))
25
+
26
+ const productsEntries =
27
+ products &&
28
+ (await getEntries(products)).map((product) => ({
29
+ slug: product.id,
30
+ ...product.data,
31
+ }))
32
+ ---
33
+
34
+ {
35
+ BlockComponent && (
36
+ <BlockComponent
37
+ {cards}
38
+ {pages}
39
+ categories={categoriesEntries}
40
+ products={productsEntries}
41
+ {...rest}
42
+ >
43
+ <slot />
44
+ </BlockComponent>
45
+ )
46
+ }
@@ -1,5 +1,6 @@
1
1
  import { reference, z } from 'astro:content'
2
2
  import { imageSchema } from 'fulldev-ui/schemas/fields/image.ts'
3
+ import { buttonSchema } from '../fields/button'
3
4
 
4
5
  export const productSingleSchema = z
5
6
  .object({
@@ -9,6 +10,7 @@ export const productSingleSchema = z
9
10
  images: imageSchema.array().optional(),
10
11
  price: z.number().optional(),
11
12
  category: reference('categories').optional(),
13
+ button: buttonSchema.optional(),
12
14
  })
13
15
  .strict()
14
16
 
@@ -1,21 +0,0 @@
1
- <script setup lang="ts">
2
- import { Collapsible, CollapsibleContent, CollapsibleTrigger } from 'fulldev-ui/components/ui/collapsible'
3
- import { ref } from 'vue'
4
-
5
- const isOpen = ref(false)
6
- </script>
7
-
8
- <template>
9
- <Collapsible v-model:open="isOpen">
10
- <CollapsibleTrigger as-child>
11
- <div
12
- class="max-h-40 overflow-hidden bg-gradient-to-b from-foreground via-foreground text-transparent to-transparent bg-clip-text"
13
- >
14
- <slot />
15
- </div>
16
- </CollapsibleTrigger>
17
- <CollapsibleContent class="-mt-40">
18
- <slot />
19
- </CollapsibleContent>
20
- </Collapsible>
21
- </template>
@@ -1,17 +0,0 @@
1
- <script setup lang="ts">
2
- import { Tabs, TabsContent, TabsList, TabsTrigger } from 'fulldev-ui/components/ui/tabs'
3
- </script>
4
-
5
- <template>
6
- <Tabs
7
- default-value="account"
8
- class="w-[400px]"
9
- >
10
- <TabsList class="grid w-full grid-cols-2">
11
- <TabsTrigger value="account"> Account </TabsTrigger>
12
- <TabsTrigger value="password"> Password </TabsTrigger>
13
- </TabsList>
14
- <TabsContent value="account"> Account </TabsContent>
15
- <TabsContent value="password"> Password </TabsContent>
16
- </Tabs>
17
- </template>
@@ -1,115 +0,0 @@
1
- <script setup lang="ts">
2
- import {
3
- Menubar,
4
- MenubarCheckboxItem,
5
- MenubarContent,
6
- MenubarItem,
7
- MenubarMenu,
8
- MenubarRadioGroup,
9
- MenubarRadioItem,
10
- MenubarSeparator,
11
- MenubarShortcut,
12
- MenubarSub,
13
- MenubarSubContent,
14
- MenubarSubTrigger,
15
- MenubarTrigger,
16
- } from 'fulldev-ui/components/ui/menubar'
17
-
18
- interface Props {
19
- sort?: {
20
- name: string
21
- options: {
22
- label: string
23
- value: string
24
- }[]
25
- }
26
- filters?: {
27
- name: string
28
- options: {
29
- label: string
30
- value: string
31
- }[]
32
- }[]
33
- }
34
-
35
- const { sort, filters } = defineProps<Props>()
36
- </script>
37
-
38
- <template>
39
- <Menubar>
40
- <MenubarMenu>
41
- <MenubarTrigger>File</MenubarTrigger>
42
- <MenubarContent>
43
- <MenubarItem> New Tab <MenubarShortcut>⌘T</MenubarShortcut> </MenubarItem>
44
- <MenubarItem> New Window <MenubarShortcut>⌘N</MenubarShortcut> </MenubarItem>
45
- <MenubarItem disabled> New Incognito Window </MenubarItem>
46
- <MenubarSeparator />
47
- <MenubarSub>
48
- <MenubarSubTrigger>Share</MenubarSubTrigger>
49
- <MenubarSubContent>
50
- <MenubarItem>Email link</MenubarItem>
51
- <MenubarItem>Messages</MenubarItem>
52
- <MenubarItem>Notes</MenubarItem>
53
- </MenubarSubContent>
54
- </MenubarSub>
55
- <MenubarSeparator />
56
- <MenubarItem> Print... <MenubarShortcut>⌘P</MenubarShortcut> </MenubarItem>
57
- </MenubarContent>
58
- </MenubarMenu>
59
- <MenubarMenu>
60
- <MenubarTrigger>Edit</MenubarTrigger>
61
- <MenubarContent>
62
- <MenubarItem> Undo <MenubarShortcut>⌘Z</MenubarShortcut> </MenubarItem>
63
- <MenubarItem> Redo <MenubarShortcut>⇧⌘Z</MenubarShortcut> </MenubarItem>
64
- <MenubarSeparator />
65
- <MenubarSub>
66
- <MenubarSubTrigger>Find</MenubarSubTrigger>
67
- <MenubarSubContent>
68
- <MenubarItem>Search the web</MenubarItem>
69
- <MenubarSeparator />
70
- <MenubarItem>Find...</MenubarItem>
71
- <MenubarItem>Find Next</MenubarItem>
72
- <MenubarItem>Find Previous</MenubarItem>
73
- </MenubarSubContent>
74
- </MenubarSub>
75
- <MenubarSeparator />
76
- <MenubarItem>Cut</MenubarItem>
77
- <MenubarItem>Copy</MenubarItem>
78
- <MenubarItem>Paste</MenubarItem>
79
- </MenubarContent>
80
- </MenubarMenu>
81
- <MenubarMenu>
82
- <MenubarTrigger>View</MenubarTrigger>
83
- <MenubarContent>
84
- <MenubarCheckboxItem>Always Show Bookmarks Bar</MenubarCheckboxItem>
85
- <MenubarCheckboxItem checked> Always Show Full URLs </MenubarCheckboxItem>
86
- <MenubarSeparator />
87
- <MenubarItem inset> Reload <MenubarShortcut>⌘R</MenubarShortcut> </MenubarItem>
88
- <MenubarItem
89
- disabled
90
- inset
91
- >
92
- Force Reload <MenubarShortcut>⇧⌘R</MenubarShortcut>
93
- </MenubarItem>
94
- <MenubarSeparator />
95
- <MenubarItem inset> Toggle Fullscreen </MenubarItem>
96
- <MenubarSeparator />
97
- <MenubarItem inset> Hide Sidebar </MenubarItem>
98
- </MenubarContent>
99
- </MenubarMenu>
100
- <MenubarMenu>
101
- <MenubarTrigger>Profiles</MenubarTrigger>
102
- <MenubarContent>
103
- <MenubarRadioGroup value="benoit">
104
- <MenubarRadioItem value="andy"> Andy </MenubarRadioItem>
105
- <MenubarRadioItem value="benoit"> Benoit </MenubarRadioItem>
106
- <MenubarRadioItem value="Luis"> Luis </MenubarRadioItem>
107
- </MenubarRadioGroup>
108
- <MenubarSeparator />
109
- <MenubarItem inset> Edit... </MenubarItem>
110
- <MenubarSeparator />
111
- <MenubarItem inset> Add Profile... </MenubarItem>
112
- </MenubarContent>
113
- </MenubarMenu>
114
- </Menubar>
115
- </template>
@@ -1,25 +0,0 @@
1
- <script setup lang="ts">
2
- import { cn } from 'fulldev-ui/lib/utils'
3
- import { MenubarRoot, type MenubarRootEmits, type MenubarRootProps, useForwardPropsEmits } from 'radix-vue'
4
- import { computed, type HTMLAttributes } from 'vue'
5
-
6
- const props = defineProps<MenubarRootProps & { class?: HTMLAttributes['class'] }>()
7
- const emits = defineEmits<MenubarRootEmits>()
8
-
9
- const delegatedProps = computed(() => {
10
- const { class: _, ...delegated } = props
11
-
12
- return delegated
13
- })
14
-
15
- const forwarded = useForwardPropsEmits(delegatedProps, emits)
16
- </script>
17
-
18
- <template>
19
- <MenubarRoot
20
- v-bind="forwarded"
21
- :class="cn('flex h-10 items-center gap-x-1 rounded-md border bg-background p-1', props.class)"
22
- >
23
- <slot />
24
- </MenubarRoot>
25
- </template>
@@ -1,42 +0,0 @@
1
- <script setup lang="ts">
2
- import { cn } from 'fulldev-ui/lib/utils'
3
- import { Check } from 'lucide-vue-next'
4
- import {
5
- MenubarCheckboxItem,
6
- type MenubarCheckboxItemEmits,
7
- type MenubarCheckboxItemProps,
8
- MenubarItemIndicator,
9
- useForwardPropsEmits,
10
- } from 'radix-vue'
11
- import { computed, type HTMLAttributes } from 'vue'
12
-
13
- const props = defineProps<MenubarCheckboxItemProps & { class?: HTMLAttributes['class'] }>()
14
- const emits = defineEmits<MenubarCheckboxItemEmits>()
15
-
16
- const delegatedProps = computed(() => {
17
- const { class: _, ...delegated } = props
18
-
19
- return delegated
20
- })
21
-
22
- const forwarded = useForwardPropsEmits(delegatedProps, emits)
23
- </script>
24
-
25
- <template>
26
- <MenubarCheckboxItem
27
- v-bind="forwarded"
28
- :class="
29
- cn(
30
- 'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
31
- props.class
32
- )
33
- "
34
- >
35
- <span class="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
36
- <MenubarItemIndicator>
37
- <Check class="w-4 h-4" />
38
- </MenubarItemIndicator>
39
- </span>
40
- <slot />
41
- </MenubarCheckboxItem>
42
- </template>
@@ -1,35 +0,0 @@
1
- <script setup lang="ts">
2
- import { cn } from 'fulldev-ui/lib/utils'
3
- import { MenubarContent, type MenubarContentProps, MenubarPortal, useForwardProps } from 'radix-vue'
4
- import { computed, type HTMLAttributes } from 'vue'
5
-
6
- const props = withDefaults(defineProps<MenubarContentProps & { class?: HTMLAttributes['class'] }>(), {
7
- align: 'start',
8
- alignOffset: -4,
9
- sideOffset: 8,
10
- })
11
-
12
- const delegatedProps = computed(() => {
13
- const { class: _, ...delegated } = props
14
-
15
- return delegated
16
- })
17
-
18
- const forwardedProps = useForwardProps(delegatedProps)
19
- </script>
20
-
21
- <template>
22
- <MenubarPortal>
23
- <MenubarContent
24
- v-bind="forwardedProps"
25
- :class="
26
- cn(
27
- 'z-50 min-w-48 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
28
- props.class
29
- )
30
- "
31
- >
32
- <slot />
33
- </MenubarContent>
34
- </MenubarPortal>
35
- </template>
@@ -1,11 +0,0 @@
1
- <script setup lang="ts">
2
- import { MenubarGroup, type MenubarGroupProps } from 'radix-vue'
3
-
4
- const props = defineProps<MenubarGroupProps>()
5
- </script>
6
-
7
- <template>
8
- <MenubarGroup v-bind="props">
9
- <slot />
10
- </MenubarGroup>
11
- </template>
@@ -1,32 +0,0 @@
1
- <script setup lang="ts">
2
- import { cn } from 'fulldev-ui/lib/utils'
3
- import { MenubarItem, type MenubarItemEmits, type MenubarItemProps, useForwardPropsEmits } from 'radix-vue'
4
- import { computed, type HTMLAttributes } from 'vue'
5
-
6
- const props = defineProps<MenubarItemProps & { class?: HTMLAttributes['class']; inset?: boolean }>()
7
-
8
- const emits = defineEmits<MenubarItemEmits>()
9
-
10
- const delegatedProps = computed(() => {
11
- const { class: _, ...delegated } = props
12
-
13
- return delegated
14
- })
15
-
16
- const forwarded = useForwardPropsEmits(delegatedProps, emits)
17
- </script>
18
-
19
- <template>
20
- <MenubarItem
21
- v-bind="forwarded"
22
- :class="
23
- cn(
24
- 'relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
25
- inset && 'pl-8',
26
- props.class
27
- )
28
- "
29
- >
30
- <slot />
31
- </MenubarItem>
32
- </template>
@@ -1,13 +0,0 @@
1
- <script setup lang="ts">
2
- import { cn } from 'fulldev-ui/lib/utils'
3
- import { MenubarLabel, type MenubarLabelProps } from 'radix-vue'
4
- import type { HTMLAttributes } from 'vue'
5
-
6
- const props = defineProps<MenubarLabelProps & { class?: HTMLAttributes['class']; inset?: boolean }>()
7
- </script>
8
-
9
- <template>
10
- <MenubarLabel :class="cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', props.class)">
11
- <slot />
12
- </MenubarLabel>
13
- </template>
@@ -1,11 +0,0 @@
1
- <script setup lang="ts">
2
- import { MenubarMenu, type MenubarMenuProps } from 'radix-vue'
3
-
4
- const props = defineProps<MenubarMenuProps>()
5
- </script>
6
-
7
- <template>
8
- <MenubarMenu v-bind="props">
9
- <slot />
10
- </MenubarMenu>
11
- </template>
@@ -1,20 +0,0 @@
1
- <script setup lang="ts">
2
- import {
3
- MenubarRadioGroup,
4
- type MenubarRadioGroupEmits,
5
- type MenubarRadioGroupProps,
6
- useForwardPropsEmits,
7
- } from 'radix-vue'
8
-
9
- const props = defineProps<MenubarRadioGroupProps>()
10
-
11
- const emits = defineEmits<MenubarRadioGroupEmits>()
12
-
13
- const forwarded = useForwardPropsEmits(props, emits)
14
- </script>
15
-
16
- <template>
17
- <MenubarRadioGroup v-bind="forwarded">
18
- <slot />
19
- </MenubarRadioGroup>
20
- </template>
@@ -1,42 +0,0 @@
1
- <script setup lang="ts">
2
- import { cn } from 'fulldev-ui/lib/utils'
3
- import { Circle } from 'lucide-vue-next'
4
- import {
5
- MenubarItemIndicator,
6
- MenubarRadioItem,
7
- type MenubarRadioItemEmits,
8
- type MenubarRadioItemProps,
9
- useForwardPropsEmits,
10
- } from 'radix-vue'
11
- import { computed, type HTMLAttributes } from 'vue'
12
-
13
- const props = defineProps<MenubarRadioItemProps & { class?: HTMLAttributes['class'] }>()
14
- const emits = defineEmits<MenubarRadioItemEmits>()
15
-
16
- const delegatedProps = computed(() => {
17
- const { class: _, ...delegated } = props
18
-
19
- return delegated
20
- })
21
-
22
- const forwarded = useForwardPropsEmits(delegatedProps, emits)
23
- </script>
24
-
25
- <template>
26
- <MenubarRadioItem
27
- v-bind="forwarded"
28
- :class="
29
- cn(
30
- 'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
31
- props.class
32
- )
33
- "
34
- >
35
- <span class="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
36
- <MenubarItemIndicator>
37
- <Circle class="h-2 w-2 fill-current" />
38
- </MenubarItemIndicator>
39
- </span>
40
- <slot />
41
- </MenubarRadioItem>
42
- </template>
@@ -1,22 +0,0 @@
1
- <script setup lang="ts">
2
- import { cn } from 'fulldev-ui/lib/utils'
3
- import { MenubarSeparator, type MenubarSeparatorProps, useForwardProps } from 'radix-vue'
4
- import { computed, type HTMLAttributes } from 'vue'
5
-
6
- const props = defineProps<MenubarSeparatorProps & { class?: HTMLAttributes['class'] }>()
7
-
8
- const delegatedProps = computed(() => {
9
- const { class: _, ...delegated } = props
10
-
11
- return delegated
12
- })
13
-
14
- const forwardedProps = useForwardProps(delegatedProps)
15
- </script>
16
-
17
- <template>
18
- <MenubarSeparator
19
- :class="cn('-mx-1 my-1 h-px bg-muted', props.class)"
20
- v-bind="forwardedProps"
21
- />
22
- </template>
@@ -1,14 +0,0 @@
1
- <script setup lang="ts">
2
- import { cn } from 'fulldev-ui/lib/utils'
3
- import type { HTMLAttributes } from 'vue'
4
-
5
- const props = defineProps<{
6
- class?: HTMLAttributes['class']
7
- }>()
8
- </script>
9
-
10
- <template>
11
- <span :class="cn('ml-auto text-xs tracking-widest text-muted-foreground', props.class)">
12
- <slot />
13
- </span>
14
- </template>
@@ -1,19 +0,0 @@
1
- <script setup lang="ts">
2
- import { MenubarSub, type MenubarSubEmits, useForwardPropsEmits } from 'radix-vue'
3
-
4
- interface MenubarSubRootProps {
5
- defaultOpen?: boolean
6
- open?: boolean
7
- }
8
-
9
- const props = defineProps<MenubarSubRootProps>()
10
- const emits = defineEmits<MenubarSubEmits>()
11
-
12
- const forwarded = useForwardPropsEmits(props, emits)
13
- </script>
14
-
15
- <template>
16
- <MenubarSub v-bind="forwarded">
17
- <slot />
18
- </MenubarSub>
19
- </template>
@@ -1,39 +0,0 @@
1
- <script setup lang="ts">
2
- import { cn } from 'fulldev-ui/lib/utils'
3
- import {
4
- MenubarPortal,
5
- MenubarSubContent,
6
- type MenubarSubContentEmits,
7
- type MenubarSubContentProps,
8
- useForwardPropsEmits,
9
- } from 'radix-vue'
10
- import { computed, type HTMLAttributes } from 'vue'
11
-
12
- const props = defineProps<MenubarSubContentProps & { class?: HTMLAttributes['class'] }>()
13
-
14
- const emits = defineEmits<MenubarSubContentEmits>()
15
-
16
- const delegatedProps = computed(() => {
17
- const { class: _, ...delegated } = props
18
-
19
- return delegated
20
- })
21
-
22
- const forwarded = useForwardPropsEmits(delegatedProps, emits)
23
- </script>
24
-
25
- <template>
26
- <MenubarPortal>
27
- <MenubarSubContent
28
- v-bind="forwarded"
29
- :class="
30
- cn(
31
- 'z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
32
- props.class
33
- )
34
- "
35
- >
36
- <slot />
37
- </MenubarSubContent>
38
- </MenubarPortal>
39
- </template>
@@ -1,32 +0,0 @@
1
- <script setup lang="ts">
2
- import { cn } from 'fulldev-ui/lib/utils'
3
- import { ChevronRight } from 'lucide-vue-next'
4
- import { MenubarSubTrigger, type MenubarSubTriggerProps, useForwardProps } from 'radix-vue'
5
- import { computed, type HTMLAttributes } from 'vue'
6
-
7
- const props = defineProps<MenubarSubTriggerProps & { class?: HTMLAttributes['class']; inset?: boolean }>()
8
-
9
- const delegatedProps = computed(() => {
10
- const { class: _, ...delegated } = props
11
-
12
- return delegated
13
- })
14
-
15
- const forwardedProps = useForwardProps(delegatedProps)
16
- </script>
17
-
18
- <template>
19
- <MenubarSubTrigger
20
- v-bind="forwardedProps"
21
- :class="
22
- cn(
23
- 'flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground',
24
- inset && 'pl-8',
25
- props.class
26
- )
27
- "
28
- >
29
- <slot />
30
- <ChevronRight class="ml-auto h-4 w-4" />
31
- </MenubarSubTrigger>
32
- </template>
@@ -1,29 +0,0 @@
1
- <script setup lang="ts">
2
- import { cn } from 'fulldev-ui/lib/utils'
3
- import { MenubarTrigger, type MenubarTriggerProps, useForwardProps } from 'radix-vue'
4
- import { computed, type HTMLAttributes } from 'vue'
5
-
6
- const props = defineProps<MenubarTriggerProps & { class?: HTMLAttributes['class'] }>()
7
-
8
- const delegatedProps = computed(() => {
9
- const { class: _, ...delegated } = props
10
-
11
- return delegated
12
- })
13
-
14
- const forwardedProps = useForwardProps(delegatedProps)
15
- </script>
16
-
17
- <template>
18
- <MenubarTrigger
19
- v-bind="forwardedProps"
20
- :class="
21
- cn(
22
- 'flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground',
23
- props.class
24
- )
25
- "
26
- >
27
- <slot />
28
- </MenubarTrigger>
29
- </template>
@@ -1,15 +0,0 @@
1
- export { default as Menubar } from './Menubar.vue'
2
- export { default as MenubarCheckboxItem } from './MenubarCheckboxItem.vue'
3
- export { default as MenubarContent } from './MenubarContent.vue'
4
- export { default as MenubarGroup } from './MenubarGroup.vue'
5
- export { default as MenubarItem } from './MenubarItem.vue'
6
- export { default as MenubarLabel } from './MenubarLabel.vue'
7
- export { default as MenubarMenu } from './MenubarMenu.vue'
8
- export { default as MenubarRadioGroup } from './MenubarRadioGroup.vue'
9
- export { default as MenubarRadioItem } from './MenubarRadioItem.vue'
10
- export { default as MenubarSeparator } from './MenubarSeparator.vue'
11
- export { default as MenubarShortcut } from './MenubarShortcut.vue'
12
- export { default as MenubarSub } from './MenubarSub.vue'
13
- export { default as MenubarSubContent } from './MenubarSubContent.vue'
14
- export { default as MenubarSubTrigger } from './MenubarSubTrigger.vue'
15
- export { default as MenubarTrigger } from './MenubarTrigger.vue'
@@ -1,15 +0,0 @@
1
- <script setup lang="ts">
2
- import type { TabsRootEmits, TabsRootProps } from 'radix-vue'
3
- import { TabsRoot, useForwardPropsEmits } from 'radix-vue'
4
-
5
- const props = defineProps<TabsRootProps>()
6
- const emits = defineEmits<TabsRootEmits>()
7
-
8
- const forwarded = useForwardPropsEmits(props, emits)
9
- </script>
10
-
11
- <template>
12
- <TabsRoot v-bind="forwarded">
13
- <slot />
14
- </TabsRoot>
15
- </template>
@@ -1,27 +0,0 @@
1
- <script setup lang="ts">
2
- import { cn } from 'fulldev-ui/lib/utils'
3
- import { TabsContent, type TabsContentProps } from 'radix-vue'
4
- import { computed, type HTMLAttributes } from 'vue'
5
-
6
- const props = defineProps<TabsContentProps & { class?: HTMLAttributes['class'] }>()
7
-
8
- const delegatedProps = computed(() => {
9
- const { class: _, ...delegated } = props
10
-
11
- return delegated
12
- })
13
- </script>
14
-
15
- <template>
16
- <TabsContent
17
- :class="
18
- cn(
19
- 'mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2',
20
- props.class
21
- )
22
- "
23
- v-bind="delegatedProps"
24
- >
25
- <slot />
26
- </TabsContent>
27
- </template>
@@ -1,22 +0,0 @@
1
- <script setup lang="ts">
2
- import { cn } from 'fulldev-ui/lib/utils'
3
- import { TabsList, type TabsListProps } from 'radix-vue'
4
- import { computed, type HTMLAttributes } from 'vue'
5
-
6
- const props = defineProps<TabsListProps & { class?: HTMLAttributes['class'] }>()
7
-
8
- const delegatedProps = computed(() => {
9
- const { class: _, ...delegated } = props
10
-
11
- return delegated
12
- })
13
- </script>
14
-
15
- <template>
16
- <TabsList
17
- v-bind="delegatedProps"
18
- :class="cn('inline-flex items-center justify-center rounded-md bg-muted p-1 text-muted-foreground', props.class)"
19
- >
20
- <slot />
21
- </TabsList>
22
- </template>
@@ -1,31 +0,0 @@
1
- <script setup lang="ts">
2
- import { cn } from 'fulldev-ui/lib/utils'
3
- import { TabsTrigger, type TabsTriggerProps, useForwardProps } from 'radix-vue'
4
- import { computed, type HTMLAttributes } from 'vue'
5
-
6
- const props = defineProps<TabsTriggerProps & { class?: HTMLAttributes['class'] }>()
7
-
8
- const delegatedProps = computed(() => {
9
- const { class: _, ...delegated } = props
10
-
11
- return delegated
12
- })
13
-
14
- const forwardedProps = useForwardProps(delegatedProps)
15
- </script>
16
-
17
- <template>
18
- <TabsTrigger
19
- v-bind="forwardedProps"
20
- :class="
21
- cn(
22
- 'inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm',
23
- props.class
24
- )
25
- "
26
- >
27
- <span class="truncate">
28
- <slot />
29
- </span>
30
- </TabsTrigger>
31
- </template>
@@ -1,4 +0,0 @@
1
- export { default as Tabs } from './Tabs.vue'
2
- export { default as TabsContent } from './TabsContent.vue'
3
- export { default as TabsList } from './TabsList.vue'
4
- export { default as TabsTrigger } from './TabsTrigger.vue'