@bl33dz/fa814698dcde12f86a37ac31dd3aedf9 1.0.18 → 1.0.19
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/dist/perisai-ui.es.js +898 -883
- package/dist/perisai-ui.umd.js +1 -1
- package/package.json +1 -1
- package/src/ui/SelectGroup.vue +6 -0
- package/src/ui/SelectValue.vue +10 -1
- package/src/ui/select.vue +21 -10
package/package.json
CHANGED
package/src/ui/SelectGroup.vue
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { SelectGroup as RekaSelectGroup } from "reka-ui"
|
|
3
|
+
import { cn } from "./utils"
|
|
4
|
+
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
class: String
|
|
7
|
+
})
|
|
3
8
|
</script>
|
|
4
9
|
|
|
5
10
|
<template>
|
|
6
11
|
<RekaSelectGroup
|
|
7
12
|
data-slot="select-group"
|
|
13
|
+
:class="cn(props.class)"
|
|
8
14
|
v-bind="$attrs"
|
|
9
15
|
>
|
|
10
16
|
<slot />
|
package/src/ui/SelectValue.vue
CHANGED
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { SelectValue } from '@/shadcn/select';
|
|
3
|
+
import { cn } from './utils';
|
|
4
|
+
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
class: String,
|
|
7
|
+
});
|
|
3
8
|
</script>
|
|
4
9
|
|
|
5
10
|
<template>
|
|
6
|
-
<SelectValue
|
|
11
|
+
<SelectValue
|
|
12
|
+
data-slot="select-value"
|
|
13
|
+
:class="cn(props.class)"
|
|
14
|
+
v-bind="$attrs"
|
|
15
|
+
>
|
|
7
16
|
<slot />
|
|
8
17
|
</SelectValue>
|
|
9
18
|
</template>
|
package/src/ui/select.vue
CHANGED
|
@@ -18,19 +18,24 @@
|
|
|
18
18
|
v-else
|
|
19
19
|
v-model="internalValue"
|
|
20
20
|
:disabled="disabled"
|
|
21
|
+
:class="mergedClass"
|
|
21
22
|
>
|
|
22
23
|
<SelectTrigger class="w-full">
|
|
23
|
-
<
|
|
24
|
+
<slot name="trigger">
|
|
25
|
+
<SelectValue :placeholder="placeholder" />
|
|
26
|
+
</slot>
|
|
24
27
|
</SelectTrigger>
|
|
25
28
|
|
|
26
|
-
<SelectContent>
|
|
27
|
-
<
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
<SelectContent :class="contentClass">
|
|
30
|
+
<slot name="content">
|
|
31
|
+
<SelectItem
|
|
32
|
+
v-for="opt in options"
|
|
33
|
+
:key="String(opt.value)"
|
|
34
|
+
:value="String(opt.value)"
|
|
35
|
+
>
|
|
36
|
+
{{ opt.label }}
|
|
37
|
+
</SelectItem>
|
|
38
|
+
</slot>
|
|
34
39
|
</SelectContent>
|
|
35
40
|
</ShadcnSelect>
|
|
36
41
|
</template>
|
|
@@ -43,6 +48,8 @@ import {
|
|
|
43
48
|
SelectContent,
|
|
44
49
|
SelectItem,
|
|
45
50
|
} from '@/shadcn/select'
|
|
51
|
+
import { cn } from './utils'
|
|
52
|
+
import SelectMultiple from './select-multiple.vue'
|
|
46
53
|
|
|
47
54
|
const props = defineProps({
|
|
48
55
|
modelValue: [String, Array],
|
|
@@ -51,6 +58,10 @@ const props = defineProps({
|
|
|
51
58
|
placeholder: String,
|
|
52
59
|
disabled: Boolean,
|
|
53
60
|
customClass: String,
|
|
61
|
+
contentClass: String,
|
|
62
|
+
title: String,
|
|
63
|
+
maxDisplay: { type: Number, default: 3 },
|
|
64
|
+
size: { type: String, default: 'default' },
|
|
54
65
|
})
|
|
55
66
|
|
|
56
67
|
const emit = defineEmits(['update:modelValue'])
|
|
@@ -61,5 +72,5 @@ const internalValue = computed({
|
|
|
61
72
|
})
|
|
62
73
|
|
|
63
74
|
const attrs = useAttrs()
|
|
64
|
-
const mergedClass = computed(() => props.customClass
|
|
75
|
+
const mergedClass = computed(() => cn(props.customClass, attrs.class as string))
|
|
65
76
|
</script>
|