@sdata/web-vue 3.13.0 → 3.15.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 (300) hide show
  1. package/dist/sd.css +167 -114
  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 +13 -3
  9. package/es/_components/select-view/select-view.d.ts +2 -0
  10. package/es/_components/select-view/select-view.js +7 -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 +16 -4
  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 +6 -1
  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 +8 -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/basic-crud-table/basic-crud-modal.js +5 -0
  37. package/es/basic-crud-table/basic-crud-modal.vue.d.ts +264 -0
  38. package/es/basic-crud-table/basic-crud-modal.vue_vue_type_script_setup_true_lang.js +139 -0
  39. package/es/basic-crud-table/basic-crud-table.js +5 -0
  40. package/es/basic-crud-table/basic-crud-table.vue.d.ts +935 -0
  41. package/es/basic-crud-table/basic-crud-table.vue_vue_type_script_setup_true_lang.js +510 -0
  42. package/es/basic-crud-table/index.d.ts +2722 -0
  43. package/es/basic-crud-table/index.js +9 -0
  44. package/es/basic-crud-table/style/css.js +2 -0
  45. package/es/basic-crud-table/style/index.css +42 -0
  46. package/es/basic-crud-table/style/index.d.ts +2 -0
  47. package/es/basic-crud-table/style/index.js +2 -0
  48. package/es/basic-crud-table/style/index.scss +33 -0
  49. package/es/basic-crud-table/style/token.scss +8 -0
  50. package/es/basic-crud-table/types.d.ts +69 -0
  51. package/es/breadcrumb/breadcrumb-item.js +4 -2
  52. package/es/breadcrumb/breadcrumb.js +3 -0
  53. package/es/button/button.vue_vue_type_script_setup_true_lang.js +10 -5
  54. package/es/button/style/index.css +15 -6
  55. package/es/button/style/index.scss +25 -7
  56. package/es/calendar/components/event.vue_vue_type_script_setup_true_lang.js +1 -1
  57. package/es/calendar/components/headings-bar.vue_vue_type_script_setup_true_lang.js +1 -1
  58. package/es/calendar/style/event.scss +2 -2
  59. package/es/calendar/style/index.css +2 -2
  60. package/es/card/style/index.css +3 -3
  61. package/es/card/style/index.scss +3 -3
  62. package/es/carousel/carousel-arrow.vue.d.ts +4 -4
  63. package/es/carousel/carousel-arrow.vue_vue_type_script_setup_true_lang.js +25 -5
  64. package/es/carousel/carousel-indicator.vue_vue_type_script_setup_true_lang.js +25 -4
  65. package/es/carousel/carousel-item.vue_vue_type_script_setup_true_lang.js +11 -2
  66. package/es/carousel/carousel.js +20 -1
  67. package/es/carousel/style/index.css +1 -1
  68. package/es/carousel/style/index.scss +1 -1
  69. package/es/cascader/cascader-option.js +1 -1
  70. package/es/cascader/cascader.vue_vue_type_script_setup_true_lang.js +13 -4
  71. package/es/cascader/style/index.css +2 -2
  72. package/es/cascader/style/index.scss +3 -1
  73. package/es/checkbox/checkbox-group.js +4 -1
  74. package/es/checkbox/checkbox.d.ts +9 -0
  75. package/es/checkbox/checkbox.js +14 -0
  76. package/es/checkbox/index.d.ts +15 -0
  77. package/es/checkbox/style/index.css +1 -1
  78. package/es/checkbox/style/index.scss +1 -1
  79. package/es/collapse/collapse-item.js +21 -3
  80. package/es/collapse/context.d.ts +1 -1
  81. package/es/color-picker/color-picker.js +6 -0
  82. package/es/color-picker/panel.js +5 -3
  83. package/es/components.d.ts +1 -0
  84. package/es/copy/copy.vue_vue_type_script_setup_true_lang.js +11 -3
  85. package/es/date-picker/hooks/use-provide-datepicker-transform.js +1 -1
  86. package/es/date-picker/panels/body.vue_vue_type_script_setup_true_lang.js +14 -1
  87. package/es/date-picker/panels/header.vue_vue_type_script_setup_true_lang.js +1 -1
  88. package/es/date-picker/picker.vue_vue_type_script_setup_true_lang.js +4 -3
  89. package/es/date-picker/range-picker.vue_vue_type_script_setup_true_lang.js +2 -2
  90. package/es/date-picker/style/index.css +5 -5
  91. package/es/date-picker/style/index.scss +4 -3
  92. package/es/drawer/drawer.vue.d.ts +1 -1
  93. package/es/drawer/drawer.vue_vue_type_script_setup_true_lang.js +31 -9
  94. package/es/drawer/index.d.ts +3 -3
  95. package/es/dropdown/dropdown-button.vue_vue_type_script_setup_true_lang.js +1 -1
  96. package/es/dropdown/dropdown-option.vue_vue_type_script_setup_true_lang.js +5 -1
  97. package/es/dropdown/dropdown-panel.vue.d.ts +9 -0
  98. package/es/dropdown/dropdown-panel.vue_vue_type_script_setup_true_lang.js +76 -3
  99. package/es/dropdown/dropdown-submenu.vue_vue_type_script_setup_true_lang.js +6 -3
  100. package/es/dropdown/dropdown.vue_vue_type_script_setup_true_lang.js +4 -2
  101. package/es/dropdown/style/index.css +1 -1
  102. package/es/dropdown/style/index.scss +3 -1
  103. package/es/file-previewer/file-previewer.vue.d.ts +1 -1
  104. package/es/file-previewer/file-previewer.vue_vue_type_script_setup_true_lang.js +18 -10
  105. package/es/file-previewer/index.d.ts +3 -3
  106. package/es/form/context.d.ts +1 -0
  107. package/es/form/form-item.vue_vue_type_script_setup_true_lang.js +7 -3
  108. package/es/form/index.js +1 -1
  109. package/es/form/style/index.css +2 -2
  110. package/es/form/style/index.scss +2 -2
  111. package/es/grid/grid-col.vue_vue_type_script_setup_true_lang.js +1 -1
  112. package/es/grid/grid-item.vue_vue_type_script_setup_true_lang.js +1 -1
  113. package/es/grid/grid-row.vue_vue_type_script_setup_true_lang.js +1 -1
  114. package/es/grid/grid.vue_vue_type_script_setup_true_lang.js +1 -1
  115. package/es/image/image.vue_vue_type_script_setup_true_lang.js +1 -1
  116. package/es/image/preview-arrow.vue_vue_type_script_setup_true_lang.js +1 -1
  117. package/es/image/preview.vue.d.ts +1 -1
  118. package/es/image/preview.vue_vue_type_script_setup_true_lang.js +2 -2
  119. package/es/index.css +167 -114
  120. package/es/index.d.ts +2 -0
  121. package/es/index.js +55 -54
  122. package/es/index.scss +1 -0
  123. package/es/input/input.js +18 -2
  124. package/es/input/style/index.css +2 -2
  125. package/es/input/style/input.scss +4 -4
  126. package/es/input-number/input-number.js +9 -3
  127. package/es/input-number/style/index.css +3 -3
  128. package/es/input-number/style/index.scss +5 -1
  129. package/es/input-tag/index.d.ts +3 -0
  130. package/es/input-tag/input-tag.d.ts +2 -0
  131. package/es/input-tag/input-tag.js +34 -30
  132. package/es/input-tag/style/index.css +8 -8
  133. package/es/input-tag/style/index.scss +11 -5
  134. package/es/json-form/style/index.css +0 -3
  135. package/es/json-form/style/index.scss +4 -3
  136. package/es/json-form/utils.js +4 -4
  137. package/es/layout/sider.vue_vue_type_script_setup_true_lang.js +34 -7
  138. package/es/layout/style/index.css +2 -2
  139. package/es/layout/style/index.scss +4 -2
  140. package/es/link/link.vue_vue_type_script_setup_true_lang.js +1 -1
  141. package/es/link/style/index.css +1 -1
  142. package/es/link/style/index.scss +3 -1
  143. package/es/list/list.js +1 -1
  144. package/es/locale/interface.d.ts +39 -0
  145. package/es/locale/lang/ar-eg.js +38 -0
  146. package/es/locale/lang/de-de.js +38 -0
  147. package/es/locale/lang/en-us.js +38 -0
  148. package/es/locale/lang/es-es.js +38 -0
  149. package/es/locale/lang/fr-fr.js +38 -0
  150. package/es/locale/lang/id-id.js +38 -0
  151. package/es/locale/lang/it-it.js +38 -0
  152. package/es/locale/lang/ja-jp.js +38 -0
  153. package/es/locale/lang/km-kh.js +38 -0
  154. package/es/locale/lang/ko-kr.js +38 -0
  155. package/es/locale/lang/ms-my.js +38 -0
  156. package/es/locale/lang/nl-nl.js +38 -0
  157. package/es/locale/lang/pt-pt.js +38 -0
  158. package/es/locale/lang/ru-ru.js +38 -0
  159. package/es/locale/lang/th-th.js +38 -0
  160. package/es/locale/lang/vi-vn.js +38 -0
  161. package/es/locale/lang/zh-cn.js +38 -0
  162. package/es/locale/lang/zh-tw.js +38 -0
  163. package/es/mention/mention.js +8 -0
  164. package/es/menu/base-menu.vue_vue_type_script_setup_true_lang.js +29 -3
  165. package/es/menu/item.d.ts +1 -1
  166. package/es/menu/item.js +14 -1
  167. package/es/menu/style/index.css +6 -6
  168. package/es/menu/style/index.scss +5 -3
  169. package/es/message/style/index.css +3 -3
  170. package/es/message/style/index.scss +5 -3
  171. package/es/modal/index.d.ts +3 -3
  172. package/es/modal/modal.vue.d.ts +1 -1
  173. package/es/modal/modal.vue_vue_type_script_setup_true_lang.js +31 -15
  174. package/es/modal/style/index.css +2 -2
  175. package/es/modal/style/index.scss +3 -2
  176. package/es/notification/style/index.css +3 -3
  177. package/es/notification/style/index.scss +11 -3
  178. package/es/overflow-list/overflow-list.js +1 -1
  179. package/es/page-header/page-header.vue.d.ts +6 -6
  180. package/es/page-header/page-header.vue_vue_type_script_setup_true_lang.js +19 -2
  181. package/es/pagination/page-item-ellipsis.vue_vue_type_script_setup_true_lang.js +15 -2
  182. package/es/pagination/page-item-step.vue.d.ts +2 -2
  183. package/es/pagination/page-item-step.vue_vue_type_script_setup_true_lang.js +23 -4
  184. package/es/pagination/page-item.vue.d.ts +2 -2
  185. package/es/pagination/page-item.vue_vue_type_script_setup_true_lang.js +21 -3
  186. package/es/pagination/pagination.js +5 -1
  187. package/es/pagination/style/index.css +6 -1
  188. package/es/pagination/style/index.scss +9 -3
  189. package/es/popconfirm/popconfirm.vue_vue_type_script_setup_true_lang.js +3 -1
  190. package/es/popover/popover.vue_vue_type_script_setup_true_lang.js +2 -0
  191. package/es/progress/style/index.css +2 -2
  192. package/es/progress/style/index.scss +5 -3
  193. package/es/qr-code/qr-code-status.vue_vue_type_script_setup_true_lang.js +5 -1
  194. package/es/qr-code/qr-code.vue_vue_type_script_setup_true_lang.js +13 -6
  195. package/es/radio/context.d.ts +1 -0
  196. package/es/radio/radio-group.js +6 -2
  197. package/es/radio/radio.js +1 -0
  198. package/es/radio/style/index.css +2 -2
  199. package/es/radio/style/index.scss +4 -2
  200. package/es/rate/rate.js +27 -1
  201. package/es/resize-box/resize-box.vue.d.ts +4 -4
  202. package/es/resize-box/resize-box.vue_vue_type_script_setup_true_lang.js +30 -1
  203. package/es/result/result.vue_vue_type_script_setup_true_lang.js +7 -4
  204. package/es/sd-vue.js +54 -52
  205. package/es/secret/secret.vue_vue_type_script_setup_true_lang.js +3 -1
  206. package/es/select/index.d.ts +124 -0
  207. package/es/select/select-dropdown.vue_vue_type_script_setup_true_lang.js +4 -1
  208. package/es/select/select.d.ts +62 -0
  209. package/es/select/select.js +20 -4
  210. package/es/select/style/index.css +1 -1
  211. package/es/select/style/index.scss +3 -1
  212. package/es/selectable-card/style/index.css +2 -2
  213. package/es/selectable-card/style/index.scss +5 -5
  214. package/es/skeleton/skeleton.vue_vue_type_script_setup_true_lang.js +5 -1
  215. package/es/slider/slider-button.vue.d.ts +2 -0
  216. package/es/slider/slider-button.vue_vue_type_script_setup_true_lang.js +7 -2
  217. package/es/slider/slider.vue_vue_type_script_setup_true_lang.js +23 -2
  218. package/es/slider/style/index.css +1 -1
  219. package/es/slider/style/index.scss +3 -1
  220. package/es/spin/spin.js +7 -2
  221. package/es/spin/style/index.css +1 -1
  222. package/es/spin/style/index.scss +1 -1
  223. package/es/split/split.vue.d.ts +4 -4
  224. package/es/split/split.vue_vue_type_script_setup_true_lang.js +27 -3
  225. package/es/statistic/statistic.vue_vue_type_script_setup_true_lang.js +1 -1
  226. package/es/steps/context.d.ts +1 -0
  227. package/es/steps/step.vue_vue_type_script_setup_true_lang.js +15 -2
  228. package/es/steps/steps.vue_vue_type_script_setup_true_lang.js +10 -2
  229. package/es/steps/style/index.css +1 -1
  230. package/es/steps/style/index.scss +1 -1
  231. package/es/style/animation/index.scss +1 -0
  232. package/es/style/animation/reduced-motion.scss +22 -0
  233. package/es/style/animation/zoom.scss +7 -6
  234. package/es/style/icon.scss +9 -1
  235. package/es/switch/style/index.css +1 -1
  236. package/es/switch/style/index.scss +4 -1
  237. package/es/switch/switch.vue_vue_type_script_setup_true_lang.js +6 -1
  238. package/es/table/index.d.ts +4 -4
  239. package/es/table/style/index.css +8 -8
  240. package/es/table/style/index.scss +11 -8
  241. package/es/table/table-operation-td.d.ts +15 -0
  242. package/es/table/table-operation-td.js +3 -3
  243. package/es/table/table-operation-th.js +1 -1
  244. package/es/table/table-tbody.js +4 -1
  245. package/es/table/table-td.js +2 -1
  246. package/es/table/table-th.d.ts +1 -1
  247. package/es/table/table-th.js +7 -5
  248. package/es/table/table-thead.js +4 -1
  249. package/es/table/table-tr.js +4 -1
  250. package/es/table/table.d.ts +1 -1
  251. package/es/table/table.js +8 -4
  252. package/es/tabs/context.d.ts +1 -0
  253. package/es/tabs/style/index.css +5 -5
  254. package/es/tabs/style/index.scss +7 -7
  255. package/es/tabs/tab-pane.vue_vue_type_script_setup_true_lang.js +21 -2
  256. package/es/tabs/tabs-button.js +1 -1
  257. package/es/tabs/tabs-nav.js +34 -1
  258. package/es/tabs/tabs-tab.vue_vue_type_script_setup_true_lang.js +27 -4
  259. package/es/tabs/tabs.js +4 -2
  260. package/es/tag/index.d.ts +5 -5
  261. package/es/tag/style/index.css +1 -1
  262. package/es/tag/style/index.scss +3 -1
  263. package/es/tag/tag.vue.d.ts +2 -2
  264. package/es/tag/tag.vue_vue_type_script_setup_true_lang.js +27 -4
  265. package/es/tag-group/tag-group.vue_vue_type_script_setup_true_lang.js +2 -2
  266. package/es/textarea/style/index.css +2 -2
  267. package/es/textarea/textarea.vue_vue_type_script_setup_true_lang.js +18 -3
  268. package/es/time-picker/time-column.vue_vue_type_script_setup_true_lang.js +11 -3
  269. package/es/time-picker/time-picker.vue_vue_type_script_setup_true_lang.js +6 -3
  270. package/es/toolbar/index.d.ts +3 -3
  271. package/es/toolbar/toolbar.vue.d.ts +2 -2
  272. package/es/toolbar/toolbar.vue_vue_type_script_setup_true_lang.js +5 -5
  273. package/es/tooltip/tooltip.vue_vue_type_script_setup_true_lang.js +1 -0
  274. package/es/transfer/style/index.css +1 -1
  275. package/es/transfer/style/index.scss +1 -1
  276. package/es/transfer/transfer-list-item.js +18 -2
  277. package/es/transfer/transfer.vue_vue_type_script_setup_true_lang.js +7 -5
  278. package/es/tree/base-node.vue_vue_type_script_setup_true_lang.js +28 -8
  279. package/es/tree/context.d.ts +2 -0
  280. package/es/tree/node-switcher.vue_vue_type_script_lang.js +1 -1
  281. package/es/tree/style/index.css +1 -1
  282. package/es/tree/style/index.scss +1 -1
  283. package/es/tree/tree.vue_vue_type_script_setup_true_lang.js +81 -2
  284. package/es/tree-select/tree-select.vue_vue_type_script_setup_true_lang.js +10 -1
  285. package/es/trigger/index.d.ts +45 -0
  286. package/es/trigger/trigger.d.ts +27 -0
  287. package/es/trigger/trigger.js +47 -5
  288. package/es/typography/edit-content.vue_vue_type_script_setup_true_lang.js +17 -8
  289. package/es/typography/operations.vue_vue_type_script_setup_true_lang.js +38 -6
  290. package/es/typography/style/index.css +2 -2
  291. package/es/typography/style/index.scss +2 -2
  292. package/es/upload/style/index.css +9 -9
  293. package/es/upload/style/index.scss +15 -9
  294. package/es/upload/upload-list-item.js +18 -5
  295. package/es/upload/upload-picture-item.js +27 -3
  296. package/es/verification-code/verification-code.js +8 -1
  297. package/json/vetur-attributes.json +15 -0
  298. package/json/vetur-tags.json +9 -2
  299. package/json/web-types.json +39 -1
  300. 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);
