@sdata/web-vue 3.13.0 → 3.14.0

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.
Files changed (224) hide show
  1. package/dist/sd.css +141 -111
  2. package/dist/sd.min.css +2 -2
  3. package/es/_components/input-label/input-label.d.ts +2 -0
  4. package/es/_components/input-label/input-label.js +4 -2
  5. package/es/_components/input-label/style/index.css +2 -2
  6. package/es/_components/picker/style/index.scss +8 -2
  7. package/es/_components/resize-observer.js +1 -1
  8. package/es/_components/resize-trigger.vue_vue_type_script_setup_true_lang.js +9 -2
  9. package/es/_components/select-view/select-view.d.ts +2 -0
  10. package/es/_components/select-view/select-view.js +5 -1
  11. package/es/_components/select-view/style/index.css +5 -5
  12. package/es/_hooks/use-focus-trap.d.ts +10 -0
  13. package/es/_hooks/use-focus-trap.js +115 -0
  14. package/es/_utils/dom.js +1 -10
  15. package/es/_utils/keyboard.d.ts +4 -0
  16. package/es/_utils/keyboard.js +21 -2
  17. package/es/alert/alert.vue.d.ts +2 -2
  18. package/es/alert/alert.vue_vue_type_script_setup_true_lang.js +12 -3
  19. package/es/alert/index.d.ts +5 -5
  20. package/es/alert/style/index.css +1 -1
  21. package/es/alert/style/index.scss +1 -1
  22. package/es/anchor/anchor-link.vue_vue_type_script_setup_true_lang.js +3 -1
  23. package/es/anchor/anchor.vue_vue_type_script_setup_true_lang.js +2 -0
  24. package/es/anchor/style/index.css +1 -1
  25. package/es/anchor/style/index.scss +3 -1
  26. package/es/auto-complete/auto-complete.js +8 -0
  27. package/es/avatar/avatar.vue_vue_type_script_setup_true_lang.js +8 -2
  28. package/es/avatar/style/index.css +2 -2
  29. package/es/avatar/style/index.scss +2 -2
  30. package/es/back-top/back-top.vue_vue_type_script_setup_true_lang.js +5 -1
  31. package/es/back-top/style/index.css +1 -1
  32. package/es/back-top/style/index.scss +2 -1
  33. package/es/badge/badge.js +4 -1
  34. package/es/badge/style/index.css +3 -3
  35. package/es/badge/style/index.scss +3 -3
  36. package/es/breadcrumb/breadcrumb.js +1 -0
  37. package/es/button/button.vue_vue_type_script_setup_true_lang.js +10 -5
  38. package/es/button/style/index.css +15 -6
  39. package/es/button/style/index.scss +25 -7
  40. package/es/calendar/style/event.scss +2 -2
  41. package/es/calendar/style/index.css +2 -2
  42. package/es/card/style/index.css +3 -3
  43. package/es/card/style/index.scss +3 -3
  44. package/es/carousel/carousel-arrow.vue.d.ts +4 -4
  45. package/es/carousel/carousel-arrow.vue_vue_type_script_setup_true_lang.js +20 -4
  46. package/es/carousel/carousel-indicator.vue_vue_type_script_setup_true_lang.js +23 -4
  47. package/es/carousel/carousel-item.vue_vue_type_script_setup_true_lang.js +8 -1
  48. package/es/carousel/carousel.js +18 -1
  49. package/es/carousel/style/index.css +1 -1
  50. package/es/carousel/style/index.scss +1 -1
  51. package/es/cascader/cascader.vue_vue_type_script_setup_true_lang.js +11 -2
  52. package/es/cascader/style/index.css +2 -2
  53. package/es/cascader/style/index.scss +3 -1
  54. package/es/checkbox/checkbox-group.js +4 -1
  55. package/es/checkbox/checkbox.d.ts +9 -0
  56. package/es/checkbox/checkbox.js +14 -0
  57. package/es/checkbox/index.d.ts +15 -0
  58. package/es/checkbox/style/index.css +1 -1
  59. package/es/checkbox/style/index.scss +1 -1
  60. package/es/collapse/collapse-item.js +21 -3
  61. package/es/collapse/context.d.ts +1 -1
  62. package/es/color-picker/color-picker.js +6 -0
  63. package/es/copy/copy.vue_vue_type_script_setup_true_lang.js +10 -2
  64. package/es/date-picker/panels/body.vue_vue_type_script_setup_true_lang.js +14 -1
  65. package/es/date-picker/picker.vue_vue_type_script_setup_true_lang.js +1 -0
  66. package/es/date-picker/style/index.css +5 -5
  67. package/es/date-picker/style/index.scss +4 -3
  68. package/es/drawer/drawer.vue.d.ts +1 -1
  69. package/es/drawer/drawer.vue_vue_type_script_setup_true_lang.js +28 -7
  70. package/es/drawer/index.d.ts +3 -3
  71. package/es/dropdown/dropdown-option.vue_vue_type_script_setup_true_lang.js +5 -1
  72. package/es/dropdown/dropdown-panel.vue.d.ts +9 -0
  73. package/es/dropdown/dropdown-panel.vue_vue_type_script_setup_true_lang.js +75 -2
  74. package/es/dropdown/dropdown-submenu.vue_vue_type_script_setup_true_lang.js +5 -2
  75. package/es/dropdown/dropdown.vue_vue_type_script_setup_true_lang.js +4 -2
  76. package/es/dropdown/style/index.css +1 -1
  77. package/es/dropdown/style/index.scss +3 -1
  78. package/es/file-previewer/file-previewer.vue.d.ts +1 -1
  79. package/es/file-previewer/file-previewer.vue_vue_type_script_setup_true_lang.js +7 -3
  80. package/es/file-previewer/index.d.ts +3 -3
  81. package/es/form/context.d.ts +1 -0
  82. package/es/form/form-item.vue_vue_type_script_setup_true_lang.js +6 -2
  83. package/es/form/style/index.css +2 -2
  84. package/es/form/style/index.scss +2 -2
  85. package/es/image/preview.vue.d.ts +1 -1
  86. package/es/image/preview.vue_vue_type_script_setup_true_lang.js +1 -1
  87. package/es/index.css +141 -111
  88. package/es/input/input.js +16 -2
  89. package/es/input/style/index.css +2 -2
  90. package/es/input/style/input.scss +4 -4
  91. package/es/input-number/input-number.js +5 -1
  92. package/es/input-number/style/index.css +3 -3
  93. package/es/input-number/style/index.scss +5 -1
  94. package/es/input-tag/index.d.ts +3 -0
  95. package/es/input-tag/input-tag.d.ts +2 -0
  96. package/es/input-tag/input-tag.js +34 -30
  97. package/es/input-tag/style/index.css +8 -8
  98. package/es/input-tag/style/index.scss +11 -5
  99. package/es/layout/sider.vue_vue_type_script_setup_true_lang.js +31 -6
  100. package/es/layout/style/index.css +2 -2
  101. package/es/layout/style/index.scss +4 -2
  102. package/es/link/style/index.css +1 -1
  103. package/es/link/style/index.scss +3 -1
  104. package/es/mention/mention.js +8 -0
  105. package/es/menu/base-menu.vue_vue_type_script_setup_true_lang.js +29 -3
  106. package/es/menu/item.js +14 -1
  107. package/es/menu/style/index.css +6 -6
  108. package/es/menu/style/index.scss +5 -3
  109. package/es/message/style/index.css +3 -3
  110. package/es/message/style/index.scss +5 -3
  111. package/es/modal/index.d.ts +3 -3
  112. package/es/modal/modal.vue.d.ts +1 -1
  113. package/es/modal/modal.vue_vue_type_script_setup_true_lang.js +28 -13
  114. package/es/modal/style/index.css +2 -2
  115. package/es/modal/style/index.scss +3 -2
  116. package/es/notification/style/index.css +3 -3
  117. package/es/notification/style/index.scss +11 -3
  118. package/es/page-header/page-header.vue.d.ts +6 -6
  119. package/es/page-header/page-header.vue_vue_type_script_setup_true_lang.js +12 -1
  120. package/es/pagination/page-item-ellipsis.vue_vue_type_script_setup_true_lang.js +12 -2
  121. package/es/pagination/page-item-step.vue.d.ts +2 -2
  122. package/es/pagination/page-item-step.vue_vue_type_script_setup_true_lang.js +19 -2
  123. package/es/pagination/page-item.vue.d.ts +2 -2
  124. package/es/pagination/page-item.vue_vue_type_script_setup_true_lang.js +21 -3
  125. package/es/pagination/pagination.js +5 -1
  126. package/es/pagination/style/index.css +6 -1
  127. package/es/pagination/style/index.scss +9 -3
  128. package/es/popconfirm/popconfirm.vue_vue_type_script_setup_true_lang.js +2 -0
  129. package/es/popover/popover.vue_vue_type_script_setup_true_lang.js +2 -0
  130. package/es/progress/style/index.css +2 -2
  131. package/es/progress/style/index.scss +5 -3
  132. package/es/qr-code/qr-code-status.vue_vue_type_script_setup_true_lang.js +5 -1
  133. package/es/qr-code/qr-code.vue_vue_type_script_setup_true_lang.js +11 -6
  134. package/es/radio/context.d.ts +1 -0
  135. package/es/radio/radio-group.js +6 -2
  136. package/es/radio/radio.js +1 -0
  137. package/es/radio/style/index.css +2 -2
  138. package/es/radio/style/index.scss +4 -2
  139. package/es/rate/rate.js +25 -1
  140. package/es/resize-box/resize-box.vue.d.ts +4 -4
  141. package/es/resize-box/resize-box.vue_vue_type_script_setup_true_lang.js +30 -1
  142. package/es/result/result.vue_vue_type_script_setup_true_lang.js +7 -4
  143. package/es/select/index.d.ts +124 -0
  144. package/es/select/select-dropdown.vue_vue_type_script_setup_true_lang.js +4 -1
  145. package/es/select/select.d.ts +62 -0
  146. package/es/select/select.js +18 -2
  147. package/es/select/style/index.css +1 -1
  148. package/es/select/style/index.scss +3 -1
  149. package/es/selectable-card/style/index.css +2 -2
  150. package/es/selectable-card/style/index.scss +5 -5
  151. package/es/skeleton/skeleton.vue_vue_type_script_setup_true_lang.js +5 -1
  152. package/es/slider/slider-button.vue.d.ts +2 -0
  153. package/es/slider/slider-button.vue_vue_type_script_setup_true_lang.js +7 -2
  154. package/es/slider/slider.vue_vue_type_script_setup_true_lang.js +23 -2
  155. package/es/slider/style/index.css +1 -1
  156. package/es/slider/style/index.scss +3 -1
  157. package/es/spin/spin.js +7 -2
  158. package/es/spin/style/index.css +1 -1
  159. package/es/spin/style/index.scss +1 -1
  160. package/es/split/split.vue.d.ts +4 -4
  161. package/es/split/split.vue_vue_type_script_setup_true_lang.js +27 -3
  162. package/es/steps/context.d.ts +1 -0
  163. package/es/steps/step.vue_vue_type_script_setup_true_lang.js +15 -2
  164. package/es/steps/steps.vue_vue_type_script_setup_true_lang.js +6 -1
  165. package/es/steps/style/index.css +1 -1
  166. package/es/steps/style/index.scss +1 -1
  167. package/es/style/animation/index.scss +1 -0
  168. package/es/style/animation/reduced-motion.scss +22 -0
  169. package/es/style/animation/zoom.scss +7 -6
  170. package/es/style/icon.scss +9 -1
  171. package/es/switch/style/index.css +1 -1
  172. package/es/switch/style/index.scss +4 -1
  173. package/es/switch/switch.vue_vue_type_script_setup_true_lang.js +6 -1
  174. package/es/table/style/index.css +8 -8
  175. package/es/table/style/index.scss +11 -8
  176. package/es/table/table-operation-td.d.ts +15 -0
  177. package/es/table/table-tbody.js +4 -1
  178. package/es/table/table-td.js +2 -1
  179. package/es/table/table-th.js +4 -2
  180. package/es/table/table-thead.js +4 -1
  181. package/es/table/table-tr.js +4 -1
  182. package/es/table/table.js +6 -2
  183. package/es/tabs/context.d.ts +1 -0
  184. package/es/tabs/style/index.css +5 -5
  185. package/es/tabs/style/index.scss +7 -7
  186. package/es/tabs/tab-pane.vue_vue_type_script_setup_true_lang.js +21 -2
  187. package/es/tabs/tabs-nav.js +34 -1
  188. package/es/tabs/tabs-tab.vue_vue_type_script_setup_true_lang.js +27 -4
  189. package/es/tabs/tabs.js +4 -2
  190. package/es/tag/index.d.ts +5 -5
  191. package/es/tag/style/index.css +1 -1
  192. package/es/tag/style/index.scss +3 -1
  193. package/es/tag/tag.vue.d.ts +2 -2
  194. package/es/tag/tag.vue_vue_type_script_setup_true_lang.js +19 -2
  195. package/es/textarea/style/index.css +2 -2
  196. package/es/textarea/textarea.vue_vue_type_script_setup_true_lang.js +15 -3
  197. package/es/time-picker/time-column.vue_vue_type_script_setup_true_lang.js +11 -3
  198. package/es/time-picker/time-picker.vue_vue_type_script_setup_true_lang.js +4 -1
  199. package/es/tooltip/tooltip.vue_vue_type_script_setup_true_lang.js +1 -0
  200. package/es/transfer/style/index.css +1 -1
  201. package/es/transfer/style/index.scss +1 -1
  202. package/es/transfer/transfer-list-item.js +16 -2
  203. package/es/tree/base-node.vue_vue_type_script_setup_true_lang.js +27 -7
  204. package/es/tree/context.d.ts +2 -0
  205. package/es/tree/style/index.css +1 -1
  206. package/es/tree/style/index.scss +1 -1
  207. package/es/tree/tree.vue_vue_type_script_setup_true_lang.js +81 -2
  208. package/es/tree-select/tree-select.vue_vue_type_script_setup_true_lang.js +10 -1
  209. package/es/trigger/index.d.ts +45 -0
  210. package/es/trigger/trigger.d.ts +27 -0
  211. package/es/trigger/trigger.js +47 -5
  212. package/es/typography/edit-content.vue_vue_type_script_setup_true_lang.js +11 -8
  213. package/es/typography/operations.vue_vue_type_script_setup_true_lang.js +38 -6
  214. package/es/typography/style/index.css +2 -2
  215. package/es/typography/style/index.scss +2 -2
  216. package/es/upload/style/index.css +9 -9
  217. package/es/upload/style/index.scss +15 -9
  218. package/es/upload/upload-list-item.js +18 -5
  219. package/es/upload/upload-picture-item.js +25 -3
  220. package/es/verification-code/verification-code.js +6 -1
  221. package/json/vetur-attributes.json +15 -0
  222. package/json/vetur-tags.json +6 -2
  223. package/json/web-types.json +33 -1
  224. package/package.json +1 -1
