@v-c/select 1.0.14 → 1.0.16

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.
@@ -169,11 +169,14 @@ var OptionList_default = /* @__PURE__ */ defineComponent({
169
169
  const item = memoFlattenOptions.value[index];
170
170
  if (!item) return null;
171
171
  const itemData = item.data || {};
172
- const { value } = itemData;
172
+ const { value, disabled } = itemData;
173
173
  const { group } = item;
174
174
  const attrs = pickAttrs(itemData, true);
175
175
  const mergedLabel = getLabel(item);
176
- return item ? createVNode("div", mergeProps({ "aria-label": typeof mergedLabel === "string" && !group ? mergedLabel : void 0 }, attrs, { "key": index }, getItemAriaProps(item, index), { "aria-selected": isAriaSelected(value) }), [value]) : null;
176
+ return item ? createVNode("div", mergeProps({ "aria-label": typeof mergedLabel === "string" && !group ? mergedLabel : void 0 }, attrs, { "key": index }, getItemAriaProps(item, index), {
177
+ "aria-selected": isAriaSelected(value),
178
+ "aria-disabled": disabled
179
+ }), [value]) : null;
177
180
  };
178
181
  const a11yProps = {
179
182
  role: "listbox",
@@ -234,6 +237,7 @@ var OptionList_default = /* @__PURE__ */ defineComponent({
234
237
  if (title !== void 0) optionTitle = title;
235
238
  return createVNode("div", mergeProps(pickAttrs(passedProps), !virtual ? getItemAriaProps(item, itemIndex) : {}, {
236
239
  "aria-selected": virtual ? void 0 : isAriaSelected(value),
240
+ "aria-disabled": mergedDisabled,
237
241
  "class": optionClassName,
238
242
  "title": optionTitle,
239
243
  "onMousemove": () => {
@@ -46,17 +46,17 @@ var SingleContent_default = /* @__PURE__ */ defineComponent((props, { expose })
46
46
  const inputRef = shallowRef();
47
47
  expose({ input: computed(() => inputRef.value?.input) });
48
48
  return () => {
49
- const { prefixCls, mode, maxLength } = selectInputContext.value ?? {};
49
+ const { prefixCls, mode, maxLength, components } = selectInputContext.value ?? {};
50
50
  const { classNames, styles } = baseProps.value ?? {};
51
51
  const { inputProps } = props;
52
- const renderValue = displayValue.value ? hasOptionStyle.value ? createVNode("div", {
52
+ const renderValue = !(combobox && components?.input) ? displayValue.value ? hasOptionStyle.value ? createVNode("div", {
53
53
  "class": clsx(`${prefixCls}-content-value`, optionClassName.value),
54
54
  "style": {
55
55
  ...mergedSearchValue.value ? { visibility: "hidden" } : {},
56
56
  ...optionStyle.value
57
57
  },
58
58
  "title": optionTitle.value
59
- }, [displayValue.value.label]) : displayValue.value.label : createVNode(Placeholder_default, { "show": !mergedSearchValue.value }, null);
59
+ }, [displayValue.value?.label]) : displayValue.value?.label : createVNode(Placeholder_default, { "show": !mergedSearchValue.value }, null) : null;
60
60
  return createVNode("div", {
61
61
  "class": clsx(`${prefixCls}-content`, displayValue.value && `${prefixCls}-content-has-value`, mergedSearchValue.value && `${prefixCls}-content-has-search-value`, hasOptionStyle.value && `${prefixCls}-content-has-option-style`, classNames?.content),
62
62
  "style": styles?.content,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@v-c/select",
3
3
  "type": "module",
4
- "version": "1.0.14",
4
+ "version": "1.0.16",
5
5
  "description": "",
6
6
  "author": "",
7
7
  "license": "MIT",
@@ -29,10 +29,10 @@
29
29
  "vue": "^3.0.0"
30
30
  },
31
31
  "dependencies": {
32
- "@v-c/trigger": "^1.0.11",
33
32
  "@v-c/overflow": "^1.0.3",
34
- "@v-c/virtual-list": "^1.0.6",
35
- "@v-c/util": "^1.0.14"
33
+ "@v-c/trigger": "^1.0.11",
34
+ "@v-c/util": "^1.0.17",
35
+ "@v-c/virtual-list": "^1.0.6"
36
36
  },
37
37
  "scripts": {
38
38
  "build": "vite build",