@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
@@ -1,13 +1,13 @@
1
1
  import { useFormItem } from "../_hooks/use-form-item.js";
2
2
  import { _objectSpread2 } from "../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/objectSpread2.js";
3
3
  import { isArray, isFunction, isNull, isUndefined } from "../_utils/is.js";
4
+ import { KEYBOARD_KEY, getKeyDownHandler } from "../_utils/keyboard.js";
4
5
  import { useAllowClear } from "../_hooks/use-allow-clear.js";
5
6
  import { useDropdownVirtualListProps } from "../_hooks/use-dropdown-virtual-list-props.js";
6
7
  import { resolveDropdownVirtualListProps } from "../_utils/virtual-dropdown.js";
7
8
  import { useReadonlyTip, useReadonlyTipText } from "../_hooks/use-readonly-tip.js";
8
9
  import Trigger from "../trigger/index.js";
9
10
  import Tooltip from "../tooltip/index.js";
10
- import { KEYBOARD_KEY, getKeyDownHandler } from "../_utils/keyboard.js";
11
11
  import { useTrigger } from "../_hooks/use-trigger.js";
12
12
  import { cascaderInjectionKey } from "./context.js";
13
13
  import { getCheckedStatus, getLeafOptionInfos, getLeafOptionKeys, getOptionInfos, getOptionLabel, getValidValues, getValueKey } from "./utils.js";
@@ -185,6 +185,12 @@ var cascader_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
185
185
  var _props$triggerProps;
186
186
  return (_props$triggerProps = props.triggerProps) !== null && _props$triggerProps !== void 0 ? _props$triggerProps : {};
187
187
  });
188
+ const triggerInputAttrs = computed(() => ({
189
+ "role": "combobox",
190
+ "aria-expanded": computedPopupVisible.value,
191
+ "aria-haspopup": "menu",
192
+ "aria-autocomplete": mergedAllowSearch.value ? "list" : "none"
193
+ }));
188
194
  watch(modelValue, (nextModelValue) => {
189
195
  if (isUndefined(nextModelValue) || isNull(nextModelValue)) _value.value = getDefaultValue(props.multiple, props.pathMode);
190
196
  });
@@ -483,6 +489,7 @@ var cascader_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
483
489
  "popup-container": unref(popupContainer),
484
490
  "prevent-focus": true,
485
491
  "click-to-close": !Boolean(unref(mergedAllowSearch)),
492
+ "aria-has-popup": "menu",
486
493
  onPopupVisibleChange: handlePopupVisibleChange
487
494
  }), {
488
495
  content: withCtx(() => [showSearchPanel.value ? (openBlock(), createBlock(unref(cascader_search_panel_default), {
@@ -542,7 +549,8 @@ var cascader_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
542
549
  placeholder: unref(placeholder),
543
550
  loading: unref(loading),
544
551
  "max-tag-count": unref(maxTagCount),
545
- "tag-nowrap": unref(tagNowrap)
552
+ "tag-nowrap": unref(tagNowrap),
553
+ "input-attrs": triggerInputAttrs.value
546
554
  }, unref(attrs), {
547
555
  onInputValueChange: handleInputValueChange,
548
556
  onClear: handleClear,
@@ -590,6 +598,7 @@ var cascader_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
590
598
  "loading",
591
599
  "max-tag-count",
592
600
  "tag-nowrap",
601
+ "input-attrs",
593
602
  "onKeydown"
594
603
  ])]),
595
604
  _: 3
@@ -85,7 +85,7 @@
85
85
  .sd-select-dropdown .sd-select-option-active, .sd-select-dropdown .sd-select-option:not(.sd-select-dropdown .sd-select-option-disabled):hover {
86
86
  color: var(--sd-color-text-1);
87
87
  background-color: var(--sd-color-fill-2);
88
- transition: all 0.1s cubic-bezier(0, 0, 1, 1);
88
+ 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);
89
89
  }
90
90
  .sd-select-dropdown .sd-select-option-disabled {
91
91
  color: var(--sd-color-text-4);
@@ -289,7 +289,7 @@
289
289
  .sd-cascader-option-active {
290
290
  color: var(--sd-color-text-1);
291
291
  background-color: var(--sd-color-fill-2);
292
- transition: all 0.2s cubic-bezier(0, 0, 1, 1);
292
+ transition: color 0.2s cubic-bezier(0.34, 0.69, 0.1, 1), background-color 0.2s cubic-bezier(0.34, 0.69, 0.1, 1);
293
293
  }
294
294
  .sd-cascader-option-active:hover {
295
295
  color: var(--sd-color-text-1);
@@ -217,7 +217,9 @@ $cascader-prefix-cls: string.unquote('#{theme.$prefix}-cascader');
217
217
  &-active {
218
218
  color: $cascader-color-item-text_active;
219
219
  background-color: $cascader-color-item-bg_active;
220
- transition: all theme.$transition-duration-2 theme.$transition-timing-function-linear;
220
+ transition:
221
+ color theme.$transition-duration-2 theme.$transition-timing-function-standard,
222
+ background-color theme.$transition-duration-2 theme.$transition-timing-function-standard;
221
223
 
222
224
  &:hover {
223
225
  color: $cascader-color-item-text_active;
@@ -130,7 +130,10 @@ var checkbox_group_default = /* @__PURE__ */ defineComponent({
130
130
  };
131
131
  return () => {
132
132
  var _slots$default;
133
- return createVNode("span", { "class": cls.value }, [options.value.length > 0 ? renderOptions() : (_slots$default = slots.default) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots)]);
133
+ return createVNode("span", {
134
+ "role": "group",
135
+ "class": cls.value
136
+ }, [options.value.length > 0 ? renderOptions() : (_slots$default = slots.default) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots)]);
134
137
  };
135
138
  }
136
139
  });
@@ -19,6 +19,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
19
19
  type: BooleanConstructor;
20
20
  default: boolean;
21
21
  };
