@wordup-md/nuxt-layer-shadcn-unocss 0.2.8 → 0.2.10

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 (36) hide show
  1. package/.github/workflows/publish.yml +38 -0
  2. package/components/content/Badge.vue +2 -0
  3. package/components/layout/Footer.vue +1 -1
  4. package/components/ui/checkbox/Checkbox.vue +32 -30
  5. package/components/ui/checkbox/index.ts +1 -1
  6. package/components/ui/dropdown-menu/DropdownMenu.vue +2 -2
  7. package/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue +39 -37
  8. package/components/ui/dropdown-menu/DropdownMenuContent.vue +7 -7
  9. package/components/ui/dropdown-menu/DropdownMenuGroup.vue +2 -2
  10. package/components/ui/dropdown-menu/DropdownMenuItem.vue +7 -7
  11. package/components/ui/dropdown-menu/DropdownMenuLabel.vue +7 -7
  12. package/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue +2 -2
  13. package/components/ui/dropdown-menu/DropdownMenuRadioItem.vue +41 -38
  14. package/components/ui/dropdown-menu/DropdownMenuSeparator.vue +11 -8
  15. package/components/ui/dropdown-menu/DropdownMenuShortcut.vue +3 -3
  16. package/components/ui/dropdown-menu/DropdownMenuSub.vue +2 -2
  17. package/components/ui/dropdown-menu/DropdownMenuSubContent.vue +7 -7
  18. package/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue +33 -31
  19. package/components/ui/dropdown-menu/DropdownMenuTrigger.vue +6 -3
  20. package/components/ui/dropdown-menu/index.ts +15 -15
  21. package/components/ui/table/Table.vue +3 -3
  22. package/components/ui/table/TableBody.vue +3 -3
  23. package/components/ui/table/TableCaption.vue +3 -3
  24. package/components/ui/table/TableCell.vue +3 -3
  25. package/components/ui/table/TableEmpty.vue +7 -7
  26. package/components/ui/table/TableFooter.vue +3 -3
  27. package/components/ui/table/TableHead.vue +3 -3
  28. package/components/ui/table/TableHeader.vue +3 -3
  29. package/components/ui/table/TableRow.vue +3 -3
  30. package/components/ui/table/index.ts +9 -9
  31. package/composables/useConfig.ts +2 -0
  32. package/index.d.ts +12 -0
  33. package/middleware/admin.global.ts +1 -1
  34. package/package.json +2 -1
  35. package/pages/[...slug].vue +1 -1
  36. package/pages/admin/login.vue +1 -1
@@ -0,0 +1,38 @@
1
+ name: Publish to npm
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v*' # Triggers on new version tags like v1.0.0
7
+
8
+ jobs:
9
+ publish:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+
14
+ - name: Set up Node.js
15
+ uses: actions/setup-node@v4
16
+ with:
17
+ node-version: '20'
18
+ registry-url: 'https://registry.npmjs.org/'
19
+
20
+ - name: Install pnpm
21
+ uses: pnpm/action-setup@v2
22
+ with:
23
+ version: 8
24
+
25
+ - name: Install dependencies
26
+ run: |
27
+ echo 'shamefully-hoist=true' >> .npmrc
28
+ echo 'strict-peer-dependencies=false' >> .npmrc
29
+ echo 'only-built-dependencies=["sharp"]' >> .npmrc
30
+ pnpm install --no-frozen-lockfile
31
+
32
+ # - name: Build Nuxt (if needed)
33
+ # run: pnpm run build
34
+
35
+ - name: Publish to npm
36
+ run: pnpm publish --no-git-checks
37
+ env:
38
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -12,6 +12,8 @@
12
12
  'cursor-pointer',
13
13
  size === 'sm'
14
14
  && 'rounded-md px-1.5 py-0.5 text-xs font-normal leading-none',
15
+ size === 'lg'
16
+ && 'px-3 text-base',
15
17
  ]"
16
18
  >
17
19
  <span v-if="title">
@@ -33,7 +33,7 @@
33
33
  </UiButton>
34
34
  </NuxtLink>
35
35
 
36
- <ButtonLogin />
36
+ <ButtonLogin v-if="footer.showLogin" />
37
37
  </div>
38
38
 
39
39
  <MDCRenderer
