create-prez-app 4.1.4 → 4.2.0

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 (48) hide show
  1. package/package.json +5 -5
  2. package/template/README.md +50 -23
  3. package/template/app/assets/css/tailwind.css +67 -0
  4. package/template/app/components/ui/badge/Badge.vue +25 -0
  5. package/template/app/components/ui/badge/index.ts +25 -0
  6. package/template/{components → app/components}/ui/button/Button.vue +3 -2
  7. package/template/app/components/ui/button/index.ts +36 -0
  8. package/template/app/components/ui/input/Input.vue +33 -0
  9. package/template/app/components/ui/pagination/Pagination.vue +25 -0
  10. package/template/app/components/ui/pagination/PaginationContent.vue +21 -0
  11. package/template/app/components/ui/pagination/PaginationEllipsis.vue +24 -0
  12. package/template/app/components/ui/pagination/PaginationFirst.vue +32 -0
  13. package/template/app/components/ui/pagination/PaginationItem.vue +32 -0
  14. package/template/app/components/ui/pagination/PaginationLast.vue +32 -0
  15. package/template/app/components/ui/pagination/PaginationNext.vue +32 -0
  16. package/template/app/components/ui/pagination/PaginationPrevious.vue +32 -0
  17. package/template/{components → app/components}/ui/pagination/index.ts +4 -6
  18. package/template/app/components/ui/select/Select.vue +18 -0
  19. package/template/app/components/ui/select/SelectContent.vue +52 -0
  20. package/template/app/components/ui/select/SelectGroup.vue +15 -0
  21. package/template/app/components/ui/select/SelectItem.vue +43 -0
  22. package/template/app/components/ui/select/SelectItemText.vue +15 -0
  23. package/template/app/components/ui/select/SelectLabel.vue +17 -0
  24. package/template/app/components/ui/select/SelectScrollDownButton.vue +26 -0
  25. package/template/app/components/ui/select/SelectScrollUpButton.vue +26 -0
  26. package/template/app/components/ui/select/SelectSeparator.vue +19 -0
  27. package/template/app/components/ui/select/SelectTrigger.vue +33 -0
  28. package/template/app/components/ui/select/SelectValue.vue +15 -0
  29. package/template/app/components/ui/select/index.ts +11 -0
  30. package/template/components.json +18 -16
  31. package/template/nuxt.config.ts +9 -8
  32. package/template/package.json +14 -11
  33. package/template/tsconfig.json +17 -3
  34. package/template/assets/css/tailwind.css +0 -9
  35. package/template/components/ui/badge/Badge.vue +0 -16
  36. package/template/components/ui/badge/index.ts +0 -25
  37. package/template/components/ui/button/index.ts +0 -35
  38. package/template/components/ui/input/Input.vue +0 -24
  39. package/template/components/ui/pagination/PaginationEllipsis.vue +0 -22
  40. package/template/components/ui/pagination/PaginationFirst.vue +0 -29
  41. package/template/components/ui/pagination/PaginationLast.vue +0 -29
  42. package/template/components/ui/pagination/PaginationNext.vue +0 -29
  43. package/template/components/ui/pagination/PaginationPrev.vue +0 -29
  44. package/template/tailwind.config.js +0 -10
  45. /package/template/{app.config.ts → app/app.config.ts} +0 -0
  46. /package/template/{assets → app/assets}/css/theme.css +0 -0
  47. /package/template/{components → app/components}/ui/input/index.ts +0 -0
  48. /package/template/{lib → app/lib}/utils.ts +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-prez-app",
3
- "version": "4.1.4",
3
+ "version": "4.2.0",
4
4
  "description": "A starter template for creating your own themed Prez UI instance",
5
5
  "license": "BSD-3-Clause",
6
6
  "bin": {
@@ -11,11 +11,11 @@
11
11
  "url": "git+https://github.com/rdflib/prez-ui.git",
12
12
  "directory": "packages/create-prez-app"
13
13
  },
14
- "keywords": [
15
- "template"
16
- ],
14
+ "homepage": "https://github.com/rdflib/prez-ui/tree/main/packages/create-prez-app#readme",
17
15
  "bugs": {
18
16
  "url": "https://github.com/rdflib/prez-ui/issues"
19
17
  },
20
- "homepage": "https://github.com/rdflib/prez-ui/tree/main/packages/create-prez-app#readme"
18
+ "keywords": [
19
+ "template"
20
+ ]
21
21
  }