22
+ tabindex: {
23
+ type: (StringConstructor | NumberConstructor)[];
24
+ default: undefined;
25
+ };
22
26
  uninjectGroupContext: {
23
27
  type: BooleanConstructor;
24
28
  default: boolean;
@@ -46,6 +50,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
46
50
  type: BooleanConstructor;
47
51
  default: boolean;
48
52
  };
53
+ tabindex: {
54
+ type: (StringConstructor | NumberConstructor)[];
55
+ default: undefined;
56
+ };
49
57
  uninjectGroupContext: {
50
58
  type: BooleanConstructor;
51
59
  default: boolean;
@@ -58,6 +66,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
58
66
  modelValue: boolean | (string | number | boolean)[];
59
67
  defaultChecked: boolean;
60
68
  indeterminate: boolean;
69
+ tabindex: string | number;
61
70
  uninjectGroupContext: boolean;
62
71
  }, {}, {
63
72
  IconCheck: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -55,6 +55,14 @@ var checkbox_default = /* @__PURE__ */ defineComponent({
55
55
  type: Boolean,
56
56
  default: false
57
57
  },
58
+ /**
59
+ * @zh 原生 input 的 tabindex(默认不渲染,input 保持原生可聚焦;树节点内传 -1 把 checkbox 移出 Tab 序列,改由 treeitem 统一聚焦/操作)
60
+ * @en tabindex for the native input (omitted by default so the input stays natively focusable; pass -1 in tree nodes to remove the checkbox from the Tab order and operate it via the treeitem)
61
+ */
62
+ tabindex: {
63
+ type: [Number, String],
64
+ default: void 0
65
+ },
58
66
  uninjectGroupContext: {
59
67
  type: Boolean,
60
68
  default: false
@@ -149,6 +157,11 @@ var checkbox_default = /* @__PURE__ */ defineComponent({
149
157
  if (_checked.value !== checked) _checked.value = checked;
150
158
  if (checkboxRef.value && checkboxRef.value.checked !== checked) checkboxRef.value.checked = checked;
151
159
  });
160
+ watch(() => props.indeterminate, () => {
161
+ nextTick(() => {
162
+ if (checkboxRef.value) checkboxRef.value.indeterminate = props.indeterminate;
163
+ });
164
+ }, { immediate: true });
152
165
  return () => {
153
166
  var _ref, _ref2, _slots$checkbox, _checkboxGroupCtx$slo;
154
167
  return createVNode("label", {
@@ -158,6 +171,7 @@ var checkbox_default = /* @__PURE__ */ defineComponent({
158
171
  createVNode("input", {
159
172
  "ref": checkboxRef,
160
173
  "type": "checkbox",
174
+ "tabindex": props.tabindex,
161
175
  "checked": computedChecked.value,
162
176
  "value": props.value,
163
177
  "class": `${prefixCls}-target`,
@@ -23,6 +23,10 @@ declare const Checkbox: {
23
23
  type: BooleanConstructor;
24
24
  default: boolean;
25
25
  };
26
+ tabindex: {
27
+ type: (StringConstructor | NumberConstructor)[];
28
+ default: undefined;
29
+ };
26
30
  uninjectGroupContext: {
27
31
  type: BooleanConstructor;
28
32
  default: boolean;
@@ -38,6 +42,7 @@ declare const Checkbox: {
38
42
  modelValue: boolean | (string | number | boolean)[];
39
43
  defaultChecked: boolean;
40
44
  indeterminate: boolean;
45
+ tabindex: string | number;
41
46
  uninjectGroupContext: boolean;
42
47
  }, true, {}, {}, {
43
48
  IconCheck: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -140,6 +145,10 @@ declare const Checkbox: {
140
145
  type: BooleanConstructor;
141
146
  default: boolean;
142
147
  };
148
+ tabindex: {
149
+ type: (StringConstructor | NumberConstructor)[];
150
+ default: undefined;
151
+ };
143
152
  uninjectGroupContext: {
144
153
  type: BooleanConstructor;
145
154
  default: boolean;
@@ -152,6 +161,7 @@ declare const Checkbox: {
152
161
  modelValue: boolean | (string | number | boolean)[];
153
162
  defaultChecked: boolean;
154
163
  indeterminate: boolean;
164
+ tabindex: string | number;
155
165
  uninjectGroupContext: boolean;
156
166
  }>;
157
167
  __isFragment?: never;
@@ -177,6 +187,10 @@ declare const Checkbox: {
177
187
  type: BooleanConstructor;
178
188
  default: boolean;
179
189
  };
190
+ tabindex: {
191
+ type: (StringConstructor | NumberConstructor)[];
192
+ default: undefined;
193
+ };
180
194
  uninjectGroupContext: {
181
195
  type: BooleanConstructor;
182
196
  default: boolean;
@@ -192,6 +206,7 @@ declare const Checkbox: {
192
206
  modelValue: boolean | (string | number | boolean)[];
193
207
  defaultChecked: boolean;
194
208
  indeterminate: boolean;
209
+ tabindex: string | number;
195
210
  uninjectGroupContext: boolean;
196
211
  }, {}, string, {}, {
197
212
  IconCheck: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -82,7 +82,7 @@
82
82
  }
83
83
  .sd-checkbox:hover .sd-checkbox-icon {
84
84
  border-color: var(--sd-color-fill-4);
85
- transition: border-color 0.1s cubic-bezier(0, 0, 1, 1), transform 0.3s cubic-bezier(0.3, 1.3, 0.3, 1);
85
+ transition: border-color 0.1s cubic-bezier(0.34, 0.69, 0.1, 1), transform 0.3s cubic-bezier(0.3, 1.3, 0.3, 1);
86
86
  }
87
87
  .sd-checkbox-checked:hover .sd-checkbox-icon, .sd-checkbox-indeterminate:hover .sd-checkbox-icon {
88
88
  transition: transform 0.3s cubic-bezier(0.3, 1.3, 0.3, 1);
@@ -84,7 +84,7 @@
84
84
  &:hover &-icon {
85
85
  border-color: $checkbox-mask-color-border_hover;
86
86
  transition:
87
- border-color theme.$transition-duration-1 theme.$transition-timing-function-linear,
87
+ border-color theme.$transition-duration-1 theme.$transition-timing-function-standard,
88
88
  transform theme.$transition-duration-3 theme.$transition-timing-function-overshoot;
89
89
  }
90
90
 
@@ -1,6 +1,7 @@
1
1
  import { getPrefixCls } from "../_utils/global-config.js";
2
2
  import { isNumber } from "../_utils/is.js";
3
3
  import icon_hover_default from "../_components/icon-hover.js";
4
+ import { isActivationKey } from "../_utils/keyboard.js";
4
5
  import IconCaretLeft from "../icon/icon-caret-left/index.js";
5
6
  import IconCaretRight from "../icon/icon-caret-right/index.js";
6
7
  import { collapseKey } from "./context.js";
@@ -90,6 +91,16 @@ var collapse_item_default = /* @__PURE__ */ defineComponent({
90
91
  (_collapseCtx$handleCl = collapseCtx.handleClick) === null || _collapseCtx$handleCl === void 0 || _collapseCtx$handleCl.call(collapseCtx, key, e);
91
92
  }
92
93
  };
94
+ const headerId = `${prefixCls}-${instance === null || instance === void 0 ? void 0 : instance.uid}-header`;
95
+ const contentId = `${prefixCls}-${instance === null || instance === void 0 ? void 0 : instance.uid}-content`;
96
+ const handleKeydown = (e) => {
97
+ if (props.disabled) return;
98
+ if (isActivationKey(e)) {
99
+ var _collapseCtx$handleCl2;
100
+ e.preventDefault();
101
+ (_collapseCtx$handleCl2 = collapseCtx.handleClick) === null || _collapseCtx$handleCl2 === void 0 || _collapseCtx$handleCl2.call(collapseCtx, key, e);
102
+ }
103
+ };
93
104
  watch(isActive, (isActive) => {
94
105
  if (isActive && !mounted.value) mounted.value = true;
95
106
  });
@@ -137,17 +148,24 @@ var collapse_item_default = /* @__PURE__ */ defineComponent({
137
148
  "role": "button",
138
149
  "aria-disabled": props.disabled,
139
150
  "aria-expanded": isActive.value,
140
- "tabindex": "0",
151
+ "aria-controls": contentId,
152
+ "tabindex": props.disabled ? -1 : 0,
141
153
  "class": headerCls.value,
142
- "onClick": handleClick
154
+ "onClick": handleClick,
155
+ "onKeydown": handleKeydown
143
156
  }, [
144
157
  expandIconRender(),
145
- createVNode("div", { "class": `${prefixCls}-header-title` }, [(_slots$header = (_slots$header2 = slots.header) === null || _slots$header2 === void 0 ? void 0 : _slots$header2.call(slots)) !== null && _slots$header !== void 0 ? _slots$header : props.header]),
158
+ createVNode("div", {
159
+ "id": headerId,
160
+ "class": `${prefixCls}-header-title`
161
+ }, [(_slots$header = (_slots$header2 = slots.header) === null || _slots$header2 === void 0 ? void 0 : _slots$header2.call(slots)) !== null && _slots$header !== void 0 ? _slots$header : props.header]),
146
162
  slots.extra && createVNode("div", { "class": `${prefixCls}-header-extra` }, [(_slots$extra = slots.extra) === null || _slots$extra === void 0 ? void 0 : _slots$extra.call(slots)])
147
163
  ]), createVNode(Transition, mergeProps({ "name": "collapse-slider" }, transitionEvents), { default: () => {
148
164
  var _slots$default;
149
165
  return [withDirectives(createVNode("div", {
150
166
  "role": "region",
167
+ "id": contentId,
168
+ "aria-labelledby": headerId,
151
169
  "class": contentCls.value
152
170
  }, [mounted.value && createVNode("div", {
153
171
  "ref": "contentBoxRef",
@@ -5,6 +5,6 @@ export interface CollapseContext {
5
5
  showExpandIcon?: boolean;
6
6
  expandIconPosition: string;
7
7
  destroyOnHide: boolean;
8
- handleClick: (key: string | number, e: MouseEvent) => void;
8
+ handleClick: (key: string | number, e: Event) => void;
9
9
  }
10
10
  export declare const collapseKey: InjectionKey<CollapseContext>;
@@ -140,6 +140,7 @@ var color_picker_default = /* @__PURE__ */ defineComponent({
140
140
  setup(props, { emit, slots }) {
141
141
  const prefixCls = getPrefixCls("color-picker");
142
142
  const innerValue = ref(props.defaultValue);
143
+ const popupVisible = ref(false);
143
144
  const innerRecentColors = ref(Array.isArray(props.defaultRecentColors) ? props.defaultRecentColors : []);
144
145
  const mergedValue = computed(() => {
145
146
  var _props$modelValue;
@@ -201,6 +202,7 @@ var color_picker_default = /* @__PURE__ */ defineComponent({
201
202
  handleColorChange(formatColorState(parseColorState(value, props.colorModes), normalizedFormat.value, mergedEnableAlpha.value), "input");
202
203
  };
203
204
  const onPopupVisibleChange = (visible) => {
205
+ popupVisible.value = visible;
204
206
  emit("popup-visible-change", visible, triggerInputValue.value);
205
207
  };
206
208
  const { tipVisible, show: showReadonlyTip } = useReadonlyTip(toRef(props, "readonly"), toRef(props, "disabled"));
@@ -229,6 +231,10 @@ var color_picker_default = /* @__PURE__ */ defineComponent({
229
231
  "disabled": props.disabled,
230
232
  "readonly": props.readonly,
231
233
  "modelValue": triggerInputValue.value,
234
+ "inputAttrs": {
235
+ "aria-haspopup": "dialog",
236
+ "aria-expanded": popupVisible.value
237
+ },
232
238
  "onChange": handleTriggerInputChange,
233
239
  "onClear": handleClear
234
240
  }, props.inputProps), { prefix: () => createVNode("div", {
@@ -6,7 +6,7 @@ import Button from "../button/index.js";
6
6
  import IconCopy from "../icon/icon-copy/index.js";
7
7
  import Link from "../link/index.js";
8
8
  import Message from "../message/index.js";
9
- import { computed, createBlock, createVNode, defineComponent, guardReactiveProps, mergeProps, normalizeProps, openBlock, renderSlot, resolveDynamicComponent, unref, useAttrs, withCtx } from "vue";
9
+ import { computed, createBlock, createVNode, defineComponent, guardReactiveProps, mergeProps, normalizeProps, openBlock, renderSlot, resolveDynamicComponent, unref, useAttrs, useSlots, withCtx } from "vue";
10
10
  import copy from "copy-to-clipboard";
11
11
  //#region components/copy/copy.vue?vue&type=script&setup=true&lang.ts
12
12
  var copy_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, {
@@ -49,7 +49,14 @@ var copy_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
49
49
  const props = __props;
50
50
  const emit = __emit;
51
51
  const attrs = useAttrs();
52
+ const slots = useSlots();
52
53
  const prefixCls = getPrefixCls("copy");
54
+ const computedAriaLabel = computed(() => {
55
+ const consumer = attrs["aria-label"];
56
+ if (consumer !== void 0) return consumer;
57
+ if (slots.default) return void 0;
58
+ return props.tooltip;
59
+ });
53
60
  const componentMap = {
54
61
  link: Link,
55
62
  button: Button
@@ -81,12 +88,13 @@ var copy_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
81
88
  return openBlock(), createBlock(unref(Tooltip), normalizeProps(guardReactiveProps(mergedTooltipProps.value)), {
82
89
  default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(renderComponent.value), mergeProps(unref(attrs), {
83
90
  class: componentClass.value,
91
+ "aria-label": computedAriaLabel.value,
84
92
  onClick: handleCopy
85
93
  }), {
86
94
  icon: withCtx(() => [renderSlot(_ctx.$slots, "icon", {}, () => [createVNode(unref(IconCopy))])]),
87
95
  default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
88
96
  _: 3
89
- }, 16, ["class"]))]),
97
+ }, 16, ["class", "aria-label"]))]),
90
98
  _: 3
91
99
  }, 16);
92
100
  };
@@ -5,6 +5,9 @@ import useCellClassName from "../hooks/use-cell-class-name.js";
5
5
  import { Fragment, computed, createElementBlock, createElementVNode, defineComponent, normalizeClass, openBlock, reactive, renderList, renderSlot, toDisplayString, toRefs, unref } from "vue";
6
6
  //#region components/date-picker/panels/body.vue?vue&type=script&setup=true&lang.ts
7
7
  var _hoisted_1 = [
8
+ "aria-label",
9
+ "aria-selected",
10
+ "aria-disabled",
8
11
  "onMouseenter",
9
12
  "onMouseleave",
10
13
  "onClick"
@@ -45,6 +48,7 @@ var body_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
45
48
  now
46
49
  }));
47
50
  const isCellDisabled = (cellData) => isDisabledDate(cellData.value, disabledDate === null || disabledDate === void 0 ? void 0 : disabledDate.value, mode === null || mode === void 0 ? void 0 : mode.value);
51
+ const isCellSelected = (cellData) => Boolean((value === null || value === void 0 ? void 0 : value.value) && (isSameTime === null || isSameTime === void 0 ? void 0 : isSameTime.value) && isSameTime.value(cellData.value, value.value));
48
52
  const isWeek = computed(() => (mode === null || mode === void 0 ? void 0 : mode.value) === "week");
49
53
  const isHiddenNotInViewCell = (cellData) => props.hideNotInViewDates && (cellData.isPrev || cellData.isNext);
50
54
  const getCellClassNameFn = (cellData) => {
@@ -63,17 +67,26 @@ var body_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
63
67
  emit("cell-mouse-enter", cellData);
64
68
  };
65
69
  return (_ctx, _cache) => {
66
- return openBlock(), createElementBlock("div", { class: normalizeClass(`${unref(prefixCls)}-body`) }, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.rows, (row, rowIndex) => {
70
+ return openBlock(), createElementBlock("div", {
71
+ class: normalizeClass(`${unref(prefixCls)}-body`),
72
+ role: "grid"
73
+ }, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.rows, (row, rowIndex) => {
67
74
  return openBlock(), createElementBlock("div", {
68
75
  key: rowIndex,
76
+ role: "row",
69
77
  class: normalizeClass([`${unref(prefixCls)}-row`, { [`${unref(prefixCls)}-row-week`]: isWeek.value }])
70
78
  }, [(openBlock(true), createElementBlock(Fragment, null, renderList(row, (cell, colIndex) => {
79
+ var _cell$value;
71
80
  return openBlock(), createElementBlock(Fragment, null, [isWeek.value && colIndex === 0 ? (openBlock(), createElementBlock("div", {
72
81
  key: colIndex,
73
82
  class: normalizeClass([`${unref(prefixCls)}-cell`, `${unref(prefixCls)}-cell-week`])
74
83
  }, [createElementVNode("div", { class: normalizeClass(`${unref(prefixCls)}-date`) }, [createElementVNode("div", { class: normalizeClass(`${unref(prefixCls)}-date-value`) }, toDisplayString(cell.label), 3)], 2)], 2)) : (openBlock(), createElementBlock("div", {
75
84
  key: colIndex,
76
85
  class: normalizeClass(getCellClassNameFn(cell)),
86
+ role: "gridcell",
87
+ "aria-label": (_cell$value = cell.value) === null || _cell$value === void 0 ? void 0 : _cell$value.format("YYYY-MM-DD"),
88
+ "aria-selected": isCellSelected(cell) ? "true" : void 0,
89
+ "aria-disabled": isCellDisabled(cell) || isHiddenNotInViewCell(cell) || void 0,
77
90
  onMouseenter: () => {
78
91
  onCellMouseEnter(cell);
79
92
  },
@@ -637,6 +637,7 @@ var picker_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCom
637
637
  "popup-visible": unref(panelVisible),
638
638
  "unmount-on-close": __props.unmountOnClose,
639
639
  "popup-container": __props.popupContainer,
640
+ "aria-has-popup": "dialog",
640
641
  onPopupVisibleChange: onPanelVisibleChange
641
642
  }), {
642
643
  content: withCtx(() => [renderSlot(_ctx.$slots, "panelRender", {
@@ -30,7 +30,7 @@
30
30
  background-color: var(--sd-color-fill-2);
31
31
  border: 1px solid transparent;
32
32
  border-radius: var(--sd-border-radius-small);
33
- transition: all 0.1s cubic-bezier(0, 0, 1, 1);
33
+ 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), border-color 0.1s cubic-bezier(0.34, 0.69, 0.1, 1), box-shadow 0.1s cubic-bezier(0.34, 0.69, 0.1, 1);
34
34
  }
35
35
  .sd-picker-input {
36
36
  display: inline-flex;
@@ -46,7 +46,7 @@
46
46
  background-color: transparent;
47
47
  border: none;
48
48
  outline: none;
49
- transition: all 0.1s cubic-bezier(0, 0, 1, 1);
49
+ 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);
50
50
  }
51
51
  .sd-picker input::placeholder {
52
52
  color: var(--sd-color-text-3);
@@ -261,7 +261,7 @@
261
261
  text-align: center;
262
262
  background-color: var(--sd-color-bg-popup);
263
263
  border-radius: 50%;
264
- transition: all 0.1s cubic-bezier(0, 0, 1, 1);
264
+ transition: background-color 0.1s cubic-bezier(0.34, 0.69, 0.1, 1);
265
265
  user-select: none;
266
266
  }
267
267
  .sd-picker-header-icon:not(.sd-picker-header-icon-hidden) {
@@ -274,7 +274,7 @@
274
274
  padding: 2px;
275
275
  border-radius: 2px;
276
276
  cursor: pointer;
277
- transition: all 0.1s;
277
+ transition: background-color 0.1s;
278
278
  }
279
279
  .sd-picker-header-label:hover {
280
280
  background-color: var(--sd-color-fill-3);
@@ -330,7 +330,7 @@
330
330
  .sd-picker-cell-selected .sd-picker-date-value {
331
331
  color: var(--sd-color-white);
332
332
  background-color: rgb(var(--sd-primary-6));
333
- transition: background-color 0.1s cubic-bezier(0, 0, 1, 1);
333
+ transition: background-color 0.1s cubic-bezier(0.34, 0.69, 0.1, 1);
334
334
  }
335
335
  .sd-picker-cell-in-view:not(.sd-picker-cell-selected, .sd-picker-cell-range-start, .sd-picker-cell-range-end, .sd-picker-cell-disabled, .sd-picker-cell-week) .sd-picker-date-value:hover {
336
336
  color: var(--sd-color-text-1);
@@ -88,7 +88,8 @@ $picker-prefix-cls: string.unquote('#{theme.$prefix}-picker');
88
88
  text-align: center;
89
89
  background-color: $picker-color-bg-switch-icon;
90
90
  border-radius: 50%;
91
- transition: all theme.$transition-duration-1 theme.$transition-timing-function-linear;
91
+ transition: background-color theme.$transition-duration-1
92
+ theme.$transition-timing-function-standard;
92
93
  user-select: none;
93
94
  }
94
95
 
@@ -104,7 +105,7 @@ $picker-prefix-cls: string.unquote('#{theme.$prefix}-picker');
104
105
  padding: 2px;
105
106
  border-radius: 2px;
106
107
  cursor: pointer;
107
- transition: all theme.$transition-duration-1;
108
+ transition: background-color theme.$transition-duration-1;
108
109
 
109
110
  &:hover {
110
111
  background-color: $picker-panel-color-bg-label_hover;
@@ -172,7 +173,7 @@ $picker-prefix-cls: string.unquote('#{theme.$prefix}-picker');
172
173
  color: $picker-panel-color-text-cell_selected;
173
174
  background-color: $picker-panel-color-bg-cell_selected;
174
175
  transition: background-color theme.$transition-duration-1
175
- theme.$transition-timing-function-linear;
176
+ theme.$transition-timing-function-standard;
176
177
  }
177
178
 
178
179
  &-cell-in-view:not(
@@ -218,6 +218,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
218
218
  visible: boolean;
219
219
  unmountOnClose: boolean;
220
220
  renderToBody: boolean;
221
+ escToClose: boolean;
221
222
  height: string | number;
222
223
  defaultVisible: boolean;
223
224
  closable: boolean;
@@ -226,7 +227,6 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
226
227
  titleEllipsisTooltip: boolean | EllipsisTooltipProps;
227
228
  maskClosable: boolean;
228
229
  okLoading: boolean;
229
- escToClose: boolean;
230
230
  hideCancel: boolean;
231
231
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
232
232
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -3,6 +3,7 @@ import { getPrefixCls } from "../_utils/global-config.js";
3
3
  import { isBoolean, isFunction, isNumber, isPromise } from "../_utils/is.js";
4
4
  import { off, on } from "../_utils/dom.js";
5
5
  import icon_hover_default from "../_components/icon-hover.js";
6
+ import { KEYBOARD_KEY, onActivate } from "../_utils/keyboard.js";
6
7
  import IconClose from "../icon/icon-close/index.js";
7
8
  import { _asyncToGenerator } from "../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/asyncToGenerator.js";
8
9
  import { useI18n } from "../locale/index.js";
@@ -10,13 +11,14 @@ import client_only_default from "../_components/client-only.js";
10
11
  import usePopupManager from "../_hooks/use-popup-manager.js";
11
12
  import { useTeleportContainer } from "../_hooks/use-teleport-container.js";
12
13
  import Button from "../button/index.js";
13
- import { KEYBOARD_KEY } from "../_utils/keyboard.js";
14
14
  import Ellipsis from "../ellipsis/index.js";
15
15
  import { useConfigProviderProp } from "../_hooks/use-config-provider-prop.js";
16
+ import { getFocusableElements, useFocusTrap } from "../_hooks/use-focus-trap.js";
16
17
  import { useOverflow } from "../_hooks/use-overflow.js";
17
18
  import { DRAWER_PLACEMENTS } from "./utils.js";
18
- import { Teleport, Transition, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeProps, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, openBlock, ref, renderSlot, toDisplayString, toRefs, unref, vShow, watch, withCtx, withDirectives } from "vue";
19
+ import { Teleport, Transition, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, getCurrentInstance, mergeProps, nextTick, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, openBlock, ref, renderSlot, toDisplayString, toRefs, unref, useSlots, vShow, watch, withCtx, withDirectives } from "vue";
19
20
  //#region components/drawer/drawer.vue?vue&type=script&setup=true&lang.ts
21
+ var _hoisted_1 = ["aria-labelledby"];
20
22
  var drawer_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, {
21
23
  name: "Drawer",
22
24
  inheritAttrs: false
@@ -255,6 +257,12 @@ var drawer_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCom
255
257
  const { popupContainer, placement, mask, maskClosable, escToClose, closable, header, footer, hideCancel, okText, cancelText, okButtonProps, cancelButtonProps, titleEllipsisTooltip, width, height } = toRefs(props);
256
258
  const prefixCls = getPrefixCls("drawer");
257
259
  const { t } = useI18n();
260
+ const slots = useSlots();
261
+ const drawerRef = ref();
262
+ const titleId = `sd-drawer-title-${getCurrentInstance().uid}`;
263
+ const bodyId = `sd-drawer-body-${getCurrentInstance().uid}`;
264
+ const hasTitle = computed(() => mergedHeader.value && !slots.header && (Boolean(props.title) || Boolean(slots.title)));
265
+ const { activate: activateFocusTrap, deactivate: deactivateFocusTrap } = useFocusTrap(drawerRef, { initialFocus: (c) => getFocusableElements(c).find((el) => !el.closest(".sd-drawer-close-btn")) });
258
266
  const { mergedValue: mergedPlacement } = useConfigProviderProp(placement, {
259
267
  propNames: ["placement"],
260
268
  getGlobalValue: (configProviderCtx) => {
@@ -463,6 +471,7 @@ var drawer_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCom
463
471
  mounted.value = true;
464
472
  setOverflowHidden();
465
473
  if (mergedEscToClose.value) addGlobalKeyDownListener();
474
+ nextTick(() => activateFocusTrap());
466
475
  }
467
476
  });
468
477
  onBeforeUnmount(() => {
@@ -476,9 +485,11 @@ var drawer_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCom
476
485
  mounted.value = true;
477
486
  setOverflowHidden();
478
487
  addGlobalKeyDownListener();
488
+ nextTick(() => activateFocusTrap());
479
489
  } else {
480
490
  emit("beforeClose");
481
491
  removeGlobalKeyDownListener();
492
+ deactivateFocusTrap();
482
493
  }
483
494
  });
484
495
  const style = computed(() => {
@@ -516,14 +527,22 @@ var drawer_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCom
516
527
  onAfterLeave: handleClose
517
528
  }, {
518
529
  default: withCtx(() => [withDirectives(createElementVNode("div", {
530
+ ref_key: "drawerRef",
531
+ ref: drawerRef,
519
532
  class: normalizeClass(unref(prefixCls)),
520
- style: normalizeStyle(style.value)
533
+ style: normalizeStyle(style.value),
534
+ role: "dialog",
535
+ "aria-modal": "true",
536
+ "aria-labelledby": hasTitle.value ? titleId : void 0,
537
+ "aria-describedby": bodyId,
538
+ tabindex: "-1"
521
539
  }, [
522
540
  unref(mergedHeader) ? (openBlock(), createElementBlock("div", {
523
541
  key: 0,
524
542
  class: normalizeClass(`${unref(prefixCls)}-header`)
525
543
  }, [renderSlot(_ctx.$slots, "header", {}, () => [_ctx.$slots.title || __props.title ? (openBlock(), createElementBlock("div", {
526
544
  key: 0,
545
+ id: titleId,
527
546
  class: normalizeClass(`${unref(prefixCls)}-title`)
528
547
  }, [createVNode(unref(Ellipsis), {
529
548
  class: normalizeClass(`${unref(prefixCls)}-title-text`),
@@ -533,16 +552,18 @@ var drawer_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCom
533
552
  _: 3
534
553
  }, 8, ["class", "tooltip"])], 2)) : createCommentVNode("", true), unref(mergedClosable) ? (openBlock(), createElementBlock("div", {
535
554
  key: 1,
536
- tabindex: "-1",
555
+ tabindex: "0",
537
556
  role: "button",
538
557
  "aria-label": "Close",
539
558
  class: normalizeClass(`${unref(prefixCls)}-close-btn`),
540
- onClick: handleCancel
559
+ onClick: handleCancel,
560
+ onKeydown: _cache[0] || (_cache[0] = ($event) => unref(onActivate)(handleCancel))
541
561
  }, [createVNode(icon_hover_default, null, {
542
562
  default: withCtx(() => [createVNode(unref(IconClose))]),
543
563
  _: 1
544
- })], 2)) : createCommentVNode("", true)])], 2)) : createCommentVNode("", true),
564
+ })], 34)) : createCommentVNode("", true)])], 2)) : createCommentVNode("", true),
545
565
  createElementVNode("div", {
566
+ id: bodyId,
546
567
  class: normalizeClass([`${unref(prefixCls)}-body`, __props.bodyClass]),
547
568
  style: normalizeStyle(__props.bodyStyle)
548
569
  }, [renderSlot(_ctx.$slots, "default")], 6),
@@ -559,7 +580,7 @@ var drawer_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCom
559
580
  default: withCtx(() => [createTextVNode(toDisplayString(unref(mergedOkText) || unref(t)("drawer.okText")), 1)]),
560
581
  _: 1
561
582
  }, 16, ["loading"])])], 2)) : createCommentVNode("", true)
562
- ], 6), [[vShow, computedVisible.value]])]),
583
+ ], 14, _hoisted_1), [[vShow, computedVisible.value]])]),
563
584
  _: 3
564
585
  }, 8, ["name"])], 16)), [[vShow, computedVisible.value || mounted.value]]) : createCommentVNode("", true)], 8, ["to", "disabled"]))]),
565
586
  _: 3