@@ -1,30 +1,32 @@
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>
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 { CheckboxIndicator, CheckboxRoot, useForwardPropsEmits } from 'reka-ui'
6
+ import { cn } from '@/lib/utils'
7
+
8
+ const props = defineProps<CheckboxRootProps & { class?: HTMLAttributes['class'] }>()
9
+ const emits = defineEmits<CheckboxRootEmits>()
10
+
11
+ const delegatedProps = reactiveOmit(props, 'class')
12
+
13
+ const forwarded = useForwardPropsEmits(delegatedProps, emits)
14
+ </script>
15
+
16
+ <template>
17
+ <CheckboxRoot
18
+ v-bind="forwarded"
19
+ :class="
20
+ 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',
21
+ props.class)"
22
+ >
23
+ <CheckboxIndicator class="flex h-full w-full items-center justify-center text-current">
24
+ <slot>
25
+ <Icon
26
+ name="lucide:check"
27
+ :size="14"
28
+ />
29
+ </slot>
30
+ </CheckboxIndicator>
31
+ </CheckboxRoot>
32
+ </template>
@@ -1 +1 @@
1
- export { default as Checkbox } from "./Checkbox.vue"
1
+ export { default as Checkbox } from './Checkbox.vue'
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
- import type { DropdownMenuRootEmits, DropdownMenuRootProps } from "reka-ui"
3
- import { DropdownMenuRoot, useForwardPropsEmits } from "reka-ui"
2
+ import type { DropdownMenuRootEmits, DropdownMenuRootProps } from 'reka-ui'
3
+ import { DropdownMenuRoot, useForwardPropsEmits } from 'reka-ui'
4
4
 
5
5
  const props = defineProps<DropdownMenuRootProps>()
6
6
  const emits = defineEmits<DropdownMenuRootEmits>()
@@ -1,37 +1,39 @@
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>
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 {
6
+ DropdownMenuCheckboxItem,
7
+
8
+ DropdownMenuItemIndicator,
9
+ useForwardPropsEmits,
10
+ } from 'reka-ui'
11
+ import { cn } from '@/lib/utils'
12
+
13
+ const props = defineProps<DropdownMenuCheckboxItemProps & { class?: HTMLAttributes['class'] }>()
14
+ const emits = defineEmits<DropdownMenuCheckboxItemEmits>()
15
+
16
+ const delegatedProps = reactiveOmit(props, 'class')
17
+
18
+ const forwarded = useForwardPropsEmits(delegatedProps, emits)
19
+ </script>
20
+
21
+ <template>
22
+ <DropdownMenuCheckboxItem
23
+ v-bind="forwarded"
24
+ :class=" cn(
25
+ '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',
26
+ props.class,
27
+ )"
28
+ >
29
+ <span class="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
30
+ <DropdownMenuItemIndicator>
31
+ <Icon
32
+ name="lucide:check"
33
+ class="w-4 h-4"
34
+ />
35
+ </DropdownMenuItemIndicator>
36
+ </span>
37
+ <slot />
38
+ </DropdownMenuCheckboxItem>
39
+ </template>
@@ -1,24 +1,24 @@
1
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"
2
+ import type { DropdownMenuContentEmits, DropdownMenuContentProps } from 'reka-ui'
3
+ import type { HTMLAttributes } from 'vue'
4
+ import { reactiveOmit } from '@vueuse/core'
5
5
  import {
6
6
  DropdownMenuContent,
7
7
 
8
8
  DropdownMenuPortal,
9
9
  useForwardPropsEmits,
10
- } from "reka-ui"
11
- import { cn } from "@/lib/utils"
10
+ } from 'reka-ui'
11
+ import { cn } from '@/lib/utils'
12
12
 
13
13
  const props = withDefaults(
14
- defineProps<DropdownMenuContentProps & { class?: HTMLAttributes["class"] }>(),
14
+ defineProps<DropdownMenuContentProps & { class?: HTMLAttributes['class'] }>(),
15
15
  {
16
16
  sideOffset: 4,
17
17
  },
18
18
  )
19
19
  const emits = defineEmits<DropdownMenuContentEmits>()
20
20
 
21
- const delegatedProps = reactiveOmit(props, "class")
21
+ const delegatedProps = reactiveOmit(props, 'class')
22
22
 