@@ -17,6 +17,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
17
17
  error: BooleanConstructor;
18
18
  focused: BooleanConstructor;
19
19
  uninjectFormItemContext: BooleanConstructor;
20
+ inputAttrs: PropType<Record<string, unknown>>;
20
21
  }>, {
21
22
  inputRef: import("vue").Ref<HTMLInputElement | undefined, HTMLInputElement | undefined>;
22
23
  render: () => import("vue/jsx-runtime").JSX.Element;
@@ -39,6 +40,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
39
40
  error: BooleanConstructor;
40
41
  focused: BooleanConstructor;
41
42
  uninjectFormItemContext: BooleanConstructor;
43
+ inputAttrs: PropType<Record<string, unknown>>;
42
44
  }>> & Readonly<{
43
45
  onFocus?: ((...args: any[]) => any) | undefined;
44
46
  onBlur?: ((...args: any[]) => any) | undefined;
@@ -29,7 +29,8 @@ var input_label_default = /* @__PURE__ */ defineComponent({
29
29
  size: String,
30
30
  error: Boolean,
31
31
  focused: Boolean,
32
- uninjectFormItemContext: Boolean
32
+ uninjectFormItemContext: Boolean,
33
+ inputAttrs: Object
33
34
  },
34
35
  emits: [
35
36
  "update:inputValue",
@@ -91,13 +92,14 @@ var input_label_default = /* @__PURE__ */ defineComponent({
91
92
  const wrapperAttrs = computed(() => omit(attrs, INPUT_EVENTS));
92
93
  const inputAttrs = computed(() => pick(attrs, INPUT_EVENTS));
93
94
  const render = () => {
95
+ var _props$inputAttrs;
94
96
  let _slot;
95
97
  return createVNode("span", mergeProps(wrapperAttrs.value, {
96
98
  "class": cls.value,
97
99
  "onMousedown": handleMousedown
98
100
  }), [
99
101
  slots.prefix && createVNode("span", { "class": `${prefixCls}-prefix` }, [slots.prefix()]),
100
- createVNode("input", mergeProps(inputAttrs.value, {
102
+ createVNode("input", mergeProps(inputAttrs.value, (_props$inputAttrs = props.inputAttrs) !== null && _props$inputAttrs !== void 0 ? _props$inputAttrs : {}, {
101
103
  "ref": inputRef,
102
104
  "class": [`${prefixCls}-input`, { [`${prefixCls}-input-hidden`]: !showInput.value }],
103
105
  "value": computedInputValue.value,
@@ -38,7 +38,7 @@
38
38
  border: 1px solid transparent;
39
39
  border-radius: var(--sd-border-radius-small);
40
40
  cursor: text;
41
- transition: color 0.1s cubic-bezier(0, 0, 1, 1), border-color 0.1s cubic-bezier(0, 0, 1, 1), background-color 0.1s cubic-bezier(0, 0, 1, 1);
41
+ transition: color 0.1s cubic-bezier(0.34, 0.69, 0.1, 1), border-color 0.1s cubic-bezier(0.34, 0.69, 0.1, 1), background-color 0.1s cubic-bezier(0.34, 0.69, 0.1, 1);
42
42
  }
43
43
  .sd-input-label:hover {
44
44
  background-color: var(--sd-color-fill-3);
@@ -123,7 +123,7 @@
123
123
  }
124
124
  .sd-input-label .sd-input-label-clear-btn > svg {
125
125
  position: relative;
126
- transition: color 0.1s cubic-bezier(0, 0, 1, 1);
126
+ transition: color 0.1s cubic-bezier(0.34, 0.69, 0.1, 1);
127
127
  }
128
128
  .sd-input-label:hover .sd-input-label-clear-btn {
129
129
  visibility: visible;
@@ -15,7 +15,11 @@
15
15
  background-color: $picker-color-bg;
16
16
  border: 1px solid $picker-color-border;
17
17
  border-radius: $picker-input-border-radius;
18
- transition: all theme.$transition-duration-1 theme.$transition-timing-function-linear;
18
+ transition:
19
+ color theme.$transition-duration-1 theme.$transition-timing-function-standard,
20
+ background-color theme.$transition-duration-1 theme.$transition-timing-function-standard,
21
+ border-color theme.$transition-duration-1 theme.$transition-timing-function-standard,
22
+ box-shadow theme.$transition-duration-1 theme.$transition-timing-function-standard;
19
23
 
20
24
  &-input {
21
25
  display: inline-flex;
@@ -32,7 +36,9 @@
32
36
  background-color: global.$color-transparent;
33
37
  border: none;
34
38
  outline: none;
35
- transition: all theme.$transition-duration-1 theme.$transition-timing-function-linear;
39
+ transition:
40
+ color theme.$transition-duration-1 theme.$transition-timing-function-standard,
41
+ background-color theme.$transition-duration-1 theme.$transition-timing-function-standard;
36
42
 
37
43
  &::placeholder {
38
44
  color: $picker-color-placeholder;
@@ -11,7 +11,7 @@ var resize_observer_default = /* @__PURE__ */ defineComponent({
11
11
  const componentRef = ref();
12
12
  const element = computed(() => isComponentInstance(componentRef.value) ? componentRef.value.$el : componentRef.value);
13
13
  const createResizeObserver = (target) => {
14
- if (!target) return;
14
+ if (!target || target.nodeType !== 1) return;
15
15
  resizeObserver = new ResizeObserver((entries) => {
16
16
  const entry = entries[0];
17
17
  emit("resize", entry);
@@ -4,6 +4,7 @@ import IconDragDotVertical from "../icon/icon-drag-dot-vertical/index.js";
4
4
  import IconDragDot from "../icon/icon-drag-dot/index.js";
5
5
  import { computed, createBlock, createElementVNode, defineComponent, normalizeClass, openBlock, renderSlot, toRefs, unref, withCtx } from "vue";
6
6
  //#region components/_components/resize-trigger.vue?vue&type=script&setup=true&lang.tsx
7
+ var _hoisted_1 = ["aria-orientation"];
7
8
  var resize_trigger_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, { name: "ResizeTrigger" }), {}, {
8
9
  __name: "resize-trigger",
9
10
  props: {
@@ -30,13 +31,19 @@ var resize_trigger_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
30
31
  };
31
32
  return (_ctx, _cache) => {
32
33
  return openBlock(), createBlock(unref(resize_observer_default), { onResize }, {
33
- default: withCtx(() => [createElementVNode("div", { class: normalizeClass(classNames.value) }, [renderSlot(_ctx.$slots, "default", {}, () => [createElementVNode("div", { class: normalizeClass(`${unref(prefixCls)}-icon-wrapper`) }, [renderSlot(_ctx.$slots, "icon", {}, () => [isHorizontal.value ? (openBlock(), createBlock(unref(IconDragDot), {
34
+ default: withCtx(() => [createElementVNode("div", {
35
+ class: normalizeClass(classNames.value),
36
+ role: "separator",
37
+ tabindex: "0",
38
+ "aria-orientation": unref(direction),
39
+ "aria-label": "Resize"
40
+ }, [renderSlot(_ctx.$slots, "default", {}, () => [createElementVNode("div", { class: normalizeClass(`${unref(prefixCls)}-icon-wrapper`) }, [renderSlot(_ctx.$slots, "icon", {}, () => [isHorizontal.value ? (openBlock(), createBlock(unref(IconDragDot), {
34
41
  key: 0,
35
42
  class: normalizeClass(`${unref(prefixCls)}-icon`)
36
43
  }, null, 8, ["class"])) : (openBlock(), createBlock(unref(IconDragDotVertical), {
37
44
  key: 1,
38
45
  class: normalizeClass(`${unref(prefixCls)}-icon`)
39
- }, null, 8, ["class"]))])], 2)])], 2)]),
46
+ }, null, 8, ["class"]))])], 2)])], 10, _hoisted_1)]),
40
47
  _: 3
41
48
  });
42
49
  };
@@ -64,6 +64,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
64
64
  type: BooleanConstructor;
65
65
  default: boolean;
66
66
  };
67
+ inputAttrs: PropType<Record<string, unknown>>;
67
68
  }>, {
68
69
  inputRef: import("vue").ComputedRef<HTMLInputElement>;
69
70
  handleFocus: (ev: FocusEvent) => void;
@@ -134,6 +135,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
134
135
  type: BooleanConstructor;
135
136
  default: boolean;
136
137
  };
138
+ inputAttrs: PropType<Record<string, unknown>>;
137
139
  }>> & Readonly<{
138
140
  onFocus?: ((...args: any[]) => any) | undefined;
139
141
  onBlur?: ((...args: any[]) => any) | undefined;
@@ -73,7 +73,8 @@ var select_view_default = /* @__PURE__ */ defineComponent({
73
73
  retainInputValue: {
74
74
  type: Boolean,
75
75
  default: false
76
- }
76
+ },
77
+ inputAttrs: Object
77
78
  },
78
79
  emits: [
79
80
  "remove",
@@ -132,6 +133,7 @@ var select_view_default = /* @__PURE__ */ defineComponent({
132
133
  showClearBtn.value && createVNode("button", {
133
134
  "type": "button",
134
135
  "class": `${prefixCls}-clear-btn`,
136
+ "aria-label": "Clear",
135
137
  "onClick": handleClear,
136
138
  "onMousedown": (ev) => ev.stopPropagation()
137
139
  }, [createVNode(icon_hover_default, null, { default: () => [createVNode(IconClose, null, null)] })]),
@@ -165,6 +167,7 @@ var select_view_default = /* @__PURE__ */ defineComponent({
165
167
  "tagNowrap": props.tagNowrap,
166
168
  "retainInputValue": true,
167
169
  "uninjectFormItemContext": true,
170
+ "inputAttrs": props.inputAttrs,
168
171
  "onRemove": handleRemove,
169
172
  "onFocus": handleFocus,
170
173
  "onBlur": handleBlur
@@ -187,6 +190,7 @@ var select_view_default = /* @__PURE__ */ defineComponent({
187
190
  "error": mergedError.value,
188
191
  "enabledInput": enabledInput.value,
189
192
  "uninjectFormItemContext": true,
193
+ "inputAttrs": props.inputAttrs,
190
194
  "onFocus": handleFocus,
191
195
  "onBlur": handleBlur
192
196
  }, {
@@ -44,7 +44,7 @@
44
44
  }
45
45
  .sd-tag-checkable {
46
46
  cursor: pointer;
47
- transition: all 0.1s cubic-bezier(0, 0, 1, 1);
47
+ transition: background-color 0.1s cubic-bezier(0.34, 0.69, 0.1, 1), border-color 0.1s cubic-bezier(0.34, 0.69, 0.1, 1);
48
48
  }
49
49
  .sd-tag-checkable:hover {
50
50
  background-color: var(--sd-color-fill-2);
@@ -495,7 +495,7 @@
495
495
  border: 1px solid transparent;
496
496
  border-radius: var(--sd-border-radius-small);
497
497
  cursor: text;
498
- transition: color 0.1s cubic-bezier(0, 0, 1, 1), border-color 0.1s cubic-bezier(0, 0, 1, 1), background-color 0.1s cubic-bezier(0, 0, 1, 1);
498
+ transition: color 0.1s cubic-bezier(0.34, 0.69, 0.1, 1), border-color 0.1s cubic-bezier(0.34, 0.69, 0.1, 1), background-color 0.1s cubic-bezier(0.34, 0.69, 0.1, 1);
499
499
  }
500
500
  .sd-select-view-single:hover {
501
501
  background-color: var(--sd-color-fill-3);
@@ -580,7 +580,7 @@
580
580
  }
581
581
  .sd-select-view-single .sd-select-view-clear-btn > svg {
582
582
  position: relative;
583
- transition: color 0.1s cubic-bezier(0, 0, 1, 1);
583
+ transition: color 0.1s cubic-bezier(0.34, 0.69, 0.1, 1);
584
584
  }
585
585
  .sd-select-view-single:hover .sd-select-view-clear-btn {
586
586
  visibility: visible;
@@ -692,7 +692,7 @@
692
692
  border: 1px solid transparent;
693
693
  border-radius: var(--sd-border-radius-small);
694
694
  cursor: text;
695
- transition: color 0.1s cubic-bezier(0, 0, 1, 1), border-color 0.1s cubic-bezier(0, 0, 1, 1), background-color 0.1s cubic-bezier(0, 0, 1, 1);
695
+ transition: color 0.1s cubic-bezier(0.34, 0.69, 0.1, 1), border-color 0.1s cubic-bezier(0.34, 0.69, 0.1, 1), background-color 0.1s cubic-bezier(0.34, 0.69, 0.1, 1);
696
696
  }
697
697
  .sd-select-view-multiple:hover {
698
698
  background-color: var(--sd-color-fill-3);
@@ -777,7 +777,7 @@
777
777
  }
778
778
  .sd-select-view-multiple .sd-select-view-clear-btn > svg {
779
779
  position: relative;
780
- transition: color 0.1s cubic-bezier(0, 0, 1, 1);
780
+ transition: color 0.1s cubic-bezier(0.34, 0.69, 0.1, 1);
781
781
  }
782
782
  .sd-select-view-multiple:hover .sd-select-view-clear-btn {
783
783
  visibility: visible;
@@ -0,0 +1,10 @@
1
+ import type { Ref } from 'vue';
2
+ export declare const getFocusableElements: (container: HTMLElement) => HTMLElement[];
3
+ export interface UseFocusTrapOptions {
4
+ initialFocus?: (container: HTMLElement) => HTMLElement | null | undefined;
5
+ }
6
+ export interface UseFocusTrapReturn {
7
+ activate: () => void;
8
+ deactivate: () => void;
9
+ }
10
+ export declare const useFocusTrap: (containerRef: Ref<HTMLElement | undefined>, options?: UseFocusTrapOptions) => UseFocusTrapReturn;
@@ -0,0 +1,115 @@
1
+ import { off, on } from "../_utils/dom.js";
2
+ import { KEYBOARD_KEY } from "../_utils/keyboard.js";
3
+ import { onBeforeUnmount } from "vue";
4
+ //#region components/_hooks/use-focus-trap.ts
5
+ /**
6
+ * 可聚焦元素选择器(排除显式 tabindex="-1" 由 isFocusableElement 再过滤)
7
+ */
8
+ var FOCUSABLE_SELECTOR = [
9
+ "a[href]",
10
+ "button:not([disabled])",
11
+ "textarea:not([disabled])",
12
+ "input:not([disabled])",
13
+ "select:not([disabled])",
14
+ "iframe",
15
+ "[contenteditable]:not([contenteditable=\"false\"])",
16
+ "[tabindex]:not([tabindex=\"-1\"])"
17
+ ].join(",");
18
+ var isFocusableElement = (el) => {
19
+ if (el.hasAttribute("disabled")) return false;
20
+ if (el.getAttribute("tabindex") === "-1") return false;
21
+ if (el.getAttribute("aria-hidden") === "true") return false;
22
+ const style = window.getComputedStyle(el);
23
+ if (style.display === "none" || style.visibility === "hidden") return false;
24
+ return el.offsetWidth > 0 || el.offsetHeight > 0 || el.getClientRects().length > 0;
25
+ };
26
+ /**
27
+ * 取容器内当前可见、可聚焦的元素列表(顺序即 DOM 顺序)。
28
+ */
29
+ var getFocusableElements = (container) => {
30
+ const nodes = container.querySelectorAll(FOCUSABLE_SELECTOR);
31
+ return Array.from(nodes).filter(isFocusableElement);
32
+ };
33
+ /**
34
+ * 对话框/抽屉等弹层的焦点陷阱。
35
+ *
36
+ * - activate 时缓存 `document.activeElement`(通常是触发器),并把焦点移入容器;
37
+ * - 激活期间 Tab / Shift+Tab 在容器内循环,不会逃逸到背后的页面;
38
+ * - deactivate 时还原焦点到触发器。
39
+ *
40
+ * 不自动监听可见性,调用方应在弹层的 open/close 时机(如 transition 的
41
+ * after-enter / after-leave)显式调用 activate / deactivate。
42
+ */
43
+ var useFocusTrap = (containerRef, options) => {
44
+ let savedFocus = null;
45
+ const handleKeydown = (ev) => {
46
+ if (ev.key !== KEYBOARD_KEY.TAB) return;
47
+ const container = containerRef.value;
48
+ if (!container) return;
49
+ const focusables = getFocusableElements(container);
50
+ if (focusables.length === 0) {
51
+ ev.preventDefault();
52
+ container.focus();
53
+ return;
54
+ }
55
+ const first = focusables[0];
56
+ const last = focusables[focusables.length - 1];
57
+ const active = document.activeElement;
58
+ const atEdge = (el) => !container.contains(el) || el === container;
59
+ if (ev.shiftKey) {
60
+ if (active === first || atEdge(active)) {
61
+ ev.preventDefault();
62
+ last.focus();
63
+ }
64
+ } else if (active === last || atEdge(active)) {
65
+ ev.preventDefault();
66
+ first.focus();
67
+ }
68
+ };
69
+ let focusRetryHandle = 0;
70
+ const focusIntoContainer = () => {
71
+ var _options$initialFocus;
72
+ const container = containerRef.value;
73
+ if (!container) return false;
74
+ const preferred = options === null || options === void 0 || (_options$initialFocus = options.initialFocus) === null || _options$initialFocus === void 0 ? void 0 : _options$initialFocus.call(options, container);
75
+ if (preferred) {
76
+ preferred.focus();
77
+ if (document.activeElement === preferred) return true;
78
+ }
79
+ const focusables = getFocusableElements(container);
80
+ if (focusables.length > 0) {
81
+ focusables[0].focus();
82
+ return true;
83
+ }
84
+ container.focus();
85
+ return document.activeElement === container;
86
+ };
87
+ const activate = () => {
88
+ var _document$activeEleme;
89
+ savedFocus = (_document$activeEleme = document.activeElement) !== null && _document$activeEleme !== void 0 ? _document$activeEleme : null;
90
+ on(document.documentElement, "keydown", handleKeydown, true);
91
+ if (focusIntoContainer()) return;
92
+ const retry = () => {
93
+ if (focusIntoContainer()) return;
94
+ focusRetryHandle = requestAnimationFrame(retry);
95
+ };
96
+ focusRetryHandle = requestAnimationFrame(retry);
97
+ };
98
+ const deactivate = () => {
99
+ if (focusRetryHandle) {
100
+ cancelAnimationFrame(focusRetryHandle);
101
+ focusRetryHandle = 0;
102
+ }
103
+ off(document.documentElement, "keydown", handleKeydown, true);
104
+ const target = savedFocus;
105
+ savedFocus = null;
106
+ if (target && typeof target.focus === "function") target.focus();
107
+ };
108
+ onBeforeUnmount(deactivate);
109
+ return {
110
+ activate,
111
+ deactivate
112
+ };
113
+ };
114
+ //#endregion
115
+ export { getFocusableElements, useFocusTrap };
package/es/_utils/dom.js CHANGED
@@ -32,15 +32,6 @@ var off = (() => {
32
32
  element.removeEventListener(type, handler, options);
33
33
  };
34
34
  })();
35
- var contains = (root, ele) => {
36
- if (!root || !ele) return false;
37
- let node = ele;
38
- while (node) {
39
- if (node === root) return true;
40
- node = node.parentNode;
41
- }
42
- return false;
43
- };
44
35
  var getOverlay = (type) => {
45
36
  const popper = document.createElement("div");
46
37
  popper.setAttribute("class", `sd-overlay sd-overlay-${type}`);
@@ -79,4 +70,4 @@ var getScrollBarWidth = (element) => {
79
70
  return element.tagName === "BODY" ? window.innerWidth - getDocumentSize().width : element.offsetWidth - element.clientWidth;
80
71
  };
81
72
  //#endregion
82
- export { NOOP, contains, getDocumentSize, getElement, getOverlay, getRelativeRect, getScrollBarWidth, isScroll, isServerRendering, off, on, querySelector };
73
+ export { NOOP, getDocumentSize, getElement, getOverlay, getRelativeRect, getScrollBarWidth, isScroll, isServerRendering, off, on, querySelector };
@@ -8,6 +8,8 @@ export declare const KEYBOARD_KEY: {
8
8
  ARROW_DOWN: string;
9
9
  ARROW_LEFT: string;
10
10
  ARROW_RIGHT: string;
11
+ HOME: string;
12
+ END: string;
11
13
  };
12
14
  export interface CodeKey {
13
15
  key: string;
@@ -16,4 +18,6 @@ export interface CodeKey {
16
18
  alt?: boolean;
17
19
  meta?: boolean;
18
20
  }
21
+ export declare const isActivationKey: (e: KeyboardEvent) => boolean;
22
+ export declare const onActivate: (fn: (e: KeyboardEvent) => void, guard?: (e: KeyboardEvent) => boolean) => (e: KeyboardEvent) => void;
19
23
  export declare const getKeyDownHandler: (codeKeyMap: Map<CodeKey | string, (e: Event) => void>) => (event: KeyboardEvent) => void;
@@ -9,7 +9,9 @@ var KEYBOARD_KEY = {
9
9
  ARROW_UP: "ArrowUp",
10
10
  ARROW_DOWN: "ArrowDown",
11
11
  ARROW_LEFT: "ArrowLeft",
12
- ARROW_RIGHT: "ArrowRight"
12
+ ARROW_RIGHT: "ArrowRight",
13
+ HOME: "Home",
14
+ END: "End"
13
15
  };
14
16
  var stringifyCodeKey = (k) => {
15
17
  return JSON.stringify({
@@ -20,6 +22,23 @@ var stringifyCodeKey = (k) => {
20
22
  meta: Boolean(k.meta)
21
23
  });
22
24
  };
25
+ /**
26
+ * 是否为「激活键」(Enter / Space)。供 role="button" 等非原生可交互元素复用,
27
+ * 避免在各组件里硬编码 `e.key === 'Enter' || e.key === ' '`(注意 Space 的 key 是 ' ')。
28
+ */
29
+ var isActivationKey = (e) => e.key === KEYBOARD_KEY.ENTER || e.key === KEYBOARD_KEY.SPACE;
30
+ /**
31
+ * 生成「Enter / Space 激活」的 keydown 处理器:命中激活键时 preventDefault
32
+ * (避免 Space 触发页面滚动)并调用 `fn`。可选 `guard` 返回 false 时跳过(禁用态等)。
33
+ *
34
+ * @example @keydown="onActivate(handleClose)"
35
+ */
36
+ var onActivate = (fn, guard) => (e) => {
37
+ if (!isActivationKey(e)) return;
38
+ if (guard && !guard(e)) return;
39
+ e.preventDefault();
40
+ fn(e);
41
+ };
23
42
  var getKeyDownHandler = (codeKeyMap) => {
24
43
  const map = {};
25
44
  codeKeyMap.forEach((callback, codeKey) => {
@@ -41,4 +60,4 @@ var getKeyDownHandler = (codeKeyMap) => {
41
60
  };
42
61
  };
43
62
  //#endregion
44
- export { KEYBOARD_KEY, getKeyDownHandler };
63
+ export { KEYBOARD_KEY, getKeyDownHandler, isActivationKey, onActivate };
@@ -35,7 +35,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
35
35
  default: boolean;
36
36
  };
37
37
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
38
- close: (_ev: MouseEvent) => any;
38
+ close: (_ev: Event) => any;
39
39
  afterClose: () => any;
40
40
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
41
41
  type: {
@@ -60,7 +60,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
60
60
  default: boolean;
61
61
  };
62
62
  }>> & Readonly<{
63
- onClose?: ((_ev: MouseEvent) => any) | undefined;
63
+ onClose?: ((_ev: Event) => any) | undefined;
64
64
  onAfterClose?: (() => any) | undefined;
65
65
  }>, {
66
66
  type: "normal" | "success" | "warning" | "info" | "error";
@@ -1,6 +1,7 @@
1
1
  import { _objectSpread2 } from "../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/objectSpread2.js";
2
2
  import { getPrefixCls } from "../_utils/global-config.js";
3
3
  import icon_hover_default from "../_components/icon-hover.js";
4
+ import { isActivationKey } from "../_utils/keyboard.js";
4
5
  import IconCheckCircleFill from "../icon/icon-check-circle-fill/index.js";
5
6
  import IconClose from "../icon/icon-close/index.js";
6
7
  import IconCloseCircleFill from "../icon/icon-close-circle-fill/index.js";
@@ -90,6 +91,12 @@ var alert_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
90
91
  visible.value = false;
91
92
  emit("close", ev);
92
93
  };
94
+ const onCloseKeydown = (ev) => {
95
+ if (isActivationKey(ev)) {
96
+ ev.preventDefault();
97
+ handleClose(ev);
98
+ }
99
+ };
93
100
  const handleAfterLeave = () => {
94
101
  emit("afterClose");
95
102
  };
@@ -114,6 +121,7 @@ var alert_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
114
121
  }, [
115
122
  __props.showIcon && !(__props.type === "normal" && !_ctx.$slots.icon) ? (openBlock(), createElementBlock("div", {
116
123
  key: 0,
124
+ "aria-hidden": "true",
117
125
  class: normalizeClass(`${unref(prefixCls)}-icon`)
118
126
  }, [renderSlot(_ctx.$slots, "icon", {}, () => [__props.type === "info" ? (openBlock(), createBlock(unref(IconInfoCircleFill), { key: 0 })) : __props.type === "success" ? (openBlock(), createBlock(unref(IconCheckCircleFill), { key: 1 })) : __props.type === "warning" ? (openBlock(), createBlock(unref(IconExclamationCircleFill), { key: 2 })) : __props.type === "error" ? (openBlock(), createBlock(unref(IconCloseCircleFill), { key: 3 })) : createCommentVNode("", true)])], 2)) : createCommentVNode("", true),
119
127
  createElementVNode("div", { class: normalizeClass(`${unref(prefixCls)}-body`) }, [__props.title || _ctx.$slots.title ? (openBlock(), createElementBlock("div", {
@@ -126,15 +134,16 @@ var alert_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
126
134
  }, [renderSlot(_ctx.$slots, "action")], 2)) : createCommentVNode("", true),
127
135
  __props.closable ? (openBlock(), createElementBlock("div", {
128
136
  key: 2,
129
- tabindex: "-1",
137
+ tabindex: "0",
130
138
  role: "button",
131
139
  "aria-label": "Close",
132
140
  class: normalizeClass(`${unref(prefixCls)}-close-btn`),
133
- onClick: handleClose
141
+ onClick: handleClose,
142
+ onKeydown: onCloseKeydown
134
143
  }, [renderSlot(_ctx.$slots, "close-element", {}, () => [createVNode(icon_hover_default, null, {
135
144
  default: withCtx(() => [createVNode(unref(IconClose))]),
136
145
  _: 1
137
- })])], 2)) : createCommentVNode("", true)
146
+ })])], 34)) : createCommentVNode("", true)
138
147
  ], 2)) : createCommentVNode("", true)]),
139
148
  _: 3
140
149
  });
@@ -25,10 +25,10 @@ declare const Alert: {
25
25
  default: boolean;
26
26
  };
27
27
  }>> & Readonly<{
28
- onClose?: ((_ev: MouseEvent) => any) | undefined;
28
+ onClose?: ((_ev: Event) => any) | undefined;
29
29
  onAfterClose?: (() => any) | undefined;
30
30
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
31
- close: (_ev: MouseEvent) => any;
31
+ close: (_ev: Event) => any;
32
32
  afterClose: () => any;
33
33
  }, import("vue").PublicProps, {
34
34
  type: "normal" | "success" | "warning" | "info" | "error";
@@ -66,7 +66,7 @@ declare const Alert: {
66
66
  default: boolean;
67
67
  };
68
68
  }>> & Readonly<{
69
- onClose?: ((_ev: MouseEvent) => any) | undefined;
69
+ onClose?: ((_ev: Event) => any) | undefined;
70
70
  onAfterClose?: (() => any) | undefined;
71
71
  }>, {}, {}, {}, {}, {
72
72
  type: "normal" | "success" | "warning" | "info" | "error";
@@ -101,10 +101,10 @@ declare const Alert: {
101
101
  default: boolean;
102
102
  };
103
103
  }>> & Readonly<{
104
- onClose?: ((_ev: MouseEvent) => any) | undefined;
104
+ onClose?: ((_ev: Event) => any) | undefined;
105
105
  onAfterClose?: (() => any) | undefined;
106
106
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
107
- close: (_ev: MouseEvent) => any;
107
+ close: (_ev: Event) => any;
108
108
  afterClose: () => any;
109
109
  }, string, {
110
110
  type: "normal" | "success" | "warning" | "info" | "error";
@@ -157,7 +157,7 @@
157
157
  border: none;
158
158
  outline: none;
159
159
  cursor: pointer;
160
- transition: color 0.1s cubic-bezier(0, 0, 1, 1);
160
+ transition: color 0.1s cubic-bezier(0.34, 0.69, 0.1, 1);
161
161
  }
162
162
  .sd-alert-close-btn:hover {
163
163
  color: var(--sd-color-text-1);
@@ -177,7 +177,7 @@ $alert-prefix-cls: string.unquote('#{theme.$prefix}-alert');
177
177
  border: none;
178
178
  outline: none;
179
179
  cursor: pointer;
180
- transition: color theme.$transition-duration-1 theme.$transition-timing-function-linear;
180
+ transition: color theme.$transition-duration-1 theme.$transition-timing-function-standard;
181
181
 
182
182
  &:hover {
183
183
  color: $alert-color-close-icon_hover;
@@ -3,7 +3,7 @@ import { getPrefixCls } from "../_utils/global-config.js";
3
3
  import { anchorInjectionKey } from "./context.js";
4
4
  import { computed, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, defineComponent, inject, normalizeClass, onMounted, openBlock, ref, renderSlot, toDisplayString, unref } from "vue";
5
5
  //#region components/anchor/anchor-link.vue?vue&type=script&setup=true&lang.ts
6
- var _hoisted_1 = ["href"];
6
+ var _hoisted_1 = ["href", "aria-current"];
7
7
  var anchor_link_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, { name: "AnchorLink" }), {}, {
8
8
  __name: "anchor-link",
9
9
  props: {
@@ -30,6 +30,7 @@ var anchor_link_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
30
30
  const cls = computed(() => [`${linkCls}-item`, { [`${linkCls}-active`]: (context === null || context === void 0 ? void 0 : context.currentLink) === props.href }]);
31
31
  const handleClick = (e) => context === null || context === void 0 ? void 0 : context.handleClick(e, props.href);
32
32
  return (_ctx, _cache) => {
33
+ var _unref2;
33
34
  return openBlock(), createElementBlock("li", {
34
35
  ref_key: "linkRef",
35
36
  ref: linkRef,
@@ -37,6 +38,7 @@ var anchor_link_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
37
38
  }, [createElementVNode("a", {
38
39
  class: normalizeClass(linkCls),
39
40
  href: __props.href,
41
+ "aria-current": ((_unref2 = unref(context)) === null || _unref2 === void 0 ? void 0 : _unref2.currentLink) === props.href ? "location" : void 0,
40
42
  onClick: handleClick
41
43
  }, [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(__props.title), 1)])], 8, _hoisted_1), _ctx.$slots.sublist ? (openBlock(), createElementBlock("ul", {
42
44
  key: 0,
@@ -232,6 +232,8 @@ var anchor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCom
232
232
  default: withCtx(() => [createElementVNode("div", {
233
233
  ref_key: "anchorRef",
234
234
  ref: anchorRef,
235
+ role: "navigation",
236
+ "aria-label": "Anchor navigation",
235
237
  class: normalizeClass(cls.value)
236
238
  }, [!__props.lineLess ? (openBlock(), createElementBlock("div", {
237
239
  key: 0,
@@ -78,7 +78,7 @@
78
78
  .sd-anchor-link-active > .sd-anchor-link {
79
79
  color: var(--sd-color-text-1);
80
80
  font-weight: 500;
81
- transition: all 0.1s cubic-bezier(0, 0, 1, 1);
81
+ transition: color 0.1s cubic-bezier(0.34, 0.69, 0.1, 1), background-color 0.1s cubic-bezier(0.34, 0.69, 0.1, 1);
82
82
  }
83
83
  .sd-anchor-link-item .sd-anchor-link-item {
84
84
  margin-left: 16px;
@@ -79,7 +79,9 @@ $anchor-prefix-cls: string.unquote('#{theme.$prefix}-anchor');
79
79
  &-link-active > &-link {
80
80
  color: $anchor-color-title_active;
81
81
  font-weight: $anchor-font-weight-title_active;
82
- transition: all theme.$transition-duration-1 theme.$transition-timing-function-linear;
82
+ transition:
83
+ color theme.$transition-duration-1 theme.$transition-timing-function-standard,
84
+ background-color theme.$transition-duration-1 theme.$transition-timing-function-standard;
83
85
  }
84
86
 
85
87
  &-link-item &-link-item {
@@ -274,6 +274,8 @@ var auto_complete_default = /* @__PURE__ */ defineComponent({
274
274
  },
275
275
  "key": item.key,
276
276
  "class": cls,
277
+ "role": "option",
278
+ "aria-disabled": item.disabled || void 0,
277
279
  "onClick": (ev) => {
278
280
  if (!item.disabled) handleSelect(item.key, ev);
279
281
  },
@@ -318,6 +320,12 @@ var auto_complete_default = /* @__PURE__ */ defineComponent({
318
320
  "modelValue": computedValue.value,
319
321
  "disabled": mergedDisabled.value,
320
322
  "readonly": props.readonly,
323
+ "inputAttrs": {
324
+ "role": "combobox",
325
+ "aria-haspopup": "listbox",
326
+ "aria-expanded": computedPopupVisible.value,
327
+ "aria-autocomplete": "list"
328
+ },
321
329
  "onInput": handleInputValueChange,
322
330
  "onClear": handleClear
323
331
  }, { onKeydown: handleKeyDown }), slots)],
@@ -176,8 +176,14 @@ var avatar_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCom
176
176
  ref: wrapperRef,
177
177
  class: normalizeClass(wrapperCls.value)
178
178
  }, [__props.imageUrl ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
179
- hasError.value ? renderSlot(_ctx.$slots, "error", { key: 0 }, () => [createElementVNode("div", { class: normalizeClass(`${unref(prefixCls)}-image-icon`) }, [createVNode(unref(IconImageClose))], 2)]) : createCommentVNode("", true),
180
- !(hasError.value || !shouldLoad.value) && !isLoaded.value ? renderSlot(_ctx.$slots, "default", { key: 1 }, () => [createElementVNode("div", { class: normalizeClass(`${unref(prefixCls)}-image-icon`) }, [createVNode(unref(IconLoading))], 2)]) : createCommentVNode("", true),
179
+ hasError.value ? renderSlot(_ctx.$slots, "error", { key: 0 }, () => [createElementVNode("div", {
180
+ class: normalizeClass(`${unref(prefixCls)}-image-icon`),
181
+ "aria-hidden": "true"
182
+ }, [createVNode(unref(IconImageClose))], 2)]) : createCommentVNode("", true),
183
+ !(hasError.value || !shouldLoad.value) && !isLoaded.value ? renderSlot(_ctx.$slots, "default", { key: 1 }, () => [createElementVNode("div", {
184
+ class: normalizeClass(`${unref(prefixCls)}-image-icon`),
185
+ "aria-hidden": "true"
186
+ }, [createVNode(unref(IconLoading))], 2)]) : createCommentVNode("", true),
181
187
  !(hasError.value || !shouldLoad.value) ? (openBlock(), createElementBlock("img", {
182
188
  key: 2,
183
189
  src: __props.imageUrl,