@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/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.0.18",
6
+ "version": "1.0.19",
7
7
  "main": "dist/perisai-ui.umd.js",
8
8
  "module": "dist/perisai-ui.es.js",
9
9
  "scripts": {
@@ -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 />
@@ -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 data-slot="select-value" v-bind="$attrs">
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
- <SelectValue :placeholder="placeholder" />
24
+ <slot name="trigger">
25
+ <SelectValue :placeholder="placeholder" />
26
+ </slot>
24
27
  </SelectTrigger>
25
28
 
26
- <SelectContent>
27
- <SelectItem
28
- v-for="opt in options"
29
- :key="String(opt.value)"
30
- :value="String(opt.value)"
31
- >
32
- {{ opt.label }}
33
- </SelectItem>
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 || attrs.class || '')
75
+ const mergedClass = computed(() => cn(props.customClass, attrs.class as string))
65
76
  </script>