23
23
  const forwarded = useForwardPropsEmits(delegatedProps, emits)
24
24
  </script>
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
- import type { DropdownMenuGroupProps } from "reka-ui"
3
- import { DropdownMenuGroup } from "reka-ui"
2
+ import type { DropdownMenuGroupProps } from 'reka-ui'
3
+ import { DropdownMenuGroup } from 'reka-ui'
4
4
 
5
5
  const props = defineProps<DropdownMenuGroupProps>()
6
6
  </script>
@@ -1,13 +1,13 @@
1
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"
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
7
 
8
- const props = defineProps<DropdownMenuItemProps & { class?: HTMLAttributes["class"], inset?: boolean }>()
8
+ const props = defineProps<DropdownMenuItemProps & { class?: HTMLAttributes['class'], inset?: boolean }>()
9
9
 
10
- const delegatedProps = reactiveOmit(props, "class")
10
+ const delegatedProps = reactiveOmit(props, 'class')
11
11
 
12
12
  const forwardedProps = useForwardProps(delegatedProps)
13
13
  </script>
@@ -1,13 +1,13 @@
1
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"
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
7
 
8
- const props = defineProps<DropdownMenuLabelProps & { class?: HTMLAttributes["class"], inset?: boolean }>()
8
+ const props = defineProps<DropdownMenuLabelProps & { class?: HTMLAttributes['class'], inset?: boolean }>()
9
9
 
10
- const delegatedProps = reactiveOmit(props, "class")
10
+ const delegatedProps = reactiveOmit(props, 'class')
11
11
 
12
12
  const forwardedProps = useForwardProps(delegatedProps)
13
13
  </script>
@@ -1,10 +1,10 @@
1
1
  <script setup lang="ts">
2
- import type { DropdownMenuRadioGroupEmits, DropdownMenuRadioGroupProps } from "reka-ui"
2
+ import type { DropdownMenuRadioGroupEmits, DropdownMenuRadioGroupProps } from 'reka-ui'
3
3
  import {
4
4
  DropdownMenuRadioGroup,
5
5
 
6
6
  useForwardPropsEmits,
7
- } from "reka-ui"
7
+ } from 'reka-ui'
8
8
 
9
9
  const props = defineProps<DropdownMenuRadioGroupProps>()
10
10
  const emits = defineEmits<DropdownMenuRadioGroupEmits>()
@@ -1,38 +1,41 @@
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>
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 {
6
+ DropdownMenuItemIndicator,
7
+ DropdownMenuRadioItem,
8
+
9
+ useForwardPropsEmits,
10
+ } from 'reka-ui'
11
+ import { cn } from '@/lib/utils'
12
+
13
+ const props = defineProps<DropdownMenuRadioItemProps & { class?: HTMLAttributes['class'] }>()
14
+
15
+ const emits = defineEmits<DropdownMenuRadioItemEmits>()
16
+
17
+ const delegatedProps = reactiveOmit(props, 'class')
18
+
19
+ const forwarded = useForwardPropsEmits(delegatedProps, emits)
20
+ </script>
21
+
22
+ <template>
23
+ <DropdownMenuRadioItem
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
+ <Icon
33
+ name="lucide:dot"
34
+ :size="40"
35
+ class="fill-current mt-1"
36
+ />
37
+ </DropdownMenuItemIndicator>
38
+ </span>
39
+ <slot />
40
+ </DropdownMenuRadioItem>
41
+ </template>
@@ -1,20 +1,23 @@
1
1
  <script setup lang="ts">
2
- import type { DropdownMenuSeparatorProps } from "reka-ui"
3
- import type { HTMLAttributes } from "vue"
4
- import { reactiveOmit } from "@vueuse/core"
2
+ import type { DropdownMenuSeparatorProps } from 'reka-ui'
3
+ import type { HTMLAttributes } from 'vue'
4
+ import { reactiveOmit } from '@vueuse/core'
5
5
  import {
6
6
  DropdownMenuSeparator,
7
7
 
8
- } from "reka-ui"
9
- import { cn } from "@/lib/utils"
8
+ } from 'reka-ui'
9
+ import { cn } from '@/lib/utils'
10
10
 
11
11
  const props = defineProps<DropdownMenuSeparatorProps & {
12
- class?: HTMLAttributes["class"]
12
+ class?: HTMLAttributes['class']
13
13
  }>()
