@wordup-md/nuxt-layer-shadcn-unocss 0.2.4 → 0.2.8
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.
- package/components/content/Card.vue +1 -1
- package/components/ui/checkbox/Checkbox.vue +30 -0
- package/components/ui/checkbox/index.ts +1 -0
- package/components/ui/dropdown-menu/DropdownMenu.vue +15 -0
- package/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue +37 -0
- package/components/ui/dropdown-menu/DropdownMenuContent.vue +35 -0
- package/components/ui/dropdown-menu/DropdownMenuGroup.vue +12 -0
- package/components/ui/dropdown-menu/DropdownMenuItem.vue +26 -0
- package/components/ui/dropdown-menu/DropdownMenuLabel.vue +22 -0
- package/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue +19 -0
- package/components/ui/dropdown-menu/DropdownMenuRadioItem.vue +38 -0
- package/components/ui/dropdown-menu/DropdownMenuSeparator.vue +20 -0
- package/components/ui/dropdown-menu/DropdownMenuShortcut.vue +14 -0
- package/components/ui/dropdown-menu/DropdownMenuSub.vue +19 -0
- package/components/ui/dropdown-menu/DropdownMenuSubContent.vue +27 -0
- package/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue +31 -0
- package/components/ui/dropdown-menu/DropdownMenuTrigger.vue +14 -0
- package/components/ui/dropdown-menu/index.ts +16 -0
- package/components/ui/table/Table.vue +16 -0
- package/components/ui/table/TableBody.vue +14 -0
- package/components/ui/table/TableCaption.vue +14 -0
- package/components/ui/table/TableCell.vue +21 -0
- package/components/ui/table/TableEmpty.vue +34 -0
- package/components/ui/table/TableFooter.vue +14 -0
- package/components/ui/table/TableHead.vue +14 -0
- package/components/ui/table/TableHeader.vue +14 -0
- package/components/ui/table/TableRow.vue +14 -0
- package/components/ui/table/index.ts +9 -0
- package/package.json +6 -2
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
inStack && 'mb-0 rounded-none border-none shadow-none',
|
|
8
8
|
['left', 'right'].includes(mediaPosition) && 'flex-row',
|
|
9
9
|
mediaPosition === 'right' && 'flex-row-reverse',
|
|
10
|
-
mediaPosition === 'bottom' && 'flex-col-reverse',
|
|
10
|
+
mediaPosition === 'bottom' && 'flex-col-reverse justify-between',
|
|
11
11
|
['cover', 'center'].includes(mediaPosition) && 'bg-opacity-0',
|
|
12
12
|
mediaPosition === 'center' && 'text-center items-center flex-row p-8',
|
|
13
13
|
]"
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { CheckboxRootEmits, CheckboxRootProps } from "reka-ui"
|
|
3
|
+
import type { HTMLAttributes } from "vue"
|
|
4
|
+
import { reactiveOmit } from "@vueuse/core"
|
|
5
|
+
import { Check } from "lucide-vue-next"
|
|
6
|
+
import { CheckboxIndicator, CheckboxRoot, useForwardPropsEmits } from "reka-ui"
|
|
7
|
+
import { cn } from "@/lib/utils"
|
|
8
|
+
|
|
9
|
+
const props = defineProps<CheckboxRootProps & { class?: HTMLAttributes["class"] }>()
|
|
10
|
+
const emits = defineEmits<CheckboxRootEmits>()
|
|
11
|
+
|
|
12
|
+
const delegatedProps = reactiveOmit(props, "class")
|
|
13
|
+
|
|
14
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<template>
|
|
18
|
+
<CheckboxRoot
|
|
19
|
+
v-bind="forwarded"
|
|
20
|
+
:class="
|
|
21
|
+
cn('peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground',
|
|
22
|
+
props.class)"
|
|
23
|
+
>
|
|
24
|
+
<CheckboxIndicator class="flex h-full w-full items-center justify-center text-current">
|
|
25
|
+
<slot>
|
|
26
|
+
<Check class="h-4 w-4" />
|
|
27
|
+
</slot>
|
|
28
|
+
</CheckboxIndicator>
|
|
29
|
+
</CheckboxRoot>
|
|
30
|
+
</template>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Checkbox } from "./Checkbox.vue"
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { DropdownMenuRootEmits, DropdownMenuRootProps } from "reka-ui"
|
|
3
|
+
import { DropdownMenuRoot, useForwardPropsEmits } from "reka-ui"
|
|
4
|
+
|
|
5
|
+
const props = defineProps<DropdownMenuRootProps>()
|
|
6
|
+
const emits = defineEmits<DropdownMenuRootEmits>()
|
|
7
|
+
|
|
8
|
+
const forwarded = useForwardPropsEmits(props, emits)
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<DropdownMenuRoot v-bind="forwarded">
|
|
13
|
+
<slot />
|
|
14
|
+
</DropdownMenuRoot>
|
|
15
|
+
</template>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { DropdownMenuCheckboxItemEmits, DropdownMenuCheckboxItemProps } from "reka-ui"
|
|
3
|
+
import type { HTMLAttributes } from "vue"
|
|
4
|
+
import { reactiveOmit } from "@vueuse/core"
|
|
5
|
+
import { Check } from "lucide-vue-next"
|
|
6
|
+
import {
|
|
7
|
+
DropdownMenuCheckboxItem,
|
|
8
|
+
|
|
9
|
+
DropdownMenuItemIndicator,
|
|
10
|
+
useForwardPropsEmits,
|
|
11
|
+
} from "reka-ui"
|
|
12
|
+
import { cn } from "@/lib/utils"
|
|
13
|
+
|
|
14
|
+
const props = defineProps<DropdownMenuCheckboxItemProps & { class?: HTMLAttributes["class"] }>()
|
|
15
|
+
const emits = defineEmits<DropdownMenuCheckboxItemEmits>()
|
|
16
|
+
|
|
17
|
+
const delegatedProps = reactiveOmit(props, "class")
|
|
18
|
+
|
|
19
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<template>
|
|
23
|
+
<DropdownMenuCheckboxItem
|
|
24
|
+
v-bind="forwarded"
|
|
25
|
+
:class=" cn(
|
|
26
|
+
'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
|
|
27
|
+
props.class,
|
|
28
|
+
)"
|
|
29
|
+
>
|
|
30
|
+
<span class="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
|
|
31
|
+
<DropdownMenuItemIndicator>
|
|
32
|
+
<Check class="w-4 h-4" />
|
|
33
|
+
</DropdownMenuItemIndicator>
|
|
34
|
+
</span>
|
|
35
|
+
<slot />
|
|
36
|
+
</DropdownMenuCheckboxItem>
|
|
37
|
+
</template>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { DropdownMenuContentEmits, DropdownMenuContentProps } from "reka-ui"
|
|
3
|
+
import type { HTMLAttributes } from "vue"
|
|
4
|
+
import { reactiveOmit } from "@vueuse/core"
|
|
5
|
+
import {
|
|
6
|
+
DropdownMenuContent,
|
|
7
|
+
|
|
8
|
+
DropdownMenuPortal,
|
|
9
|
+
useForwardPropsEmits,
|
|
10
|
+
} from "reka-ui"
|
|
11
|
+
import { cn } from "@/lib/utils"
|
|
12
|
+
|
|
13
|
+
const props = withDefaults(
|
|
14
|
+
defineProps<DropdownMenuContentProps & { class?: HTMLAttributes["class"] }>(),
|
|
15
|
+
{
|
|
16
|
+
sideOffset: 4,
|
|
17
|
+
},
|
|
18
|
+
)
|
|
19
|
+
const emits = defineEmits<DropdownMenuContentEmits>()
|
|
20
|
+
|
|
21
|
+
const delegatedProps = reactiveOmit(props, "class")
|
|
22
|
+
|
|
23
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<template>
|
|
27
|
+
<DropdownMenuPortal>
|
|
28
|
+
<DropdownMenuContent
|
|
29
|
+
v-bind="forwarded"
|
|
30
|
+
:class="cn('z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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', props.class)"
|
|
31
|
+
>
|
|
32
|
+
<slot />
|
|
33
|
+
</DropdownMenuContent>
|
|
34
|
+
</DropdownMenuPortal>
|
|
35
|
+
</template>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { DropdownMenuGroupProps } from "reka-ui"
|
|
3
|
+
import { DropdownMenuGroup } from "reka-ui"
|
|
4
|
+
|
|
5
|
+
const props = defineProps<DropdownMenuGroupProps>()
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<template>
|
|
9
|
+
<DropdownMenuGroup v-bind="props">
|
|
10
|
+
<slot />
|
|
11
|
+
</DropdownMenuGroup>
|
|
12
|
+
</template>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { DropdownMenuItemProps } from "reka-ui"
|
|
3
|
+
import type { HTMLAttributes } from "vue"
|
|
4
|
+
import { reactiveOmit } from "@vueuse/core"
|
|
5
|
+
import { DropdownMenuItem, useForwardProps } from "reka-ui"
|
|
6
|
+
import { cn } from "@/lib/utils"
|
|
7
|
+
|
|
8
|
+
const props = defineProps<DropdownMenuItemProps & { class?: HTMLAttributes["class"], inset?: boolean }>()
|
|
9
|
+
|
|
10
|
+
const delegatedProps = reactiveOmit(props, "class")
|
|
11
|
+
|
|
12
|
+
const forwardedProps = useForwardProps(delegatedProps)
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<DropdownMenuItem
|
|
17
|
+
v-bind="forwardedProps"
|
|
18
|
+
:class="cn(
|
|
19
|
+
'relative flex cursor-default select-none items-center rounded-sm gap-2 px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0',
|
|
20
|
+
inset && 'pl-8',
|
|
21
|
+
props.class,
|
|
22
|
+
)"
|
|
23
|
+
>
|
|
24
|
+
<slot />
|
|
25
|
+
</DropdownMenuItem>
|
|
26
|
+
</template>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { DropdownMenuLabelProps } from "reka-ui"
|
|
3
|
+
import type { HTMLAttributes } from "vue"
|
|
4
|
+
import { reactiveOmit } from "@vueuse/core"
|
|
5
|
+
import { DropdownMenuLabel, useForwardProps } from "reka-ui"
|
|
6
|
+
import { cn } from "@/lib/utils"
|
|
7
|
+
|
|
8
|
+
const props = defineProps<DropdownMenuLabelProps & { class?: HTMLAttributes["class"], inset?: boolean }>()
|
|
9
|
+
|
|
10
|
+
const delegatedProps = reactiveOmit(props, "class")
|
|
11
|
+
|
|
12
|
+
const forwardedProps = useForwardProps(delegatedProps)
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<DropdownMenuLabel
|
|
17
|
+
v-bind="forwardedProps"
|
|
18
|
+
:class="cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', props.class)"
|
|
19
|
+
>
|
|
20
|
+
<slot />
|
|
21
|
+
</DropdownMenuLabel>
|
|
22
|
+
</template>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { DropdownMenuRadioGroupEmits, DropdownMenuRadioGroupProps } from "reka-ui"
|
|
3
|
+
import {
|
|
4
|
+
DropdownMenuRadioGroup,
|
|
5
|
+
|
|
6
|
+
useForwardPropsEmits,
|
|
7
|
+
} from "reka-ui"
|
|
8
|
+
|
|
9
|
+
const props = defineProps<DropdownMenuRadioGroupProps>()
|
|
10
|
+
const emits = defineEmits<DropdownMenuRadioGroupEmits>()
|
|
11
|
+
|
|
12
|
+
const forwarded = useForwardPropsEmits(props, emits)
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<DropdownMenuRadioGroup v-bind="forwarded">
|
|
17
|
+
<slot />
|
|
18
|
+
</DropdownMenuRadioGroup>
|
|
19
|
+
</template>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { DropdownMenuRadioItemEmits, DropdownMenuRadioItemProps } from "reka-ui"
|
|
3
|
+
import type { HTMLAttributes } from "vue"
|
|
4
|
+
import { reactiveOmit } from "@vueuse/core"
|
|
5
|
+
import { Circle } from "lucide-vue-next"
|
|
6
|
+
import {
|
|
7
|
+
DropdownMenuItemIndicator,
|
|
8
|
+
DropdownMenuRadioItem,
|
|
9
|
+
|
|
10
|
+
useForwardPropsEmits,
|
|
11
|
+
} from "reka-ui"
|
|
12
|
+
import { cn } from "@/lib/utils"
|
|
13
|
+
|
|
14
|
+
const props = defineProps<DropdownMenuRadioItemProps & { class?: HTMLAttributes["class"] }>()
|
|
15
|
+
|
|
16
|
+
const emits = defineEmits<DropdownMenuRadioItemEmits>()
|
|
17
|
+
|
|
18
|
+
const delegatedProps = reactiveOmit(props, "class")
|
|
19
|
+
|
|
20
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<template>
|
|
24
|
+
<DropdownMenuRadioItem
|
|
25
|
+
v-bind="forwarded"
|
|
26
|
+
:class="cn(
|
|
27
|
+
'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
|
|
28
|
+
props.class,
|
|
29
|
+
)"
|
|
30
|
+
>
|
|
31
|
+
<span class="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
|
|
32
|
+
<DropdownMenuItemIndicator>
|
|
33
|
+
<Circle class="h-2 w-2 fill-current" />
|
|
34
|
+
</DropdownMenuItemIndicator>
|
|
35
|
+
</span>
|
|
36
|
+
<slot />
|
|
37
|
+
</DropdownMenuRadioItem>
|
|
38
|
+
</template>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { DropdownMenuSeparatorProps } from "reka-ui"
|
|
3
|
+
import type { HTMLAttributes } from "vue"
|
|
4
|
+
import { reactiveOmit } from "@vueuse/core"
|
|
5
|
+
import {
|
|
6
|
+
DropdownMenuSeparator,
|
|
7
|
+
|
|
8
|
+
} from "reka-ui"
|
|
9
|
+
import { cn } from "@/lib/utils"
|
|
10
|
+
|
|
11
|
+
const props = defineProps<DropdownMenuSeparatorProps & {
|
|
12
|
+
class?: HTMLAttributes["class"]
|
|
13
|
+
}>()
|
|
14
|
+
|
|
15
|
+
const delegatedProps = reactiveOmit(props, "class")
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<DropdownMenuSeparator v-bind="delegatedProps" :class="cn('-mx-1 my-1 h-px bg-muted', props.class)" />
|
|
20
|
+
</template>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from "vue"
|
|
3
|
+
import { cn } from "@/lib/utils"
|
|
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 opacity-60', props.class)">
|
|
12
|
+
<slot />
|
|
13
|
+
</span>
|
|
14
|
+
</template>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { DropdownMenuSubEmits, DropdownMenuSubProps } from "reka-ui"
|
|
3
|
+
import {
|
|
4
|
+
DropdownMenuSub,
|
|
5
|
+
|
|
6
|
+
useForwardPropsEmits,
|
|
7
|
+
} from "reka-ui"
|
|
8
|
+
|
|
9
|
+
const props = defineProps<DropdownMenuSubProps>()
|
|
10
|
+
const emits = defineEmits<DropdownMenuSubEmits>()
|
|
11
|
+
|
|
12
|
+
const forwarded = useForwardPropsEmits(props, emits)
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<DropdownMenuSub v-bind="forwarded">
|
|
17
|
+
<slot />
|
|
18
|
+
</DropdownMenuSub>
|
|
19
|
+
</template>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { DropdownMenuSubContentEmits, DropdownMenuSubContentProps } from "reka-ui"
|
|
3
|
+
import type { HTMLAttributes } from "vue"
|
|
4
|
+
import { reactiveOmit } from "@vueuse/core"
|
|
5
|
+
import {
|
|
6
|
+
DropdownMenuSubContent,
|
|
7
|
+
|
|
8
|
+
useForwardPropsEmits,
|
|
9
|
+
} from "reka-ui"
|
|
10
|
+
import { cn } from "@/lib/utils"
|
|
11
|
+
|
|
12
|
+
const props = defineProps<DropdownMenuSubContentProps & { class?: HTMLAttributes["class"] }>()
|
|
13
|
+
const emits = defineEmits<DropdownMenuSubContentEmits>()
|
|
14
|
+
|
|
15
|
+
const delegatedProps = reactiveOmit(props, "class")
|
|
16
|
+
|
|
17
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<template>
|
|
21
|
+
<DropdownMenuSubContent
|
|
22
|
+
v-bind="forwarded"
|
|
23
|
+
:class="cn('z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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', props.class)"
|
|
24
|
+
>
|
|
25
|
+
<slot />
|
|
26
|
+
</DropdownMenuSubContent>
|
|
27
|
+
</template>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { DropdownMenuSubTriggerProps } from "reka-ui"
|
|
3
|
+
import type { HTMLAttributes } from "vue"
|
|
4
|
+
import { reactiveOmit } from "@vueuse/core"
|
|
5
|
+
import { ChevronRight } from "lucide-vue-next"
|
|
6
|
+
import {
|
|
7
|
+
DropdownMenuSubTrigger,
|
|
8
|
+
|
|
9
|
+
useForwardProps,
|
|
10
|
+
} from "reka-ui"
|
|
11
|
+
import { cn } from "@/lib/utils"
|
|
12
|
+
|
|
13
|
+
const props = defineProps<DropdownMenuSubTriggerProps & { class?: HTMLAttributes["class"] }>()
|
|
14
|
+
|
|
15
|
+
const delegatedProps = reactiveOmit(props, "class")
|
|
16
|
+
|
|
17
|
+
const forwardedProps = useForwardProps(delegatedProps)
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<template>
|
|
21
|
+
<DropdownMenuSubTrigger
|
|
22
|
+
v-bind="forwardedProps"
|
|
23
|
+
:class="cn(
|
|
24
|
+
'flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent',
|
|
25
|
+
props.class,
|
|
26
|
+
)"
|
|
27
|
+
>
|
|
28
|
+
<slot />
|
|
29
|
+
<ChevronRight class="ml-auto h-4 w-4" />
|
|
30
|
+
</DropdownMenuSubTrigger>
|
|
31
|
+
</template>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { DropdownMenuTriggerProps } from "reka-ui"
|
|
3
|
+
import { DropdownMenuTrigger, useForwardProps } from "reka-ui"
|
|
4
|
+
|
|
5
|
+
const props = defineProps<DropdownMenuTriggerProps>()
|
|
6
|
+
|
|
7
|
+
const forwardedProps = useForwardProps(props)
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<DropdownMenuTrigger class="outline-none" v-bind="forwardedProps">
|
|
12
|
+
<slot />
|
|
13
|
+
</DropdownMenuTrigger>
|
|
14
|
+
</template>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export { default as DropdownMenu } from "./DropdownMenu.vue"
|
|
2
|
+
|
|
3
|
+
export { default as DropdownMenuCheckboxItem } from "./DropdownMenuCheckboxItem.vue"
|
|
4
|
+
export { default as DropdownMenuContent } from "./DropdownMenuContent.vue"
|
|
5
|
+
export { default as DropdownMenuGroup } from "./DropdownMenuGroup.vue"
|
|
6
|
+
export { default as DropdownMenuItem } from "./DropdownMenuItem.vue"
|
|
7
|
+
export { default as DropdownMenuLabel } from "./DropdownMenuLabel.vue"
|
|
8
|
+
export { default as DropdownMenuRadioGroup } from "./DropdownMenuRadioGroup.vue"
|
|
9
|
+
export { default as DropdownMenuRadioItem } from "./DropdownMenuRadioItem.vue"
|
|
10
|
+
export { default as DropdownMenuSeparator } from "./DropdownMenuSeparator.vue"
|
|
11
|
+
export { default as DropdownMenuShortcut } from "./DropdownMenuShortcut.vue"
|
|
12
|
+
export { default as DropdownMenuSub } from "./DropdownMenuSub.vue"
|
|
13
|
+
export { default as DropdownMenuSubContent } from "./DropdownMenuSubContent.vue"
|
|
14
|
+
export { default as DropdownMenuSubTrigger } from "./DropdownMenuSubTrigger.vue"
|
|
15
|
+
export { default as DropdownMenuTrigger } from "./DropdownMenuTrigger.vue"
|
|
16
|
+
export { DropdownMenuPortal } from "reka-ui"
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from "vue"
|
|
3
|
+
import { cn } from "@/lib/utils"
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
class?: HTMLAttributes["class"]
|
|
7
|
+
}>()
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<div class="relative w-full overflow-auto">
|
|
12
|
+
<table :class="cn('w-full caption-bottom text-sm', props.class)">
|
|
13
|
+
<slot />
|
|
14
|
+
</table>
|
|
15
|
+
</div>
|
|
16
|
+
</template>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from "vue"
|
|
3
|
+
import { cn } from "@/lib/utils"
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
class?: HTMLAttributes["class"]
|
|
7
|
+
}>()
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<tbody :class="cn('[&_tr:last-child]:border-0', props.class)">
|
|
12
|
+
<slot />
|
|
13
|
+
</tbody>
|
|
14
|
+
</template>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from "vue"
|
|
3
|
+
import { cn } from "@/lib/utils"
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
class?: HTMLAttributes["class"]
|
|
7
|
+
}>()
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<caption :class="cn('mt-4 text-sm text-muted-foreground', props.class)">
|
|
12
|
+
<slot />
|
|
13
|
+
</caption>
|
|
14
|
+
</template>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from "vue"
|
|
3
|
+
import { cn } from "@/lib/utils"
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
class?: HTMLAttributes["class"]
|
|
7
|
+
}>()
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<td
|
|
12
|
+
:class="
|
|
13
|
+
cn(
|
|
14
|
+
'p-4 align-middle [&:has([role=checkbox])]:pr-0',
|
|
15
|
+
props.class,
|
|
16
|
+
)
|
|
17
|
+
"
|
|
18
|
+
>
|
|
19
|
+
<slot />
|
|
20
|
+
</td>
|
|
21
|
+
</template>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from "vue"
|
|
3
|
+
import { reactiveOmit } from "@vueuse/core"
|
|
4
|
+
import { cn } from "@/lib/utils"
|
|
5
|
+
import TableCell from "./TableCell.vue"
|
|
6
|
+
import TableRow from "./TableRow.vue"
|
|
7
|
+
|
|
8
|
+
const props = withDefaults(defineProps<{
|
|
9
|
+
class?: HTMLAttributes["class"]
|
|
10
|
+
colspan?: number
|
|
11
|
+
}>(), {
|
|
12
|
+
colspan: 1,
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
const delegatedProps = reactiveOmit(props, "class")
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<TableRow>
|
|
20
|
+
<TableCell
|
|
21
|
+
:class="
|
|
22
|
+
cn(
|
|
23
|
+
'p-4 whitespace-nowrap align-middle text-sm text-foreground',
|
|
24
|
+
props.class,
|
|
25
|
+
)
|
|
26
|
+
"
|
|
27
|
+
v-bind="delegatedProps"
|
|
28
|
+
>
|
|
29
|
+
<div class="flex items-center justify-center py-10">
|
|
30
|
+
<slot />
|
|
31
|
+
</div>
|
|
32
|
+
</TableCell>
|
|
33
|
+
</TableRow>
|
|
34
|
+
</template>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from "vue"
|
|
3
|
+
import { cn } from "@/lib/utils"
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
class?: HTMLAttributes["class"]
|
|
7
|
+
}>()
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<tfoot :class="cn('border-t bg-muted/50 font-medium [&>tr]:last:border-b-0', props.class)">
|
|
12
|
+
<slot />
|
|
13
|
+
</tfoot>
|
|
14
|
+
</template>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from "vue"
|
|
3
|
+
import { cn } from "@/lib/utils"
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
class?: HTMLAttributes["class"]
|
|
7
|
+
}>()
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<th :class="cn('h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0', props.class)">
|
|
12
|
+
<slot />
|
|
13
|
+
</th>
|
|
14
|
+
</template>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from "vue"
|
|
3
|
+
import { cn } from "@/lib/utils"
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
class?: HTMLAttributes["class"]
|
|
7
|
+
}>()
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<thead :class="cn('[&_tr]:border-b', props.class)">
|
|
12
|
+
<slot />
|
|
13
|
+
</thead>
|
|
14
|
+
</template>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from "vue"
|
|
3
|
+
import { cn } from "@/lib/utils"
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
class?: HTMLAttributes["class"]
|
|
7
|
+
}>()
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<tr :class="cn('border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted', props.class)">
|
|
12
|
+
<slot />
|
|
13
|
+
</tr>
|
|
14
|
+
</template>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { default as Table } from "./Table.vue"
|
|
2
|
+
export { default as TableBody } from "./TableBody.vue"
|
|
3
|
+
export { default as TableCaption } from "./TableCaption.vue"
|
|
4
|
+
export { default as TableCell } from "./TableCell.vue"
|
|
5
|
+
export { default as TableEmpty } from "./TableEmpty.vue"
|
|
6
|
+
export { default as TableFooter } from "./TableFooter.vue"
|
|
7
|
+
export { default as TableHead } from "./TableHead.vue"
|
|
8
|
+
export { default as TableHeader } from "./TableHeader.vue"
|
|
9
|
+
export { default as TableRow } from "./TableRow.vue"
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordup-md/nuxt-layer-shadcn-unocss",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.8",
|
|
5
5
|
"author": "Emmanuel Salomon <emmanuel.salomon@gmail.com>",
|
|
6
6
|
"main": "./nuxt.config.ts",
|
|
7
7
|
"repository": {
|
|
@@ -22,8 +22,9 @@
|
|
|
22
22
|
"@unocss/eslint-plugin": "^66.0.0",
|
|
23
23
|
"@unocss/extractor-mdc": "^66.0.0",
|
|
24
24
|
"@unocss/nuxt": "^66.0.0",
|
|
25
|
-
"@vueuse/core": "^13.
|
|
25
|
+
"@vueuse/core": "^13.2.0",
|
|
26
26
|
"@vueuse/nuxt": "^13.1.0",
|
|
27
|
+
"bumpp": "^10.2.3",
|
|
27
28
|
"eslint": "^9.26.0",
|
|
28
29
|
"shadcn-nuxt": "^2.1.0",
|
|
29
30
|
"shiki": "^2.1.0",
|
|
@@ -43,6 +44,7 @@
|
|
|
43
44
|
"@nuxt/image": "^1.10.0",
|
|
44
45
|
"@nuxtjs/color-mode": "^3.5.2",
|
|
45
46
|
"@nuxtjs/i18n": "^9.5.4",
|
|
47
|
+
"@tanstack/vue-table": "^8.21.3",
|
|
46
48
|
"@unpress/nuxt-module": "0.1.13-beta.1",
|
|
47
49
|
"class-variance-authority": "^0.7.1",
|
|
48
50
|
"clsx": "^2.1.1",
|
|
@@ -59,6 +61,8 @@
|
|
|
59
61
|
"preview": "nuxt preview .playground",
|
|
60
62
|
"lint": "eslint .",
|
|
61
63
|
"build:json-doc": "tsx scripts/buildContentDoc-cli.ts",
|
|
64
|
+
"bump": "pnpm build:json-doc && bumpp --skip-install --commit --push --tag",
|
|
65
|
+
"release": "pnpm bump && npm publish",
|
|
62
66
|
"clean": "find . -name 'node_modules' -type d -prune -exec rm -rf '{}' + && find . -name '.nuxt' -type d -prune -exec rm -rf '{}' + && find . -name '.output' -type d -prune -exec rm -rf '{}' + && find . -name 'dist' -prune -exec rm -rf '{}' +"
|
|
63
67
|
}
|
|
64
68
|
}
|