@@ -8,12 +8,26 @@ In the project root directory, install with your NPM package manager of choice (
8
8
  npm install
9
9
  ```
10
10
 
11
+ or for pnpm:
12
+
13
+ ```bash
14
+ pnpm install
15
+ ```
16
+
11
17
  Then preview your theme by running:
12
18
 
13
19
  ```bash
14
20
  npm run dev
15
21
  ```
16
22
 
23
+ or for pnpm:
24
+
25
+ ```bash
26
+ pnpm dev
27
+ ```
28
+
29
+ You may need to open the dev server (http://localhost:3000) in a second window in a private tab or different browser on first load to resolve the layout rendering error.
30
+
17
31
  ## Configuration
18
32
  ### Environment Variables
19
33
  The main configuration required for running Prez UI are done with environment variables:
@@ -35,10 +49,10 @@ The `nuxt.config.ts` file contains your configuration for Nuxt, which extends up
35
49
  See the [Nuxt config docs](https://nuxt.com/docs/getting-started/configuration) for more info on how to configure Nuxt.
36
50
 
37
51
  ### App Config
38
- The `app.config.ts` file contains your app-level config, where you can customise the navigation items, renaming items throughout the application, customising prepended items in the breadcrumbs, and pagination config. This app config extends upon Prez UI's [base layer app config](https://github.com/rdflib/prez-ui/blob/main/packages/prez-ui/app.config.ts).
52
+ The `app/app.config.ts` file contains your app-level config, where you can customise the navigation items, renaming items throughout the application, customising prepended items in the breadcrumbs, and pagination config. This app config extends upon Prez UI's [base layer app config](https://github.com/RDFLib/prez-ui/blob/main/packages/prez-ui/app/app.config.ts).
39
53
 
40
54
  ## Extending your theme
41
- This starter template uses [Nuxt](https://nuxt.com) [layers](https://nuxt.com/docs/getting-started/layers) to extend upon the base Prez UI layer application, so you only need to customise what you need.
55
+ This starter template uses [layers](https://nuxt.com/docs/getting-started/layers) to extend upon the base Prez UI layer application, so you only need to customise what you need.
42
56
 
43
57
  Overriding pages, components, layouts, composables and utils can be done by simply creating a file of the same name in the same directory structure for Nuxt to automatically replace it with your version in the application. Refer to Prez UI's base layer [source code](https://github.com/rdflib/prez-ui/tree/main/packages/prez-ui) to help you override files.
44
58
 
@@ -50,35 +64,48 @@ See our [theming documentation](https://github.com/rdflib/prez-ui/blob/main/docs
50
64
  ### Tailwind & CSS
51
65
  Prez UI uses [Tailwind](https://tailwindcss.com) for most of its styling, which you can use in this starter template to easily style using classes.
52
66
 
53
- To override Prez UI's colour scheme (e.g. `primary`, `secondary`, etc.), or add your own variables to use in Tailwind, simply add a CSS variable of the same name in `assets/css/tailwind.css` under `:root` with its colour values in HSL **without** the `hsl()` function. Then register those variables in `tailwind.config.js` wrapped in the `hsl()` function under `theme.extend.colors`, e.g.:
67
+ To override Prez UI's colour scheme (e.g. `primary`, `secondary`, etc.), or add your own variables to use in Tailwind, simply add a CSS variable of the same name in `app/assets/css/tailwind.css` under `:root` with its colour values in HSL **without** commas between values. Dark mode variants of those variables goes in the `.dark` block. New variables are registered in the `@theme inline` block in the same file. For colours, prefix the variable with `--color-*`, e.g.:
54
68
 
55
- ```javascript
56
- // tailwind.config.js
57
- module.exports = {
58
- ...
59
- theme: {
60
- extend: {
61
- colors: {
62
- // add your CSS variables here, e.g.:
63
- primary: {
64
- DEFAULT: "hsl(var(--primary))",
65
- foreground: "hsl(var(--primary-foreground))",
66
- },
67
- }
68
- }
69
- }
69
+ ```CSS
70
+ /* app/assets/css/tailwind.css */
71
+
72
+ ...
73
+
74
+ :root {
75
+ /* define your Tailwind CSS variables (in HSL without commas) here */
76
+
77
+ /* overridden variables */
78
+ --primary: hsl(24.6 95% 53.1%);
79
+ --primary-foreground: hsl(60 9.1% 97.8%);
80
+
81
+ /* new variable */
82
+ --my-new-variable: hsl(70 10.8% 91.3%);
83
+ }
84
+
85
+ .dark {
86
+ /* dark mode variants of CSS variables go here */
87
+ }
88
+
89
+ @theme inline {
70
90
  ...
91
+ /* any new tailwind variables you declare go here. Colours are prefixed with --color-* */
92
+ --color-my-new-variable: var(--my-new-variable);
71
93
  }
72
94
  ```
73
95
 
74
- You can also style your Prez UI theme using normal CSS by adding your styles to `assets/css/theme.css`.
96
+ You can also style your Prez UI theme using normal CSS by adding your styles to `app/assets/css/theme.css`.
75
97
 
76
98
  ### Shadcn Components
77
- Prez UI uses the [prez-components](https://github.com/rdflib/prez-ui/tree/main/packages/prez-components) component library, which is based on the [shadcn-vue](https://www.shadcn-vue.com) component library. Shad comes preinstalled in this starter template, but if you need to add shadcn components in your theme, run a command like the following:
99
+ Prez UI uses the [prez-components](https://github.com/rdflib/prez-ui/tree/main/packages/prez-components) component library, which is based on the [shadcn-vue](https://www.shadcn-vue.com) component library. Shad comes preinstalled in this starter template, but if you need to add more shadcn components in your theme, run a command like the following:
100
+
101
+ ```bash
102
+ npx shadcn-vue@latest add <component>
103
+ ```
104
+
105
+ or
78
106
 
79
107
  ```bash
80
- npx shadcn-vue@latest add button
108
+ pnpm dlx shadcn-vue@latest add <component>
81
109
  ```
82
- *(Note: for pnpm, run `pnpm dlx` instead of `npx`)*
83
110
 
84
- These components are stored in `components/ui`, which should be kept separate to your theme's components.
111
+ These components are stored in `app/components/ui`, which should be kept separate to your theme's components.
@@ -0,0 +1,67 @@
1
+ @import "tailwindcss";
2
+ @import "tw-animate-css";
3
+ @source "../../../node_modules/prez-ui";
4
+
5
+ @custom-variant dark (&:is(.dark *));
6
+
7
+ :root {
8
+ /* overridden or new CSS variables go here, in hsl() without commas */
9
+ }
10
+
11
+ .dark {
12
+ /* dark mode variants of CSS variables go here */
13
+ }
14
+
15
+ @theme inline {
16
+ /* do not delete the below variables as these are required for default Tailwind variables to work in Nuxt layers */
17
+ --color-background: var(--background);
18
+ --color-foreground: var(--foreground);
19
+ --color-card: var(--card);
20
+ --color-card-foreground: var(--card-foreground);
21
+ --color-popover: var(--popover);
22
+ --color-popover-foreground: var(--popover-foreground);
23
+ --color-primary: var(--primary);
24
+ --color-primary-foreground: var(--primary-foreground);
25
+ --color-secondary: var(--secondary);
26
+ --color-secondary-foreground: var(--secondary-foreground);
27
+ --color-tertiary: var(--tertiary);
28
+ --color-tertiary-foreground: var(--tertiary-foreground);
29
+ --color-link: var(--link);
30
+ --color-link-foreground: var(--link-foreground);
31
+ --color-muted: var(--muted);
32
+ --color-muted-foreground: var(--muted-foreground);
33
+ --color-accent: var(--accent);
34
+ --color-accent-foreground: var(--accent-foreground);
35
+ --color-destructive: var(--destructive);
36
+ --color-destructive-foreground: var(--destructive-foreground);
37
+ --color-border: var(--border);
38
+ --color-input: var(--input);
39
+ --color-ring: var(--ring);
40
+ --color-chart-1: var(--chart-1);
41
+ --color-chart-2: var(--chart-2);
42
+ --color-chart-3: var(--chart-3);
43
+ --color-chart-4: var(--chart-4);
44
+ --color-chart-5: var(--chart-5);
45
+ --radius-sm: calc(var(--radius) - 4px);
46
+ --radius-md: calc(var(--radius) - 2px);
47
+ --radius-lg: var(--radius);
48
+ --radius-xl: calc(var(--radius) + 4px);
49
+ --color-sidebar: var(--sidebar);
50
+ --color-sidebar-foreground: var(--sidebar-foreground);
51
+ --color-sidebar-primary: var(--sidebar-primary);
52
+ --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
53
+ --color-sidebar-accent: var(--sidebar-accent);
54
+ --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
55
+ --color-sidebar-border: var(--sidebar-border);
56
+ --color-sidebar-ring: var(--sidebar-ring);
57
+ /* any new tailwind variables you declare go here, following the above syntax. Colours are prefixed with --color-* */
58
+ }
59
+
60
+ @layer base {
61
+ * {
62
+ @apply border-border outline-ring/50;
63
+ }
64
+ body {
65
+ @apply bg-background text-foreground;
66
+ }
67
+ }
@@ -0,0 +1,25 @@
1
+ <script setup lang="ts">
2
+ import type { PrimitiveProps } from 'reka-ui'
3
+ import type { HTMLAttributes } from 'vue'
4
+ import { reactiveOmit } from '@vueuse/core'
5
+ import { Primitive } from 'reka-ui'
6
+ import { cn } from '@/lib/utils'
7
+ import { type BadgeVariants, badgeVariants } from '.'
8
+
9
+ const props = defineProps<PrimitiveProps & {
10
+ variant?: BadgeVariants['variant']
11
+ class?: HTMLAttributes['class']
12
+ }>()
13
+
14
+ const delegatedProps = reactiveOmit(props, 'class')
15
+ </script>
16
+
17
+ <template>
18
+ <Primitive
19
+ data-slot="badge"
20
+ :class="cn(badgeVariants({ variant }), props.class)"
21
+ v-bind="delegatedProps"
22
+ >
23
+ <slot />
24
+ </Primitive>
25
+ </template>
@@ -0,0 +1,25 @@
1
+ import { cva, type VariantProps } from 'class-variance-authority'
2
+
3
+ export { default as Badge } from './Badge.vue'
4
+
5
+ export const badgeVariants = cva(
6
+ 'inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden',
7
+ {
8
+ variants: {
9
+ variant: {
10
+ default:
11
+ 'border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90',
12
+ secondary:
13
+ 'border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90',
14
+ destructive:
15
+ 'border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60',
16
+ outline:
17
+ 'text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground',
18
+ },
19
+ },
20
+ defaultVariants: {
21
+ variant: 'default',
22
+ },
23
+ },
24
+ )
25
+ export type BadgeVariants = VariantProps<typeof badgeVariants>
@@ -1,7 +1,7 @@
1
1
  <script setup lang="ts">
2
2
  import type { HTMLAttributes } from 'vue'
3
+ import { Primitive, type PrimitiveProps } from 'reka-ui'
3
4
  import { cn } from '@/lib/utils'
4
- import { Primitive, type PrimitiveProps } from 'radix-vue'
5
5
  import { type ButtonVariants, buttonVariants } from '.'
6
6
 
7
7
  interface Props extends PrimitiveProps {
@@ -17,9 +17,10 @@ const props = withDefaults(defineProps<Props>(), {
17
17
 
18
18
  <template>
19
19
  <Primitive
20
+ data-slot="button"
20
21
  :as="as"
21
22
  :as-child="asChild"
22
- :class="cn('btn', buttonVariants({ variant, size }), props.class)"
23
+ :class="cn(buttonVariants({ variant, size }), 'cursor-pointer btn', props.class)"
23
24
  >
24
25
  <slot />
25
26
  </Primitive>
@@ -0,0 +1,36 @@
1
+ import { cva, type VariantProps } from 'class-variance-authority'
2
+
3
+ export { default as Button } from './Button.vue'
4
+
5
+ export const buttonVariants = cva(
6
+ 'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*=\'size-\'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',
7
+ {
8
+ variants: {
9
+ variant: {
10
+ default:
11
+ 'bg-primary text-primary-foreground shadow-xs hover:bg-primary/90',
12
+ destructive:
13
+ 'bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60',
14
+ outline:
15
+ 'border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50',
16
+ secondary:
17
+ 'bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80',
18
+ ghost:
19
+ 'hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50',
20
+ link: 'text-primary underline-offset-4 hover:underline',
21
+ },
22
+ size: {
23
+ default: 'h-9 px-4 py-2 has-[>svg]:px-3',
24
+ sm: 'h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5',
25
+ lg: 'h-10 rounded-md px-6 has-[>svg]:px-4',
26
+ icon: 'size-9',
27
+ },
28
+ },
29
+ defaultVariants: {
30
+ variant: 'default',
31
+ size: 'default',
32
+ },
33
+ },
34
+ )
35
+
36
+ export type ButtonVariants = VariantProps<typeof buttonVariants>
@@ -0,0 +1,33 @@
1
+ <script setup lang="ts">
2
+ import type { HTMLAttributes } from 'vue'
3
+ import { useVModel } from '@vueuse/core'
4
+ import { cn } from '@/lib/utils'
5
+
6
+ const props = defineProps<{
7
+ defaultValue?: string | number
8
+ modelValue?: string | number
9
+ class?: HTMLAttributes['class']
10
+ }>()
11
+
12
+ const emits = defineEmits<{
13
+ (e: 'update:modelValue', payload: string | number): void
14
+ }>()
15
+
16
+ const modelValue = useVModel(props, 'modelValue', emits, {
17
+ passive: true,
18
+ defaultValue: props.defaultValue,
19
+ })
20
+ </script>
21
+
22
+ <template>
23
+ <input
24
+ v-model="modelValue"
25
+ data-slot="input"
26
+ :class="cn(
27
+ 'file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',
28
+ 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]',
29
+ 'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',
30
+ props.class,
31
+ )"
32
+ >
33
+ </template>
@@ -0,0 +1,25 @@
1
+ <script setup lang="ts">
2
+ import type { HTMLAttributes } from 'vue'
3
+ import { reactiveOmit } from '@vueuse/core'
4
+ import { PaginationRoot, type PaginationRootEmits, type PaginationRootProps, useForwardPropsEmits } from 'reka-ui'
5
+ import { cn } from '@/lib/utils'
6
+
7
+ const props = defineProps<PaginationRootProps & {
8
+ class?: HTMLAttributes['class']
9
+ }>()
10
+ const emits = defineEmits<PaginationRootEmits>()
11
+
12
+ const delegatedProps = reactiveOmit(props, 'class')
13
+ const forwarded = useForwardPropsEmits(delegatedProps, emits)
14
+ </script>
15
+
16
+ <template>
17
+ <PaginationRoot
18
+ v-slot="slotProps"
19
+ data-slot="pagination"
20
+ v-bind="forwarded"
21
+ :class="cn('mx-auto flex w-full justify-center', props.class)"
22
+ >
23
+ <slot v-bind="slotProps" />
24
+ </PaginationRoot>
25
+ </template>
@@ -0,0 +1,21 @@
1
+ <script setup lang="ts">
2
+ import type { HTMLAttributes } from 'vue'
3
+ import { reactiveOmit } from '@vueuse/core'
4
+ import { PaginationList, type PaginationListProps } from 'reka-ui'
5
+ import { cn } from '@/lib/utils'
6
+
7
+ const props = defineProps<PaginationListProps & { class?: HTMLAttributes['class'] }>()
8
+
9
+ const delegatedProps = reactiveOmit(props, 'class')
10
+ </script>
11
+
12
+ <template>
13
+ <PaginationList
14
+ v-slot="slotProps"
15
+ data-slot="pagination-content"
16
+ v-bind="delegatedProps"
17
+ :class="cn('flex flex-row items-center gap-1', props.class)"
18
+ >
19
+ <slot v-bind="slotProps" />
20
+ </PaginationList>
21
+ </template>
@@ -0,0 +1,24 @@
1
+ <script setup lang="ts">
2
+ import type { HTMLAttributes } from 'vue'
3
+ import { reactiveOmit } from '@vueuse/core'
4
+ import { MoreHorizontal } from 'lucide-vue-next'
5
+ import { PaginationEllipsis, type PaginationEllipsisProps } from 'reka-ui'
6
+ import { cn } from '@/lib/utils'
7
+
8
+ const props = defineProps<PaginationEllipsisProps & { class?: HTMLAttributes['class'] }>()
9
+
10
+ const delegatedProps = reactiveOmit(props, 'class')
11
+ </script>
12
+
13
+ <template>
14
+ <PaginationEllipsis
15
+ data-slot="pagination-ellipsis"
16
+ v-bind="delegatedProps"
17
+ :class="cn('flex size-9 items-center justify-center', props.class)"
18
+ >
19
+ <slot>
20
+ <MoreHorizontal class="size-4" />
21
+ <span class="sr-only">More pages</span>
22
+ </slot>
23
+ </PaginationEllipsis>
24
+ </template>
@@ -0,0 +1,32 @@
1
+ <script setup lang="ts">
2
+ import type { PaginationFirstProps } from 'reka-ui'
3
+ import type { HTMLAttributes } from 'vue'
4
+ import { reactiveOmit } from '@vueuse/core'
5
+ import { ChevronLeftIcon } from 'lucide-vue-next'
6
+ import { PaginationFirst, useForwardProps } from 'reka-ui'
7
+ import { cn } from '@/lib/utils'
8
+ import { buttonVariants, type ButtonVariants } from '@/components/ui/button'
9
+
10
+ const props = withDefaults(defineProps<PaginationFirstProps & {
11
+ size?: ButtonVariants['size']
12
+ class?: HTMLAttributes['class']
13
+ }>(), {
14
+ size: 'default',
15
+ })
16
+
17
+ const delegatedProps = reactiveOmit(props, 'class', 'size')
18
+ const forwarded = useForwardProps(delegatedProps)
19
+ </script>
20
+
21
+ <template>
22
+ <PaginationFirst
23
+ data-slot="pagination-first"
24
+ :class="cn(buttonVariants({ variant: 'ghost', size }), 'gap-1 px-2.5 sm:pr-2.5', props.class)"
25
+ v-bind="forwarded"
26
+ >
27
+ <slot>
28
+ <ChevronLeftIcon />
29
+ <span class="hidden sm:block">First</span>
30
+ </slot>
31
+ </PaginationFirst>
32
+ </template>
@@ -0,0 +1,32 @@
1
+ <script setup lang="ts">
2
+ import type { HTMLAttributes } from 'vue'
3
+ import { reactiveOmit } from '@vueuse/core'
4
+ import { PaginationListItem, type PaginationListItemProps } from 'reka-ui'
5
+ import { cn } from '@/lib/utils'
6
+ import { buttonVariants, type ButtonVariants } from '@/components/ui/button'
7
+
8
+ const props = withDefaults(defineProps<PaginationListItemProps & {
9
+ size?: ButtonVariants['size']
10
+ class?: HTMLAttributes['class']
11
+ isActive?: boolean
12
+ }>(), {
13
+ size: 'icon',
14
+ })
15
+
16
+ const delegatedProps = reactiveOmit(props, 'class', 'size', 'isActive')
17
+ </script>
18
+
19
+ <template>
20
+ <PaginationListItem
21
+ data-slot="pagination-item"
22
+ v-bind="delegatedProps"
23
+ :class="cn(
24
+ buttonVariants({
25
+ variant: isActive ? 'outline' : 'ghost',
26
+ size,
27
+ }),
28
+ props.class)"
29
+ >
30
+ <slot />
31
+ </PaginationListItem>
32
+ </template>
@@ -0,0 +1,32 @@
1
+ <script setup lang="ts">
2
+ import type { PaginationLastProps } from 'reka-ui'
3
+ import type { HTMLAttributes } from 'vue'
4
+ import { reactiveOmit } from '@vueuse/core'
5
+ import { ChevronRightIcon } from 'lucide-vue-next'
6
+ import { PaginationLast, useForwardProps } from 'reka-ui'
7
+ import { cn } from '@/lib/utils'
8
+ import { buttonVariants, type ButtonVariants } from '@/components/ui/button'
9
+
10
+ const props = withDefaults(defineProps<PaginationLastProps & {
11
+ size?: ButtonVariants['size']
12
+ class?: HTMLAttributes['class']
13
+ }>(), {
14
+ size: 'default',
15
+ })
16
+
17
+ const delegatedProps = reactiveOmit(props, 'class', 'size')
18
+ const forwarded = useForwardProps(delegatedProps)
19
+ </script>
20
+
21
+ <template>
22
+ <PaginationLast
23
+ data-slot="pagination-last"
24
+ :class="cn(buttonVariants({ variant: 'ghost', size }), 'gap-1 px-2.5 sm:pr-2.5', props.class)"
25
+ v-bind="forwarded"
26
+ >
27
+ <slot>
28
+ <span class="hidden sm:block">Last</span>
29
+ <ChevronRightIcon />
30
+ </slot>
31
+ </PaginationLast>
32
+ </template>
@@ -0,0 +1,32 @@
1
+ <script setup lang="ts">
2
+ import type { PaginationNextProps } from 'reka-ui'
3
+ import type { HTMLAttributes } from 'vue'
4
+ import { reactiveOmit } from '@vueuse/core'
5
+ import { ChevronRightIcon } from 'lucide-vue-next'
6
+ import { PaginationNext, useForwardProps } from 'reka-ui'
7
+ import { cn } from '@/lib/utils'
8
+ import { buttonVariants, type ButtonVariants } from '@/components/ui/button'
9
+
10
+ const props = withDefaults(defineProps<PaginationNextProps & {
11
+ size?: ButtonVariants['size']
12
+ class?: HTMLAttributes['class']
13
+ }>(), {
14
+ size: 'default',
15
+ })
16
+
17
+ const delegatedProps = reactiveOmit(props, 'class', 'size')
18
+ const forwarded = useForwardProps(delegatedProps)
19
+ </script>
20
+
21
+ <template>
22
+ <PaginationNext
23
+ data-slot="pagination-next"
24
+ :class="cn(buttonVariants({ variant: 'ghost', size }), 'gap-1 px-2.5 sm:pr-2.5', props.class)"
25
+ v-bind="forwarded"
26
+ >
27
+ <slot>
28
+ <span class="hidden sm:block">Next</span>
29
+ <ChevronRightIcon />
30
+ </slot>
31
+ </PaginationNext>
32
+ </template>
@@ -0,0 +1,32 @@
1
+ <script setup lang="ts">
2
+ import type { PaginationPrevProps } from 'reka-ui'
3
+ import type { HTMLAttributes } from 'vue'
4
+ import { reactiveOmit } from '@vueuse/core'
5
+ import { ChevronLeftIcon } from 'lucide-vue-next'
6
+ import { PaginationPrev, useForwardProps } from 'reka-ui'
7
+ import { cn } from '@/lib/utils'
8
+ import { buttonVariants, type ButtonVariants } from '@/components/ui/button'
9
+
10
+ const props = withDefaults(defineProps<PaginationPrevProps & {
11
+ size?: ButtonVariants['size']
12
+ class?: HTMLAttributes['class']
13
+ }>(), {
14
+ size: 'default',
15
+ })
16
+
17
+ const delegatedProps = reactiveOmit(props, 'class', 'size')
18
+ const forwarded = useForwardProps(delegatedProps)
19
+ </script>
20
+
21
+ <template>
22
+ <PaginationPrev
23
+ data-slot="pagination-previous"
24
+ :class="cn(buttonVariants({ variant: 'ghost', size }), 'gap-1 px-2.5 sm:pr-2.5', props.class)"
25
+ v-bind="forwarded"
26
+ >
27
+ <slot>
28
+ <ChevronLeftIcon />
29
+ <span class="hidden sm:block">Previous</span>
30
+ </slot>
31
+ </PaginationPrev>
32
+ </template>
@@ -1,10 +1,8 @@
1
+ export { default as Pagination } from './Pagination.vue'
2
+ export { default as PaginationContent } from './PaginationContent.vue'
1
3
  export { default as PaginationEllipsis } from './PaginationEllipsis.vue'
2
4
  export { default as PaginationFirst } from './PaginationFirst.vue'
5
+ export { default as PaginationItem } from './PaginationItem.vue'
3
6
  export { default as PaginationLast } from './PaginationLast.vue'
4
7
  export { default as PaginationNext } from './PaginationNext.vue'
5
- export { default as PaginationPrev } from './PaginationPrev.vue'
6
- export {
7
- PaginationList,
8
- PaginationListItem,
9
- PaginationRoot as Pagination,
10
- } from 'radix-vue'
8
+ export { default as PaginationPrevious } from './PaginationPrevious.vue'
@@ -0,0 +1,18 @@
1
+ <script setup lang="ts">
2
+ import type { SelectRootEmits, SelectRootProps } from "reka-ui"
3
+ import { SelectRoot, useForwardPropsEmits } from "reka-ui"
4
+
5
+ const props = defineProps<SelectRootProps>()
6
+ const emits = defineEmits<SelectRootEmits>()
7
+
8
+ const forwarded = useForwardPropsEmits(props, emits)
9
+ </script>
10
+
11
+ <template>
12
+ <SelectRoot
13
+ data-slot="select"
14
+ v-bind="forwarded"
15
+ >
16
+ <slot />
17
+ </SelectRoot>
18
+ </template>