14
14
 
15
- const delegatedProps = reactiveOmit(props, "class")
15
+ const delegatedProps = reactiveOmit(props, 'class')
16
16
  </script>
17
17
 
18
18
  <template>
19
- <DropdownMenuSeparator v-bind="delegatedProps" :class="cn('-mx-1 my-1 h-px bg-muted', props.class)" />
19
+ <DropdownMenuSeparator
20
+ v-bind="delegatedProps"
21
+ :class="cn('-mx-1 my-1 h-px bg-muted', props.class)"
22
+ />
20
23
  </template>
@@ -1,9 +1,9 @@
1
1
  <script setup lang="ts">
2
- import type { HTMLAttributes } from "vue"
3
- import { cn } from "@/lib/utils"
2
+ import type { HTMLAttributes } from 'vue'
3
+ import { cn } from '@/lib/utils'
4
4
 
5
5
  const props = defineProps<{
6
- class?: HTMLAttributes["class"]
6
+ class?: HTMLAttributes['class']
7
7
  }>()
8
8
  </script>
9
9
 
@@ -1,10 +1,10 @@
1
1
  <script setup lang="ts">
2
- import type { DropdownMenuSubEmits, DropdownMenuSubProps } from "reka-ui"
2
+ import type { DropdownMenuSubEmits, DropdownMenuSubProps } from 'reka-ui'
3
3
  import {
4
4
  DropdownMenuSub,
5
5
 
6
6
  useForwardPropsEmits,
7
- } from "reka-ui"
7
+ } from 'reka-ui'
8
8
 
9
9
  const props = defineProps<DropdownMenuSubProps>()
10
10
  const emits = defineEmits<DropdownMenuSubEmits>()
@@ -1,18 +1,18 @@
1
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"
2
+ import type { DropdownMenuSubContentEmits, DropdownMenuSubContentProps } from 'reka-ui'
3
+ import type { HTMLAttributes } from 'vue'
4
+ import { reactiveOmit } from '@vueuse/core'
5
5
  import {
6
6
  DropdownMenuSubContent,
7
7
 
8
8
  useForwardPropsEmits,
9
- } from "reka-ui"
10
- import { cn } from "@/lib/utils"
9
+ } from 'reka-ui'
10
+ import { cn } from '@/lib/utils'
11
11
 
12
- const props = defineProps<DropdownMenuSubContentProps & { class?: HTMLAttributes["class"] }>()
12
+ const props = defineProps<DropdownMenuSubContentProps & { class?: HTMLAttributes['class'] }>()
13
13
  const emits = defineEmits<DropdownMenuSubContentEmits>()
14
14
 
15
- const delegatedProps = reactiveOmit(props, "class")
15
+ const delegatedProps = reactiveOmit(props, 'class')
16
16
 
17
17
  const forwarded = useForwardPropsEmits(delegatedProps, emits)
18
18
  </script>
@@ -1,31 +1,33 @@
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>
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 {
6
+ DropdownMenuSubTrigger,
7
+
8
+ useForwardProps,
9
+ } from 'reka-ui'
10
+ import { cn } from '@/lib/utils'
11
+
12
+ const props = defineProps<DropdownMenuSubTriggerProps & { class?: HTMLAttributes['class'] }>()
13
+
14
+ const delegatedProps = reactiveOmit(props, 'class')
15
+
16
+ const forwardedProps = useForwardProps(delegatedProps)
17
+ </script>
18
+
19
+ <template>
20
+ <DropdownMenuSubTrigger
21
+ v-bind="forwardedProps"
22
+ :class="cn(
23
+ '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',
24
+ props.class,
25
+ )"
26
+ >
27
+ <slot />
28
+ <Icon
29
+ name="lucide:chevron-right"
30
+ class="ml-auto h-4 w-4"
31
+ />
32
+ </DropdownMenuSubTrigger>
33
+ </template>
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
- import type { DropdownMenuTriggerProps } from "reka-ui"
3
- import { DropdownMenuTrigger, useForwardProps } from "reka-ui"
2
+ import type { DropdownMenuTriggerProps } from 'reka-ui'
3
+ import { DropdownMenuTrigger, useForwardProps } from 'reka-ui'
4
4
 
5
5
  const props = defineProps<DropdownMenuTriggerProps>()
