@wordup-md/nuxt-layer-shadcn-unocss 0.2.9 → 0.2.11
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/.playground/nuxt.config.ts +2 -1
- package/components/content/Badge.vue +2 -0
- package/components/ui/combobox/Combobox.vue +15 -0
- package/components/ui/combobox/ComboboxAnchor.vue +22 -0
- package/components/ui/combobox/ComboboxEmpty.vue +20 -0
- package/components/ui/combobox/ComboboxGroup.vue +29 -0
- package/components/ui/combobox/ComboboxInput.vue +26 -0
- package/components/ui/combobox/ComboboxItem.vue +23 -0
- package/components/ui/combobox/ComboboxList.vue +31 -0
- package/components/ui/combobox/ComboboxSeparator.vue +20 -0
- package/components/ui/combobox/ComboboxTrigger.vue +23 -0
- package/components/ui/combobox/index.ts +10 -0
- package/composables/useConfig.ts +1 -0
- package/index.d.ts +6 -0
- package/package.json +1 -1
- package/pages/[...slug].vue +1 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { ComboboxRootEmits, ComboboxRootProps } from 'reka-ui'
|
|
3
|
+
import { ComboboxRoot, useForwardPropsEmits } from 'reka-ui'
|
|
4
|
+
|
|
5
|
+
const props = defineProps<ComboboxRootProps>()
|
|
6
|
+
const emits = defineEmits<ComboboxRootEmits>()
|
|
7
|
+
|
|
8
|
+
const forwarded = useForwardPropsEmits(props, emits)
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<ComboboxRoot v-bind="forwarded">
|
|
13
|
+
<slot />
|
|
14
|
+
</ComboboxRoot>
|
|
15
|
+
</template>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { ComboboxAnchorProps } from 'reka-ui'
|
|
3
|
+
import type { HTMLAttributes } from 'vue'
|
|
4
|
+
import { reactiveOmit } from '@vueuse/core'
|
|
5
|
+
import { ComboboxAnchor, useForwardProps } from 'reka-ui'
|
|
6
|
+
import { cn } from '@/lib/utils'
|
|
7
|
+
|
|
8
|
+
const props = defineProps<ComboboxAnchorProps & { class?: HTMLAttributes['class'] }>()
|
|
9
|
+
|
|
10
|
+
const delegatedProps = reactiveOmit(props, 'class')
|
|
11
|
+
|
|
12
|
+
const forwarded = useForwardProps(delegatedProps)
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<ComboboxAnchor
|
|
17
|
+
v-bind="forwarded"
|
|
18
|
+
:class="cn('w-[200px]', props.class)"
|
|
19
|
+
>
|
|
20
|
+
<slot />
|
|
21
|
+
</ComboboxAnchor>
|
|
22
|
+
</template>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { ComboboxEmptyProps } from 'reka-ui'
|
|
3
|
+
import type { HTMLAttributes } from 'vue'
|
|
4
|
+
import { reactiveOmit } from '@vueuse/core'
|
|
5
|
+
import { ComboboxEmpty } from 'reka-ui'
|
|
6
|
+
import { cn } from '@/lib/utils'
|
|
7
|
+
|
|
8
|
+
const props = defineProps<ComboboxEmptyProps & { class?: HTMLAttributes['class'] }>()
|
|
9
|
+
|
|
10
|
+
const delegatedProps = reactiveOmit(props, 'class')
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<template>
|
|
14
|
+
<ComboboxEmpty
|
|
15
|
+
v-bind="delegatedProps"
|
|
16
|
+
:class="cn('py-6 text-center text-sm', props.class)"
|
|
17
|
+
>
|
|
18
|
+
<slot />
|
|
19
|
+
</ComboboxEmpty>
|
|
20
|
+
</template>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { ComboboxGroupProps } from 'reka-ui'
|
|
3
|
+
import type { HTMLAttributes } from 'vue'
|
|
4
|
+
import { reactiveOmit } from '@vueuse/core'
|
|
5
|
+
import { ComboboxGroup, ComboboxLabel } from 'reka-ui'
|
|
6
|
+
import { cn } from '@/lib/utils'
|
|
7
|
+
|
|
8
|
+
const props = defineProps<ComboboxGroupProps & {
|
|
9
|
+
class?: HTMLAttributes['class']
|
|
10
|
+
heading?: string
|
|
11
|
+
}>()
|
|
12
|
+
|
|
13
|
+
const delegatedProps = reactiveOmit(props, 'class')
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<ComboboxGroup
|
|
18
|
+
v-bind="delegatedProps"
|
|
19
|
+
:class="cn('overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground', props.class)"
|
|
20
|
+
>
|
|
21
|
+
<ComboboxLabel
|
|
22
|
+
v-if="heading"
|
|
23
|
+
class="px-2 py-1.5 text-xs font-medium text-muted-foreground"
|
|
24
|
+
>
|
|
25
|
+
{{ heading }}
|
|
26
|
+
</ComboboxLabel>
|
|
27
|
+
<slot />
|
|
28
|
+
</ComboboxGroup>
|
|
29
|
+
</template>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { ComboboxInputEmits, ComboboxInputProps } from 'reka-ui'
|
|
3
|
+
import type { HTMLAttributes } from 'vue'
|
|
4
|
+
import { reactiveOmit } from '@vueuse/core'
|
|
5
|
+
import { ComboboxInput, useForwardPropsEmits } from 'reka-ui'
|
|
6
|
+
import { cn } from '@/lib/utils'
|
|
7
|
+
|
|
8
|
+
const props = defineProps<ComboboxInputProps & {
|
|
9
|
+
class?: HTMLAttributes['class']
|
|
10
|
+
}>()
|
|
11
|
+
|
|
12
|
+
const emits = defineEmits<ComboboxInputEmits>()
|
|
13
|
+
|
|
14
|
+
const delegatedProps = reactiveOmit(props, 'class')
|
|
15
|
+
|
|
16
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<template>
|
|
20
|
+
<ComboboxInput
|
|
21
|
+
v-bind="forwarded"
|
|
22
|
+
:class="cn('flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50', props.class)"
|
|
23
|
+
>
|
|
24
|
+
<slot />
|
|
25
|
+
</ComboboxInput>
|
|
26
|
+
</template>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { ComboboxItemEmits, ComboboxItemProps } from 'reka-ui'
|
|
3
|
+
import type { HTMLAttributes } from 'vue'
|
|
4
|
+
import { reactiveOmit } from '@vueuse/core'
|
|
5
|
+
import { ComboboxItem, useForwardPropsEmits } from 'reka-ui'
|
|
6
|
+
import { cn } from '@/lib/utils'
|
|
7
|
+
|
|
8
|
+
const props = defineProps<ComboboxItemProps & { class?: HTMLAttributes['class'] }>()
|
|
9
|
+
const emits = defineEmits<ComboboxItemEmits>()
|
|
10
|
+
|
|
11
|
+
const delegatedProps = reactiveOmit(props, 'class')
|
|
12
|
+
|
|
13
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<ComboboxItem
|
|
18
|
+
v-bind="forwarded"
|
|
19
|
+
:class="cn('relative flex cursor-default gap-2 select-none justify-between items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:size-4 [&_svg]:shrink-0', props.class)"
|
|
20
|
+
>
|
|
21
|
+
<slot />
|
|
22
|
+
</ComboboxItem>
|
|
23
|
+
</template>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { ComboboxContentEmits, ComboboxContentProps } from 'reka-ui'
|
|
3
|
+
import type { HTMLAttributes } from 'vue'
|
|
4
|
+
import { reactiveOmit } from '@vueuse/core'
|
|
5
|
+
import { ComboboxContent, ComboboxPortal, ComboboxViewport, useForwardPropsEmits } from 'reka-ui'
|
|
6
|
+
import { cn } from '@/lib/utils'
|
|
7
|
+
|
|
8
|
+
const props = withDefaults(defineProps<ComboboxContentProps & { class?: HTMLAttributes['class'] }>(), {
|
|
9
|
+
position: 'popper',
|
|
10
|
+
align: 'center',
|
|
11
|
+
sideOffset: 4,
|
|
12
|
+
})
|
|
13
|
+
const emits = defineEmits<ComboboxContentEmits>()
|
|
14
|
+
|
|
15
|
+
const delegatedProps = reactiveOmit(props, 'class')
|
|
16
|
+
|
|
17
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<template>
|
|
21
|
+
<ComboboxPortal>
|
|
22
|
+
<ComboboxContent
|
|
23
|
+
v-bind="forwarded"
|
|
24
|
+
:class="cn('z-50 w-[200px] rounded-md border bg-popover text-popover-foreground shadow-md outline-none 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)"
|
|
25
|
+
>
|
|
26
|
+
<ComboboxViewport>
|
|
27
|
+
<slot />
|
|
28
|
+
</ComboboxViewport>
|
|
29
|
+
</ComboboxContent>
|
|
30
|
+
</ComboboxPortal>
|
|
31
|
+
</template>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { ComboboxSeparatorProps } from 'reka-ui'
|
|
3
|
+
import type { HTMLAttributes } from 'vue'
|
|
4
|
+
import { reactiveOmit } from '@vueuse/core'
|
|
5
|
+
import { ComboboxSeparator } from 'reka-ui'
|
|
6
|
+
import { cn } from '@/lib/utils'
|
|
7
|
+
|
|
8
|
+
const props = defineProps<ComboboxSeparatorProps & { class?: HTMLAttributes['class'] }>()
|
|
9
|
+
|
|
10
|
+
const delegatedProps = reactiveOmit(props, 'class')
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<template>
|
|
14
|
+
<ComboboxSeparator
|
|
15
|
+
v-bind="delegatedProps"
|
|
16
|
+
:class="cn('-mx-1 h-px bg-border', props.class)"
|
|
17
|
+
>
|
|
18
|
+
<slot />
|
|
19
|
+
</ComboboxSeparator>
|
|
20
|
+
</template>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { ComboboxTriggerProps } from 'reka-ui'
|
|
3
|
+
import type { HTMLAttributes } from 'vue'
|
|
4
|
+
import { reactiveOmit } from '@vueuse/core'
|
|
5
|
+
import { ComboboxTrigger, useForwardProps } from 'reka-ui'
|
|
6
|
+
import { cn } from '@/lib/utils'
|
|
7
|
+
|
|
8
|
+
const props = defineProps<ComboboxTriggerProps & { class?: HTMLAttributes['class'] }>()
|
|
9
|
+
|
|
10
|
+
const delegatedProps = reactiveOmit(props, 'class')
|
|
11
|
+
|
|
12
|
+
const forwarded = useForwardProps(delegatedProps)
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<ComboboxTrigger
|
|
17
|
+
v-bind="forwarded"
|
|
18
|
+
:class="cn('', props.class)"
|
|
19
|
+
tabindex="0"
|
|
20
|
+
>
|
|
21
|
+
<slot />
|
|
22
|
+
</ComboboxTrigger>
|
|
23
|
+
</template>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { default as Combobox } from './Combobox.vue'
|
|
2
|
+
export { default as ComboboxAnchor } from './ComboboxAnchor.vue'
|
|
3
|
+
export { default as ComboboxEmpty } from './ComboboxEmpty.vue'
|
|
4
|
+
export { default as ComboboxGroup } from './ComboboxGroup.vue'
|
|
5
|
+
export { default as ComboboxInput } from './ComboboxInput.vue'
|
|
6
|
+
export { default as ComboboxItem } from './ComboboxItem.vue'
|
|
7
|
+
export { default as ComboboxList } from './ComboboxList.vue'
|
|
8
|
+
export { default as ComboboxSeparator } from './ComboboxSeparator.vue'
|
|
9
|
+
|
|
10
|
+
export { ComboboxCancel, ComboboxItemIndicator, ComboboxTrigger } from 'reka-ui'
|
package/composables/useConfig.ts
CHANGED
package/index.d.ts
CHANGED
package/package.json
CHANGED
package/pages/[...slug].vue
CHANGED