@@ -1,9 +1,11 @@
1
1
  import { _objectSpread2 } from "../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/objectSpread2.js";
2
2
  import resize_observer_default from "./resize-observer.js";
3
+ import { useI18n } from "../locale/index.js";
3
4
  import IconDragDotVertical from "../icon/icon-drag-dot-vertical/index.js";
4
5
  import IconDragDot from "../icon/icon-drag-dot/index.js";
5
6
  import { computed, createBlock, createElementVNode, defineComponent, normalizeClass, openBlock, renderSlot, toRefs, unref, withCtx } from "vue";
6
7
  //#region components/_components/resize-trigger.vue?vue&type=script&setup=true&lang.tsx
8
+ var _hoisted_1 = ["aria-orientation", "aria-label"];
7
9
  var resize_trigger_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, { name: "ResizeTrigger" }), {}, {
8
10
  __name: "resize-trigger",
9
11
  props: {
@@ -19,7 +21,9 @@ var resize_trigger_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
19
21
  emits: ["resize"],
20
22
  setup(__props, { emit: __emit }) {
21
23
  const emit = __emit;
22
- const { direction, prefixCls } = toRefs(__props);
24
+ const props = __props;
25
+ const { t } = useI18n();
26
+ const { direction, prefixCls } = toRefs(props);
23
27
  const isHorizontal = computed(() => (direction === null || direction === void 0 ? void 0 : direction.value) === "horizontal");
24
28
  const classNames = computed(() => [prefixCls.value, {
25
29
  [`${prefixCls.value}-horizontal`]: isHorizontal.value,
@@ -30,13 +34,19 @@ var resize_trigger_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
30
34
  };
31
35
  return (_ctx, _cache) => {
32
36
  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), {
37
+ default: withCtx(() => [createElementVNode("div", {
38
+ class: normalizeClass(classNames.value),
39
+ role: "separator",
40
+ tabindex: "0",
41
+ "aria-orientation": unref(direction),
42
+ "aria-label": unref(t)("a11y.resize")
43
+ }, [renderSlot(_ctx.$slots, "default", {}, () => [createElementVNode("div", { class: normalizeClass(`${unref(prefixCls)}-icon-wrapper`) }, [renderSlot(_ctx.$slots, "icon", {}, () => [isHorizontal.value ? (openBlock(), createBlock(unref(IconDragDot), {
34
44
  key: 0,
35
45
  class: normalizeClass(`${unref(prefixCls)}-icon`)
36
46
  }, null, 8, ["class"])) : (openBlock(), createBlock(unref(IconDragDotVertical), {
37
47
  key: 1,
38
48
  class: normalizeClass(`${unref(prefixCls)}-icon`)
39
- }, null, 8, ["class"]))])], 2)])], 2)]),
49
+ }, null, 8, ["class"]))])], 2)])], 10, _hoisted_1)]),
40
50
  _: 3