6
6
 
@@ -8,7 +8,10 @@ const forwardedProps = useForwardProps(props)
8
8
  </script>
9
9
 
10
10
  <template>
11
- <DropdownMenuTrigger class="outline-none" v-bind="forwardedProps">
11
+ <DropdownMenuTrigger
12
+ class="outline-none"
13
+ v-bind="forwardedProps"
14
+ >
12
15
  <slot />
13
16
  </DropdownMenuTrigger>
14
17
  </template>
@@ -1,16 +1,16 @@
1
- export { default as DropdownMenu } from "./DropdownMenu.vue"
1
+ export { default as DropdownMenu } from './DropdownMenu.vue'
2
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"
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'
@@ -1,9 +1,9 @@
1
1
  <script setup lang="ts">
2
- import type { HTMLAttributes } from "vue"
3
- import { cn } from "@/lib/utils"
2
+ import type { HTMLAttributes } from 'vue'
3
+ import { cn } from '@/lib/utils'
4
4
 
5
5
  const props = defineProps<{
6
- class?: HTMLAttributes["class"]
6
+ class?: HTMLAttributes['class']
7
7
  }>()
8
8
  </script>
9
9
 
@@ -1,9 +1,9 @@
1
1
  <script setup lang="ts">
2
- import type { HTMLAttributes } from "vue"
3
- import { cn } from "@/lib/utils"
2
+ import type { HTMLAttributes } from 'vue'
3
+ import { cn } from '@/lib/utils'
4
4
 
5
5
  const props = defineProps<{
6
- class?: HTMLAttributes["class"]
6
+ class?: HTMLAttributes['class']
7
7
  }>()
8
8
  </script>
9
9
 
@@ -1,9 +1,9 @@
1
1
  <script setup lang="ts">
2
- import type { HTMLAttributes } from "vue"
3
- import { cn } from "@/lib/utils"
2
+ import type { HTMLAttributes } from 'vue'
3
+ import { cn } from '@/lib/utils'
4
4
 
5
5
  const props = defineProps<{
6
- class?: HTMLAttributes["class"]
6
+ class?: HTMLAttributes['class']
7
7
  }>()
8
8
  </script>
9
9
 
@@ -1,9 +1,9 @@
1
1
  <script setup lang="ts">
2
- import type { HTMLAttributes } from "vue"
3
- import { cn } from "@/lib/utils"
2
+ import type { HTMLAttributes } from 'vue'
3
+ import { cn } from '@/lib/utils'
4
4
 
5
5
  const props = defineProps<{
6
- class?: HTMLAttributes["class"]
6
+ class?: HTMLAttributes['class']
7
7
  }>()
8
8
  </script>
9
9
 
@@ -1,18 +1,18 @@
1
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"
2
+ import type { HTMLAttributes } from 'vue'
3
+ import { reactiveOmit } from '@vueuse/core'
4
+ import TableCell from './TableCell.vue'
5
+ import TableRow from './TableRow.vue'
6
+ import { cn } from '@/lib/utils'
7
7
 
8
8
  const props = withDefaults(defineProps<{
9
- class?: HTMLAttributes["class"]
9
+ class?: HTMLAttributes['class']
10
10
  colspan?: number
11
11
  }>(), {
12
12
  colspan: 1,
13
13
  })
14
14
 
15
- const delegatedProps = reactiveOmit(props, "class")
15
+ const delegatedProps = reactiveOmit(props, 'class')
16
16
  </script>
17
17
 
18
18
  <template>
@@ -1,9 +1,9 @@
1
1
  <script setup lang="ts">
2
- import type { HTMLAttributes } from "vue"
3
- import { cn } from "@/lib/utils"
2
+ import type { HTMLAttributes } from 'vue'
3
+ import { cn } from '@/lib/utils'
4
4
 
5
5
  const props = defineProps<{
6
- class?: HTMLAttributes["class"]
6
+ class?: HTMLAttributes['class']
7
7
  }>()
8
8
  </script>
9
9
 
@@ -1,9 +1,9 @@
1
1
  <script setup lang="ts">
2
- import type { HTMLAttributes } from "vue"
3
- import { cn } from "@/lib/utils"
2
+ import type { HTMLAttributes } from 'vue'
3
+ import { cn } from '@/lib/utils'
4
4
 
