@una-ui/nuxt-edge 0.65.0-29322336.ba84df7 → 0.65.0-29325266.8fe6cd7

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/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@una-ui/nuxt-edge",
3
3
  "configKey": "una",
4
- "version": "0.65.0-29322336.ba84df7",
4
+ "version": "0.65.0-29325266.8fe6cd7",
5
5
  "compatibility": {
6
6
  "nuxt": ">=3.0.0"
7
7
  },
package/dist/module.mjs CHANGED
@@ -8,7 +8,7 @@ import 'unocss';
8
8
  import 'unocss-preset-animations';
9
9
 
10
10
  const name = "@una-ui/nuxt-edge";
11
- const version = "0.65.0-29322336.ba84df7";
11
+ const version = "0.65.0-29325266.8fe6cd7";
12
12
 
13
13
  const module = defineNuxtModule({
14
14
  meta: {
@@ -4,7 +4,7 @@ import { computed } from "vue";
4
4
 
5
5
  <script setup>
6
6
  import { SelectRoot, useForwardPropsEmits } from "reka-ui";
7
- import { cn, isEqualObject } from "../../../utils";
7
+ import { cn } from "../../../utils";
8
8
  import SelectContent from "./SelectContent.vue";
9
9
  import SelectGroup from "./SelectGroup.vue";
10
10
  import SelectItem from "./SelectItem.vue";
@@ -13,7 +13,7 @@ import SelectSeparator from "./SelectSeparator.vue";
13
13
  import SelectTrigger from "./SelectTrigger.vue";
14
14
  import SelectValue from "./SelectValue.vue";
15
15
  const props = defineProps({
16
- items: { type: null, required: true },
16
+ items: { type: null, required: false },
17
17
  itemKey: { type: null, required: false },
18
18
  valueKey: { type: null, required: false },
19
19
  label: { type: String, required: false },
@@ -69,20 +69,6 @@ function formatSelectedValue(value) {
69
69
  }
70
70
  return value;
71
71
  }
72
- function isItemSelected(item, modelValue) {
73
- if (!modelValue)
74
- return false;
75
- if (props.multiple && Array.isArray(modelValue)) {
76
- return modelValue.some((val) => {
77
- const valObj = typeof val === "object" && val ? val : { value: val };
78
- const itemObj2 = typeof item === "object" && item ? item : { value: item };
79
- return isEqualObject(valObj, itemObj2);
80
- });
81
- }
82
- const modelObj = typeof modelValue === "object" && modelValue ? modelValue : { value: modelValue };
83
- const itemObj = typeof item === "object" && item ? item : { value: item };
84
- return isEqualObject(modelObj, itemObj);
85
- }
86
72
  </script>
87
73
 
88
74
  <template>
@@ -149,7 +135,6 @@ function isItemSelected(item, modelValue) {
149
135
  :size
150
136
  :select-item
151
137
  v-bind="props._selectItem"
152
- :is-selected="isItemSelected(item, modelValue)"
153
138
  :una
154
139
  >
155
140
  <slot name="item" :item="item">
@@ -196,7 +181,6 @@ function isItemSelected(item, modelValue) {
196
181
  :size
197
182
  :select-item
198
183
  v-bind="{ ..._selectItem, ...group._selectItem }"
199
- :is-selected="isItemSelected(item, modelValue)"
200
184
  :una
201
185
  >
202
186
  <slot name="item" :item="item">
@@ -9,7 +9,6 @@ import SelectItemIndicator from "./SelectItemIndicator.vue";
9
9
  import SelectItemText from "./SelectItemText.vue";
10
10
  const props = defineProps({
11
11
  selectItem: { type: null, required: false, default: "gray" },
12
- isSelected: { type: Boolean, required: false },
13
12
  _selectItemText: { type: Object, required: false },
14
13
  _selectItemIndicator: { type: Object, required: false },
15
14
  una: { type: Object, required: false },
@@ -38,7 +37,6 @@ const forwardedProps = useForwardProps(delegatedProps);
38
37
  :select-item
39
38
  >
40
39
  <SelectItemIndicator
41
- v-if="isSelected"
42
40
  :una
43
41
  v-bind="props._selectItemIndicator"
44
42
  >
@@ -1,5 +1,6 @@
1
1
  <script setup>
2
- import { Primitive } from "reka-ui";
2
+ import { reactiveOmit } from "@vueuse/core";
3
+ import { SelectItemIndicator, useForwardProps } from "reka-ui";
3
4
  import { cn } from "../../../utils";
4
5
  import Icon from "../../elements/Icon.vue";
5
6
  const props = defineProps({
@@ -7,14 +8,14 @@ const props = defineProps({
7
8
  class: { type: null, required: false },
8
9
  una: { type: Object, required: false },
9
10
  asChild: { type: Boolean, required: false },
10
- as: { type: null, required: false, default: "span" }
11
+ as: { type: null, required: false }
11
12
  });
13
+ const forwardProps = useForwardProps(reactiveOmit(props, ["icon", "una"]));
12
14
  </script>
13
15
 
14
16
  <template>
15
- <Primitive
16
- aria-hidden
17
- v-bind="props"
17
+ <SelectItemIndicator
18
+ v-bind="forwardProps"
18
19
  :class="cn(
19
20
  'select-item-indicator',
20
21
  props.una?.selectItemIndicator,
@@ -29,5 +30,5 @@ const props = defineProps({
29
30
  )"
30
31
  />
31
32
  </slot>
32
- </Primitive>
33
+ </SelectItemIndicator>
33
34
  </template>
@@ -3,9 +3,7 @@ declare var __VLS_6: {};
3
3
  type __VLS_Slots = {} & {
4
4
  default?: (props: typeof __VLS_6) => any;
5
5
  };
6
- declare const __VLS_component: import("vue").DefineComponent<NSelectItemIndicatorProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NSelectItemIndicatorProps> & Readonly<{}>, {
7
- as: import("reka-ui").AsTag | import("vue").Component;
8
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ declare const __VLS_component: import("vue").DefineComponent<NSelectItemIndicatorProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NSelectItemIndicatorProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
7
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
10
8
  export default _default;
11
9
  type __VLS_WithSlots<T, S> = T & {
@@ -26,7 +26,7 @@ export interface NSelectProps<T extends AcceptableValue, Items extends Array<T |
26
26
  /**
27
27
  * The items to display in the select.
28
28
  */
29
- items: Items;
29
+ items?: Items;
30
30
  /**
31
31
  * The key name to use to display in the select items.
32
32
  */
@@ -110,7 +110,6 @@ export interface NSelectItemIndicatorProps extends SelectItemIndicatorProps {
110
110
  }
111
111
  export interface NSelectItemProps extends ItemExtensions {
112
112
  selectItem?: HTMLAttributes['class'];
113
- isSelected?: boolean;
114
113
  _selectItemText?: NSelectItemTextProps;
115
114
  _selectItemIndicator?: NSelectItemIndicatorProps;
116
115
  una?: Pick<NSelectUnaProps, 'selectItem' | 'selectItemIndicator'>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@una-ui/nuxt-edge",
3
3
  "type": "module",
4
- "version": "0.65.0-29322336.ba84df7",
4
+ "version": "0.65.0-29325266.8fe6cd7",
5
5
  "description": "Nuxt module for @una-ui",
6
6
  "author": "Phojie Rengel <phojrengel@gmail.com>",
7
7
  "license": "MIT",
@@ -41,8 +41,8 @@
41
41
  "@nuxt/kit": "^3.19.2",
42
42
  "@nuxtjs/color-mode": "^3.5.2",
43
43
  "@tanstack/vue-table": "^8.21.3",
44
- "@una-ui/extractor-vue-script": "npm:@una-ui/extractor-vue-script-edge@0.65.0-29322336.ba84df7",
45
- "@una-ui/preset": "npm:@una-ui/preset-edge@0.65.0-29322336.ba84df7",
44
+ "@una-ui/extractor-vue-script": "npm:@una-ui/extractor-vue-script-edge@0.65.0-29325266.8fe6cd7",
45
+ "@una-ui/preset": "npm:@una-ui/preset-edge@0.65.0-29325266.8fe6cd7",
46
46
  "@unocss/core": "^66.5.1",
47
47
  "@unocss/nuxt": "^66.5.1",
48
48
  "@unocss/preset-attributify": "^66.5.1",