41
51
  });
42
52
  };
@@ -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;
@@ -3,6 +3,7 @@ import { getPrefixCls } from "../../_utils/global-config.js";
3
3
  import { isArray } from "../../_utils/is.js";
4
4
  import icon_hover_default from "../icon-hover.js";
5
5
  import IconClose from "../../icon/icon-close/index.js";
6
+ import { useI18n } from "../../locale/index.js";
6
7
  import IconLoading from "../../icon/icon-loading/index.js";
7
8
  import feedback_icon_default from "../feedback-icon.js";
8
9
  import { useSize } from "../../_hooks/use-size.js";
@@ -73,7 +74,8 @@ var select_view_default = /* @__PURE__ */ defineComponent({
73
74
  retainInputValue: {
74
75
  type: Boolean,
75
76
  default: false
76
- }
77
+ },
78
+ inputAttrs: Object
77
79
  },
78
80
  emits: [
79
81
  "remove",
@@ -82,6 +84,7 @@ var select_view_default = /* @__PURE__ */ defineComponent({
82
84
  "blur"
83
85
  ],
84
86
  setup(props, { emit, slots }) {
87
+ const { t } = useI18n();
85
88
  const { size, disabled, error } = toRefs(props);
86
89
  const prefixCls = getPrefixCls("select-view");
87
90
  const { feedback, eventHandlers, mergedDisabled, mergedSize: _mergedSize, mergedError } = useFormItem({
@@ -132,6 +135,7 @@ var select_view_default = /* @__PURE__ */ defineComponent({
132
135
  showClearBtn.value && createVNode("button", {
133
136
  "type": "button",
134
137
  "class": `${prefixCls}-clear-btn`,
138
+ "aria-label": t("a11y.clear"),
135
139
  "onClick": handleClear,
136
140
  "onMousedown": (ev) => ev.stopPropagation()
137
141
  }, [createVNode(icon_hover_default, null, { default: () => [createVNode(IconClose, null, null)] })]),
@@ -165,6 +169,7 @@ var select_view_default = /* @__PURE__ */ defineComponent({
165
169
  "tagNowrap": props.tagNowrap,
166
170
  "retainInputValue": true,
167
171
  "uninjectFormItemContext": true,
172
+ "inputAttrs": props.inputAttrs,
168
173
  "onRemove": handleRemove,
169
174
  "onFocus": handleFocus,
170
175
  "onBlur": handleBlur
@@ -187,6 +192,7 @@ var select_view_default = /* @__PURE__ */ defineComponent({
187
192
  "error": mergedError.value,
188
193
  "enabledInput": enabledInput.value,
189
194
  "uninjectFormItemContext": true,
195
+ "inputAttrs": props.inputAttrs,
190
196
  "onFocus": handleFocus,
191
197
  "onBlur": handleBlur
192
198
  }, {
@@ -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,13 +1,16 @@
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";
7
8
  import IconExclamationCircleFill from "../icon/icon-exclamation-circle-fill/index.js";
8
9
  import IconInfoCircleFill from "../icon/icon-info-circle-fill/index.js";
10
+ import { useI18n } from "../locale/index.js";
9
11
  import { Transition, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, normalizeClass, openBlock, ref, renderSlot, toDisplayString, unref, useSlots, withCtx } from "vue";
10
12
  //#region components/alert/alert.vue?vue&type=script&setup=true&lang.ts
13
+ var _hoisted_1 = ["aria-label"];
11
14
  var alert_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, { name: "Alert" }), {}, {
12
15
  __name: "alert",
13
16
  props: {
@@ -84,12 +87,19 @@ var alert_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
84
87
  * @version 2.36.0
85
88
  */
86
89
  const slots = useSlots();
90
+ const { t } = useI18n();
87
91
  const prefixCls = getPrefixCls("alert");
88
92
  const visible = ref(true);
89
93
  const handleClose = (ev) => {
90
94
  visible.value = false;
91
95
  emit("close", ev);
92
96
  };
97
+ const onCloseKeydown = (ev) => {
98
+ if (isActivationKey(ev)) {
99
+ ev.preventDefault();
100
+ handleClose(ev);
101
+ }
102
+ };
93
103
  const handleAfterLeave = () => {
94
104
  emit("afterClose");
95
105
  };
@@ -114,6 +124,7 @@ var alert_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
114
124
  }, [
115
125
  __props.showIcon && !(__props.type === "normal" && !_ctx.$slots.icon) ? (openBlock(), createElementBlock("div", {
116
126
  key: 0,
127
+ "aria-hidden": "true",
117
128
  class: normalizeClass(`${unref(prefixCls)}-icon`)
118
129
  }, [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
130
  createElementVNode("div", { class: normalizeClass(`${unref(prefixCls)}-body`) }, [__props.title || _ctx.$slots.title ? (openBlock(), createElementBlock("div", {
@@ -126,15 +137,16 @@ var alert_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
126
137
  }, [renderSlot(_ctx.$slots, "action")], 2)) : createCommentVNode("", true),
127
138
  __props.closable ? (openBlock(), createElementBlock("div", {
128
139
  key: 2,
129
- tabindex: "-1",
140
+ tabindex: "0",
130
141
  role: "button",
131
- "aria-label": "Close",
142
+ "aria-label": unref(t)("a11y.close"),
132
143
  class: normalizeClass(`${unref(prefixCls)}-close-btn`),
133
- onClick: handleClose
144
+ onClick: handleClose,
145
+ onKeydown: onCloseKeydown
134
146
  }, [renderSlot(_ctx.$slots, "close-element", {}, () => [createVNode(icon_hover_default, null, {
135
147
  default: withCtx(() => [createVNode(unref(IconClose))]),
136
148
  _: 1
137
- })])], 2)) : createCommentVNode("", true)
149
+ })])], 42, _hoisted_1)) : createCommentVNode("", true)
138
150
  ], 2)) : createCommentVNode("", true)]),
139
151
  _: 3
140
152
  });
@@ -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,