5
5
  const props = defineProps<{
6
- class?: HTMLAttributes["class"]
6
+ class?: HTMLAttributes['class']
7
7
  }>()
8
8
  </script>
9
9
 
@@ -1,9 +1,9 @@
1
1
  <script setup lang="ts">
2
- import type { HTMLAttributes } from "vue"
3
- import { cn } from "@/lib/utils"
2
+ import type { HTMLAttributes } from 'vue'
3
+ import { cn } from '@/lib/utils'
4
4
 
5
5
  const props = defineProps<{
6
- class?: HTMLAttributes["class"]
6
+ class?: HTMLAttributes['class']
7
7
  }>()
8
8
  </script>
9
9
 
@@ -1,9 +1,9 @@
1
1
  <script setup lang="ts">
2
- import type { HTMLAttributes } from "vue"
3
- import { cn } from "@/lib/utils"
2
+ import type { HTMLAttributes } from 'vue'
3
+ import { cn } from '@/lib/utils'
4
4
 
5
5
  const props = defineProps<{
6
- class?: HTMLAttributes["class"]
6
+ class?: HTMLAttributes['class']
7
7
  }>()
8
8
  </script>
9
9
 
@@ -1,9 +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"
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'
@@ -81,6 +81,7 @@ const defaultConfig: DefaultConfig = {
81
81
  },
82
82
  },
83
83
  showTitle: true,
84
+ showDescription: true,
84
85
  codeCopyToast: true,
85
86
  codeCopyToastText: 'Copied to clipboard!',
86
87
  fieldRequiredText: 'required',
@@ -146,6 +147,7 @@ const defaultConfig: DefaultConfig = {
146
147
  credits: '',
147
148
  links: [],
148
149
  class: '',
150
+ showLogin: false,
149
151
  },
150
152
  toc: {
151
153
  enable: true,
package/index.d.ts CHANGED
@@ -344,6 +344,12 @@ interface DefaultConfig {
344
344
  * @default true
345
345
  */
346
346
  showTitle: boolean
347
+ /**
348
+ * Show or hide description in header
349
+ *
350
+ * @default true
351
+ */
352
+ showDescription: boolean
347
353
  /**
348
354
  * Show toast when code is copied
349
355
  *
@@ -462,6 +468,12 @@ interface DefaultConfig {
462
468
  * @default ''
463
469
  */
464
470
  class: string
471
+ /**
472
+ * Show login button in footer
473
+ *
474
+ * @default false
475
+ */
476
+ showLogin: boolean
465
477
  }
466
478
  /**
467
479
  * Table of contents configuration
@@ -5,7 +5,7 @@ export default defineNuxtRouteMiddleware((to, from) => {
5
5
  if (!client.value) {
6
6
  return navigateTo({
7
7
  path: '/admin/login',
8
- query: { redirectFrom: from.fullPath },
8
+ query: { redirectTo: from.fullPath },
9
9
  })
10
10
  }
11
11
  }
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.8",
4
+ "version": "0.2.10",
5
5
  "author": "Emmanuel Salomon <emmanuel.salomon@gmail.com>",
6
6
  "main": "./nuxt.config.ts",
7
7
  "repository": {
@@ -53,6 +53,7 @@
53
53
  "reka-ui": "^2.2.1",
54
54
  "tailwind-merge": "^3.2.0"
55
55
  },
56
+ "packageManager": "pnpm@10.4.1",
56
57
  "scripts": {
57
58
  "dev": "nuxi dev .playground",
58
59
  "dev:root": "nuxi dev",
@@ -36,7 +36,7 @@
36
36
  <LayoutTitle
37
37
  v-if="config.main?.showTitle && (page.showTitle ?? true)"
38
38
  :title="page?.title"
39
- :description="page?.description"
39
+ :description="config.main?.showDescription ? page?.description : ''"
40
40
  :badges="page?.badges"
41
41
  />
42
42
 
@@ -16,7 +16,7 @@ function onLogin() {
16
16
  function navigateToAdmin() {
17
17
  if (client.value) {
18
18
  const route = useRoute()
19
- const originUrl = route.query.redirectFrom
19
+ const originUrl = route.query.redirectTo
20
20
 
21
21
  if (originUrl) {
22
22
  return navigateTo(originUrl as string)