@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
@@ -50,7 +50,7 @@
50
50
  border: 1px solid var(--sd-color-neutral-3);
51
51
  border-radius: var(--sd-border-radius-small);
52
52
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
53
- transition: all 0.1s cubic-bezier(0, 0, 1, 1);
53
+ 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);
54
54
  pointer-events: auto;
55
55
  }
56
56
  .sd-message-icon {
@@ -59,7 +59,7 @@
59
59
  color: var(--sd-color-text-1);
60
60
  font-size: 20px;
61
61
  vertical-align: middle;
62
- animation: sd-msg-fade 0.1s cubic-bezier(0, 0, 1, 1), sd-msg-fade 0.4s cubic-bezier(0.3, 1.3, 0.3, 1);
62
+ animation: sd-msg-fade 0.1s cubic-bezier(0.34, 0.69, 0.1, 1), sd-msg-fade 0.4s cubic-bezier(0.3, 1.3, 0.3, 1);
63
63
  }
64
64
  .sd-message-content {
65
65
  color: var(--sd-color-text-1);
@@ -138,7 +138,7 @@
138
138
 
139
139
  .fade-message-enter-active,
140
140
  .fade-message-appear-active {
141
- transition: opacity 0.1s cubic-bezier(0, 0, 1, 1);
141
+ transition: opacity 0.1s cubic-bezier(0.34, 0.69, 0.1, 1);
142
142
  }
143
143
 
144
144
  .fade-message-leave-from {
@@ -44,7 +44,9 @@ $message-prefix-cls: string.unquote('#{theme.$prefix}-message');
44
44
  border: $message-border-width $message-border-style $message-normal-color-border;
45
45
  border-radius: $message-border-radius;
46
46
  box-shadow: global.$shadow2-down;
47
- transition: all theme.$transition-duration-1 theme.$transition-timing-function-linear;
47
+ transition:
48
+ background-color theme.$transition-duration-1 theme.$transition-timing-function-standard,
49
+ border-color theme.$transition-duration-1 theme.$transition-timing-function-standard;
48
50
  pointer-events: auto;
49
51
 
50
52
  &-icon {
@@ -55,7 +57,7 @@ $message-prefix-cls: string.unquote('#{theme.$prefix}-message');
55
57
  vertical-align: middle;
56
58
  animation:
57
59
  #{theme.$prefix}-msg-fade theme.$transition-duration-1
58
- theme.$transition-timing-function-linear,
60
+ theme.$transition-timing-function-standard,
59
61
  #{theme.$prefix}-msg-fade theme.$transition-duration-4
60
62
  theme.$transition-timing-function-overshoot;
61
63
  }
@@ -156,7 +158,7 @@ $message-prefix-cls: string.unquote('#{theme.$prefix}-message');
156
158
 
157
159
  .fade-message-enter-active,
158
160
  .fade-message-appear-active {
159
- transition: opacity theme.$transition-duration-1 theme.$transition-timing-function-linear;
161
+ transition: opacity theme.$transition-duration-1 theme.$transition-timing-function-standard;
160
162
  }
161
163
 
162
164
  .fade-message-leave-from {
@@ -148,6 +148,7 @@ declare const Modal: {
148
148
  visible: boolean;
149
149
  unmountOnClose: boolean;
150
150
  renderToBody: boolean;
151
+ escToClose: boolean;
151
152
  defaultVisible: boolean;
152
153
  closable: boolean;
153
154
  simple: boolean;
@@ -155,7 +156,6 @@ declare const Modal: {
155
156
  titleEllipsisTooltip: boolean | import("../index.ts").EllipsisTooltipProps;
156
157
  maskClosable: boolean;
157
158
  okLoading: boolean;
158
- escToClose: boolean;
159
159
  hideCancel: boolean;
160
160
  alignCenter: boolean;
161
161
  titleAlign: "center" | "start";
@@ -308,6 +308,7 @@ declare const Modal: {
308
308
  visible: boolean;
309
309
  unmountOnClose: boolean;
310
310
  renderToBody: boolean;
311
+ escToClose: boolean;
311
312
  defaultVisible: boolean;
312
313
  closable: boolean;
313
314
  simple: boolean;
@@ -315,7 +316,6 @@ declare const Modal: {
315
316
  titleEllipsisTooltip: boolean | import("../index.ts").EllipsisTooltipProps;
316
317
  maskClosable: boolean;
317
318
  okLoading: boolean;
318
- escToClose: boolean;
319
319
  hideCancel: boolean;
320
320
  alignCenter: boolean;
321
321
  titleAlign: "center" | "start";
@@ -473,6 +473,7 @@ declare const Modal: {
473
473
  visible: boolean;
474
474
  unmountOnClose: boolean;
475
475
  renderToBody: boolean;
476
+ escToClose: boolean;
476
477
  defaultVisible: boolean;
477
478
  closable: boolean;
478
479
  simple: boolean;
@@ -480,7 +481,6 @@ declare const Modal: {
480
481
  titleEllipsisTooltip: boolean | import("../index.ts").EllipsisTooltipProps;
481
482
  maskClosable: boolean;
482
483
  okLoading: boolean;
483
- escToClose: boolean;
484
484
  hideCancel: boolean;
485
485
  alignCenter: boolean;
486
486
  titleAlign: "center" | "start";
@@ -279,6 +279,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
279
279
  visible: boolean;
280
280
  unmountOnClose: boolean;
281
281
  renderToBody: boolean;
282
+ escToClose: boolean;
282
283
  defaultVisible: boolean;
283
284
  closable: boolean;
284
285
  simple: boolean;
@@ -286,7 +287,6 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
286
287
  titleEllipsisTooltip: boolean | EllipsisTooltipProps;
287
288
  maskClosable: boolean;
288
289
  okLoading: boolean;
289
- escToClose: boolean;
290
290
  hideCancel: boolean;
291
291
  alignCenter: boolean;
292
292
  titleAlign: "center" | "start";
@@ -1,26 +1,29 @@
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 { isBoolean, isFunction, isNumber, isPromise } from "../_utils/is.js";
4
- import { contains, getElement, off, on } from "../_utils/dom.js";
4
+ import { getElement, 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 IconCheckCircleFill from "../icon/icon-check-circle-fill/index.js";
7
8
  import IconClose from "../icon/icon-close/index.js";
8
9
  import IconCloseCircleFill from "../icon/icon-close-circle-fill/index.js";
9
10
  import IconExclamationCircleFill from "../icon/icon-exclamation-circle-fill/index.js";
10
11
  import IconInfoCircleFill from "../icon/icon-info-circle-fill/index.js";
11
- import { _asyncToGenerator } from "../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/asyncToGenerator.js";
12
12
  import { useI18n } from "../locale/index.js";
13
+ import { _asyncToGenerator } from "../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/asyncToGenerator.js";
13
14
  import client_only_default from "../_components/client-only.js";
14
15
  import usePopupManager from "../_hooks/use-popup-manager.js";
15
16
  import { useTeleportContainer } from "../_hooks/use-teleport-container.js";
16
17
  import Button from "../button/index.js";
17
- import { KEYBOARD_KEY } from "../_utils/keyboard.js";
18
18
  import Ellipsis from "../ellipsis/index.js";
19
19
  import { useConfigProviderProp } from "../_hooks/use-config-provider-prop.js";
20
+ import { getFocusableElements, useFocusTrap } from "../_hooks/use-focus-trap.js";
20
21
  import { useOverflow } from "../_hooks/use-overflow.js";
21
22
  import { useDraggable } from "./hooks/use-draggable.js";
22
- 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, withModifiers } from "vue";
23
+ 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, withModifiers } from "vue";
23
24
  //#region components/modal/modal.vue?vue&type=script&setup=true&lang.tsx
25
+ var _hoisted_1 = ["aria-labelledby"];
26
+ var _hoisted_2 = ["aria-label"];
24
27
  var modal_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, {
25
28
  name: "Modal",
26
29
  inheritAttrs: false
@@ -319,8 +322,13 @@ var modal_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
319
322
  const { fullscreen, popupContainer, alignCenter, mask, maskClosable, maskStyle, closable, titleAlign, top, footer, hideCancel, escToClose, draggable, okText, cancelText, okButtonProps, cancelButtonProps, titleEllipsisTooltip, width } = toRefs(props);
320
323
  const prefixCls = getPrefixCls("modal");
321
324
  const { t } = useI18n();
325
+ const slots = useSlots();
322
326
  const wrapperRef = ref();
323
327
  const modalRef = ref();
328
+ const titleId = `sd-modal-title-${getCurrentInstance().uid}`;
329
+ const bodyId = `sd-modal-body-${getCurrentInstance().uid}`;
330
+ const hasTitle = computed(() => !props.hideTitle && (Boolean(props.title) || Boolean(slots.title)));
331
+ const { activate: activateFocusTrap, deactivate: deactivateFocusTrap } = useFocusTrap(modalRef, { initialFocus: (c) => getFocusableElements(c).find((el) => !el.closest(".sd-modal-close-btn")) });
324
332
  const { mergedValue: mergedMask } = useConfigProviderProp(mask, {
325
333
  propNames: ["mask"],
326
334
  getGlobalValue: (configProviderCtx) => {
@@ -537,10 +545,7 @@ var modal_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
537
545
  if (mergedMask.value && mergedMaskClosable.value && currentIsMask.value) handleCancel(e);
538
546
  };
539
547
  const handleOpen = () => {
540
- if (computedVisible.value) {
541
- if (!contains(wrapperRef.value, document.activeElement) && document.activeElement instanceof HTMLElement) document.activeElement.blur();
542
- emit("open");
543
- }
548
+ if (computedVisible.value) emit("open");
544
549
  };
545
550
  const handleClose = () => {
546
551
  if (!computedVisible.value) {
@@ -556,6 +561,7 @@ var modal_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
556
561
  if (computedVisible.value) {
557
562
  setOverflowHidden();
558
563
  if (mergedEscToClose.value) addGlobalKeyDownListener();
564
+ nextTick(() => activateFocusTrap());
559
565
  }
560
566
  });
561
567
  onBeforeUnmount(() => {
@@ -570,9 +576,11 @@ var modal_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
570
576
  currentIsMask.value = false;
571
577
  setOverflowHidden();
572
578
  addGlobalKeyDownListener();
579
+ nextTick(() => activateFocusTrap());
573
580
  } else {
574
581
  emit("beforeClose");
575
582
  removeGlobalKeyDownListener();
583
+ deactivateFocusTrap();
576
584
  }
577
585
  });
578
586
  watch(fullscreen, () => {
@@ -635,14 +643,20 @@ var modal_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
635
643
  ref_key: "modalRef",
636
644
  ref: modalRef,
637
645
  class: normalizeClass(modalCls.value),
638
- style: normalizeStyle(mergedModalStyle.value)
646
+ style: normalizeStyle(mergedModalStyle.value),
647
+ role: "dialog",
648
+ "aria-modal": "true",
649
+ "aria-labelledby": hasTitle.value ? titleId : void 0,
650
+ "aria-describedby": bodyId,
651
+ tabindex: "-1"
639
652
  }, [
640
653
  !__props.hideTitle && (_ctx.$slots.title || __props.title || unref(mergedClosable)) ? (openBlock(), createElementBlock("div", {
641
654
  key: 0,
642
655
  class: normalizeClass(headerCls.value),
643
- onMousedown: _cache[0] || (_cache[0] = (...args) => unref(handleMoveDown) && unref(handleMoveDown)(...args))
656
+ onMousedown: _cache[1] || (_cache[1] = (...args) => unref(handleMoveDown) && unref(handleMoveDown)(...args))
644
657
  }, [_ctx.$slots.title || __props.title ? (openBlock(), createElementBlock("div", {
645
658
  key: 0,
659
+ id: titleId,
646
660
  class: normalizeClass([
647
661
  `${unref(prefixCls)}-title`,
648
662
  `${unref(prefixCls)}-title-align-${unref(mergedTitleAlign)}`,
@@ -664,16 +678,18 @@ var modal_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
664
678
  _: 3
665
679
  }, 8, ["class", "tooltip"])], 2)) : createCommentVNode("", true), !__props.simple && unref(mergedClosable) ? (openBlock(), createElementBlock("div", {
666
680
  key: 1,
667
- tabindex: "-1",
681
+ tabindex: "0",
668
682
  role: "button",
669
- "aria-label": "Close",
683
+ "aria-label": unref(t)("a11y.close"),
670
684
  class: normalizeClass(`${unref(prefixCls)}-close-btn`),
671
- onClick: handleCancel
685
+ onClick: handleCancel,
686
+ onKeydown: _cache[0] || (_cache[0] = ($event) => unref(onActivate)(handleCancel))
672
687
  }, [createVNode(icon_hover_default, null, {
673
688
  default: withCtx(() => [createVNode(unref(IconClose))]),
674
689
  _: 1
675
- })], 2)) : createCommentVNode("", true)], 34)) : createCommentVNode("", true),
690
+ })], 42, _hoisted_2)) : createCommentVNode("", true)], 34)) : createCommentVNode("", true),
676
691
  createElementVNode("div", {
692
+ id: bodyId,
677
693
  class: normalizeClass([`${unref(prefixCls)}-body`, __props.bodyClass]),
678
694
  style: normalizeStyle(__props.bodyStyle)
679
695
  }, [renderSlot(_ctx.$slots, "default")], 6),
@@ -690,7 +706,7 @@ var modal_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComp
690
706
  default: withCtx(() => [createTextVNode(toDisplayString(okDisplayText.value), 1)]),
691
707
  _: 1
692
708
  }, 16, ["loading"])])], 2)) : createCommentVNode("", true)
693
- ], 6), [[vShow, computedVisible.value]])]),
709
+ ], 14, _hoisted_1), [[vShow, computedVisible.value]])]),
694
710
  _: 3
695
711
  }, 8, ["name"])], 34)], 16)), [[vShow, computedVisible.value || mounted.value]]) : createCommentVNode("", true)], 8, ["to", "disabled"]))]),
696
712
  _: 3
@@ -198,7 +198,7 @@
198
198
 
199
199
  .zoom-modal-enter-from,
200
200
  .zoom-modal-appear-from {
201
- transform: scale(0.5, 0.5);
201
+ transform: scale(0.94, 0.94);
202
202
  opacity: 0;
203
203
  }
204
204
 
@@ -219,7 +219,7 @@
219
219
  }
220
220
 
221
221
  .zoom-modal-leave-to {
222
- transform: scale(0.5, 0.5);
222
+ transform: scale(0.94, 0.94);
223
223
  opacity: 0;
224
224
  }
225
225
 
@@ -238,7 +238,8 @@ $modal-prefix-cls: string.unquote('#{theme.$prefix}-modal');
238
238
 
239
239
  .zoom-modal-enter-from,
240
240
  .zoom-modal-appear-from {
241
- transform: scale(0.5, 0.5);
241
+ // scale(0.94) 起步而非 scale(0.5):弹窗只需轻微放大,过大的缩放显得突兀
242
+ transform: scale(0.94, 0.94);
242
243
  opacity: 0;
243
244
  }
244
245
 
@@ -261,7 +262,7 @@ $modal-prefix-cls: string.unquote('#{theme.$prefix}-modal');
261
262
  }
262
263
 
263
264
  .zoom-modal-leave-to {
264
- transform: scale(0.5, 0.5);
265
+ transform: scale(0.94, 0.94);
265
266
  opacity: 0;
266
267
  }
267
268
 
@@ -56,7 +56,7 @@
56
56
  border-radius: var(--sd-border-radius-medium);
57
57
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
58
58
  opacity: 1;
59
- transition: opacity 0.2s cubic-bezier(0, 0, 1, 1);
59
+ transition: opacity 0.2s cubic-bezier(0.34, 0.69, 0.1, 1);
60
60
  }
61
61
  .sd-notification:not(:last-child) {
62
62
  margin-bottom: 20px;
@@ -186,7 +186,7 @@
186
186
  }
187
187
 
188
188
  .slide-left-notification-leave-active {
189
- transition: all 0.3s cubic-bezier(0.34, 0.69, 0.1, 1);
189
+ transition: height 0.3s cubic-bezier(0.34, 0.69, 0.1, 1), margin 0.3s cubic-bezier(0.34, 0.69, 0.1, 1), padding 0.3s cubic-bezier(0.34, 0.69, 0.1, 1), opacity 0.3s cubic-bezier(0.34, 0.69, 0.1, 1);
190
190
  }
191
191
 
192
192
  .slide-right-notification-enter-from,
@@ -218,5 +218,5 @@
218
218
  }
219
219
 
220
220
  .slide-right-notification-leave-active {
221
- transition: all 0.3s cubic-bezier(0.34, 0.69, 0.1, 1);
221
+ transition: height 0.3s cubic-bezier(0.34, 0.69, 0.1, 1), margin 0.3s cubic-bezier(0.34, 0.69, 0.1, 1), padding 0.3s cubic-bezier(0.34, 0.69, 0.1, 1), opacity 0.3s cubic-bezier(0.34, 0.69, 0.1, 1);
222
222
  }
@@ -55,7 +55,7 @@ $notification-prefix-cls: string.unquote('#{theme.$prefix}-notification');
55
55
  border-radius: $notification-border-radius;
56
56
  box-shadow: 0 4px 12px rgb(0 0 0 / 15%);
57
57
  opacity: 1;
58
- transition: opacity theme.$transition-duration-2 theme.$transition-timing-function-linear;
58
+ transition: opacity theme.$transition-duration-2 theme.$transition-timing-function-standard;
59
59
 
60
60
  &:not(:last-child) {
61
61
  margin-bottom: $notification-margin-bottom;
@@ -213,7 +213,11 @@ $notification-prefix-cls: string.unquote('#{theme.$prefix}-notification');
213
213
  }
214
214
 
215
215
  .slide-left-notification-leave-active {
216
- transition: all theme.$transition-duration-3 theme.$transition-timing-function-standard;
216
+ transition:
217
+ height theme.$transition-duration-3 theme.$transition-timing-function-standard,
218
+ margin theme.$transition-duration-3 theme.$transition-timing-function-standard,
219
+ padding theme.$transition-duration-3 theme.$transition-timing-function-standard,
220
+ opacity theme.$transition-duration-3 theme.$transition-timing-function-standard;
217
221
  }
218
222
 
219
223
  .slide-right-notification-enter-from,
@@ -245,5 +249,9 @@ $notification-prefix-cls: string.unquote('#{theme.$prefix}-notification');
245
249
  }
246
250
 
247
251
  .slide-right-notification-leave-active {
248
- transition: all theme.$transition-duration-3 theme.$transition-timing-function-standard;
252
+ transition:
253
+ height theme.$transition-duration-3 theme.$transition-timing-function-standard,
254
+ margin theme.$transition-duration-3 theme.$transition-timing-function-standard,
255
+ padding theme.$transition-duration-3 theme.$transition-timing-function-standard,
256
+ opacity theme.$transition-duration-3 theme.$transition-timing-function-standard;
249
257
  }
@@ -1,8 +1,8 @@
1
1
  import { getPrefixCls } from "../_utils/global-config.js";
2
2
  import { getAllElements } from "../_utils/vue-utils.js";
3
3
  import resize_observer_v2_default from "../_components/resize-observer-v2.js";
4
- import Tag from "../tag/index.js";
5
4
  import { getReverse } from "../_utils/array.js";
5
+ import Tag from "../tag/index.js";
6
6
  import { computed, createTextVNode, createVNode, defineComponent, mergeProps, onMounted, ref, watch } from "vue";
7
7
  //#region components/overflow-list/overflow-list.tsx
8
8
  var overflow_list_default = /* @__PURE__ */ defineComponent({
@@ -1,16 +1,16 @@
1
- declare var __VLS_1: {}, __VLS_11: {}, __VLS_18: {}, __VLS_20: {}, __VLS_22: {}, __VLS_24: {};
1
+ declare var __VLS_1: {}, __VLS_12: {}, __VLS_19: {}, __VLS_21: {}, __VLS_23: {}, __VLS_25: {};
2
2
  type __VLS_Slots = {} & {
3
3
  breadcrumb?: (props: typeof __VLS_1) => any;
4
4
  } & {
5
- 'back-icon'?: (props: typeof __VLS_11) => any;
5
+ 'back-icon'?: (props: typeof __VLS_12) => any;
6
6
  } & {
7
- title?: (props: typeof __VLS_18) => any;
7
+ title?: (props: typeof __VLS_19) => any;
8
8
  } & {
9
- subtitle?: (props: typeof __VLS_20) => any;
9
+ subtitle?: (props: typeof __VLS_21) => any;
10
10
  } & {
11
- extra?: (props: typeof __VLS_22) => any;
11
+ extra?: (props: typeof __VLS_23) => any;
12
12
  } & {
13
- default?: (props: typeof __VLS_24) => any;
13
+ default?: (props: typeof __VLS_25) => any;
14
14
  };
15
15
  declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
16
16
  title: StringConstructor;
@@ -1,6 +1,8 @@
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";
5
+ import { useI18n } from "../locale/index.js";
4
6
  import IconLeft from "../icon/icon-left/index.js";
5
7
  import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, normalizeClass, openBlock, renderSlot, toDisplayString, unref, useSlots, withCtx } from "vue";
6
8
  //#region components/page-header/page-header.vue?vue&type=script&setup=true&lang.ts
@@ -61,10 +63,17 @@ var page_header_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
61
63
  * @slot extra
62
64
  */
63
65
  const slots = useSlots();
66
+ const { t } = useI18n();
64
67
  const prefixCls = getPrefixCls("page-header");
65
68
  const handleBack = (e) => {
66
69
  emit("back", e);
67
70
  };
71
+ const handleBackKeydown = (ev) => {
72
+ if (isActivationKey(ev)) {
73
+ ev.preventDefault();
74
+ handleBack(ev);
75
+ }
76
+ };
68
77
  const cls = computed(() => [prefixCls, {
69
78
  [`${prefixCls}-with-breadcrumb`]: Boolean(slots.breadcrumb),
70
79
  [`${prefixCls}-with-content`]: Boolean(slots.default)
@@ -78,11 +87,19 @@ var page_header_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defi
78
87
  key: 0,
79
88
  class: normalizeClass(`${unref(prefixCls)}-back-btn`),
80
89
  prefix: unref(prefixCls),
81
- onClick: handleBack
90
+ role: "button",
91
+ tabindex: "0",
92
+ "aria-label": unref(t)("a11y.back"),
93
+ onClick: handleBack,
94
+ onKeydown: handleBackKeydown
82
95
  }, {
83
96
  default: withCtx(() => [renderSlot(_ctx.$slots, "back-icon", {}, () => [createVNode(unref(IconLeft))])]),
84
97
  _: 3
85
- }, 8, ["class", "prefix"])) : createCommentVNode("", true),
98
+ }, 8, [
99
+ "class",
100
+ "prefix",
101
+ "aria-label"
102
+ ])) : createCommentVNode("", true),
86
103
  createElementVNode("span", { class: normalizeClass(`${unref(prefixCls)}-title`) }, [renderSlot(_ctx.$slots, "title", {}, () => [createTextVNode(toDisplayString(__props.title), 1)])], 2),
87
104
  _ctx.$slots.subtitle || __props.subtitle ? (openBlock(), createElementBlock("span", {
88
105
  key: 1,
@@ -1,9 +1,12 @@
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
+ import { isActivationKey } from "../_utils/keyboard.js";
4
+ import { useI18n } from "../locale/index.js";
3
5
  import IconMore from "../icon/icon-more/index.js";
4
6
  import { getLegalPage } from "./utils.js";
5
7
  import { computed, createElementBlock, createVNode, defineComponent, normalizeClass, openBlock, renderSlot, unref } from "vue";
6
8
  //#region components/pagination/page-item-ellipsis.vue?vue&type=script&setup=true&lang.ts
9
+ var _hoisted_1 = ["aria-label"];
7
10
  var page_item_ellipsis_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, { name: "EllipsisPager" }), {}, {
8
11
  __name: "page-item-ellipsis",
9
12
  props: {
@@ -24,6 +27,7 @@ var page_item_ellipsis_vue_vue_type_script_setup_true_lang_default = /*@__PURE__
24
27
  setup(__props, { emit: __emit }) {
25
28
  const props = __props;
26
29
  const emit = __emit;
30
+ const { t } = useI18n();
27
31
  const prefixCls = getPrefixCls("pagination-item");
28
32
  const nextPage = computed(() => getLegalPage(props.current + props.step, {
29
33
  min: 1,
@@ -32,12 +36,21 @@ var page_item_ellipsis_vue_vue_type_script_setup_true_lang_default = /*@__PURE__
32
36
  const handleClick = (e) => {
33
37
  emit("click", nextPage.value);
34
38
  };
39
+ const handleKeydown = (e) => {
40
+ if (isActivationKey(e)) {
41
+ e.preventDefault();
42
+ emit("click", nextPage.value);
43
+ }
44
+ };
35
45
  const cls = computed(() => [prefixCls, `${prefixCls}-ellipsis`]);
36
46
  return (_ctx, _cache) => {
37
47
  return openBlock(), createElementBlock("li", {
38
48
  class: normalizeClass(cls.value),
39
- onClick: handleClick
40
- }, [renderSlot(_ctx.$slots, "default", {}, () => [createVNode(unref(IconMore))])], 2);
49
+ tabindex: "0",
50
+ "aria-label": unref(t)("a11y.morePages"),
51
+ onClick: handleClick,
52
+ onKeydown: handleKeydown
53
+ }, [renderSlot(_ctx.$slots, "default", {}, () => [createVNode(unref(IconMore))])], 42, _hoisted_1);
41
54
  };
42
55
  }
43
56
  }));
@@ -1,8 +1,8 @@
1
- declare var __VLS_10: {
1
+ declare var __VLS_11: {
2
2
  type: string;
3
3
  };
4
4
  type __VLS_Slots = {} & {
5
- default?: (props: typeof __VLS_10) => any;
5
+ default?: (props: typeof __VLS_11) => any;
6
6
  };
7
7
  declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
8
8
  pages: {
@@ -1,8 +1,10 @@
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
- import IconRight from "../icon/icon-right/index.js";
4
- import IconLeft from "../icon/icon-left/index.js";
3
+ import { isActivationKey } from "../_utils/keyboard.js";
4
+ import { useI18n } from "../locale/index.js";
5
5
  import { getLegalPage } from "./utils.js";
6
+ import IconLeft from "../icon/icon-left/index.js";
7
+ import IconRight from "../icon/icon-right/index.js";
6
8
  import { computed, createBlock, defineComponent, normalizeClass, openBlock, renderSlot, resolveDynamicComponent, unref, withCtx } from "vue";
7
9
  //#region components/pagination/page-item-step.vue?vue&type=script&setup=true&lang.ts
8
10
  var page_item_step_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, { name: "StepPager" }), {}, {
@@ -33,6 +35,7 @@ var page_item_step_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
33
35
  setup(__props, { emit: __emit }) {
34
36
  const props = __props;
35
37
  const emit = __emit;
38
+ const { t } = useI18n();
36
39
  const prefixCls = getPrefixCls("pagination-item");
37
40
  const isNext = props.type === "next";
38
41
  const mergedDisabled = computed(() => {
@@ -48,6 +51,13 @@ var page_item_step_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
48
51
  const handleClick = (e) => {
49
52
  if (!mergedDisabled.value) emit("click", nextPage.value);
50
53
  };
54
+ const handleKeydown = (e) => {
55
+ if (mergedDisabled.value) return;
56
+ if (isActivationKey(e)) {
57
+ e.preventDefault();
58
+ emit("click", nextPage.value);
59
+ }
60
+ };
51
61
  const cls = computed(() => [
52
62
  prefixCls,
53
63
  `${prefixCls}-${props.type}`,
@@ -56,11 +66,20 @@ var page_item_step_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
56
66
  return (_ctx, _cache) => {
57
67
  return openBlock(), createBlock(resolveDynamicComponent(__props.simple ? "span" : "li"), {
58
68
  class: normalizeClass(cls.value),
59
- onClick: handleClick
69
+ "aria-label": isNext ? unref(t)("a11y.nextPage") : unref(t)("a11y.prevPage"),
70
+ "aria-disabled": mergedDisabled.value || void 0,
71
+ tabindex: mergedDisabled.value ? -1 : 0,
72
+ onClick: handleClick,
73
+ onKeydown: handleKeydown
60
74
  }, {
61
75
  default: withCtx(() => [renderSlot(_ctx.$slots, "default", { type: isNext ? "next" : "previous" }, () => [isNext ? (openBlock(), createBlock(unref(IconRight), { key: 0 })) : (openBlock(), createBlock(unref(IconLeft), { key: 1 }))])]),
62
76
  _: 3
63
- }, 8, ["class"]);
77
+ }, 40, [
78
+ "class",
79
+ "aria-label",
80
+ "aria-disabled",
81
+ "tabindex"
82
+ ]);
64
83
  };
65
84
  }
66
85
  }));
@@ -23,7 +23,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
23
23
  type: PropType<CSSProperties>;
24
24
  };
25
25
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
26
- click: (_pageNumber: number, _e: MouseEvent) => any;
26
+ click: (_pageNumber: number, _e: Event) => any;
27
27
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
28
28
  pageNumber: {
29
29
  type: NumberConstructor;
@@ -42,7 +42,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
42
42
  type: PropType<CSSProperties>;
43
43
  };
44
44
  }>> & Readonly<{
45
- onClick?: ((_pageNumber: number, _e: MouseEvent) => any) | undefined;
45
+ onClick?: ((_pageNumber: number, _e: Event) => any) | undefined;
46
46
  }>, {
47
47
  disabled: boolean;
48
48
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -1,7 +1,13 @@
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
+ import { isActivationKey } from "../_utils/keyboard.js";
3
4
  import { computed, createElementBlock, createTextVNode, defineComponent, normalizeClass, normalizeStyle, openBlock, renderSlot, toDisplayString } from "vue";
4
5
  //#region components/pagination/page-item.vue?vue&type=script&setup=true&lang.ts
6
+ var _hoisted_1 = [
7
+ "tabindex",
8
+ "aria-current",
9
+ "aria-disabled"
10
+ ];
5
11
  var page_item_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, { name: "Pager" }), {}, {
6
12
  __name: "page-item",
7
13
  props: {
@@ -20,9 +26,17 @@ var page_item_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
20
26
  const emit = __emit;
21
27
  const prefixCls = getPrefixCls("pagination-item");
22
28
  const isActive = computed(() => props.current === props.pageNumber);
23
- const handleClick = (e) => {
29
+ const activate = (e) => {
24
30
  if (!props.disabled) emit("click", props.pageNumber, e);
25
31
  };
32
+ const handleClick = (e) => activate(e);
33
+ const handleKeydown = (e) => {
34
+ if (props.disabled) return;
35
+ if (isActivationKey(e)) {
36
+ e.preventDefault();
37
+ activate(e);
38
+ }
39
+ };
26
40
  const cls = computed(() => [prefixCls, { [`${prefixCls}-active`]: isActive.value }]);
27
41
  const mergedStyle = computed(() => {
28
42
  return isActive.value ? props.activeStyle : props.style;
@@ -31,8 +45,12 @@ var page_item_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
31
45
  return openBlock(), createElementBlock("li", {
32
46
  class: normalizeClass(cls.value),
33
47
  style: normalizeStyle(mergedStyle.value),
34
- onClick: handleClick
35
- }, [renderSlot(_ctx.$slots, "default", { page: __props.pageNumber }, () => [createTextVNode(toDisplayString(__props.pageNumber), 1)])], 6);
48
+ tabindex: __props.disabled ? -1 : 0,
49
+ "aria-current": isActive.value ? "page" : void 0,
50
+ "aria-disabled": __props.disabled || void 0,
51
+ onClick: handleClick,
52
+ onKeydown: handleKeydown
53
+ }, [renderSlot(_ctx.$slots, "default", { page: __props.pageNumber }, () => [createTextVNode(toDisplayString(__props.pageNumber), 1)])], 46, _hoisted_1);
36
54
  };
37
55
  }
38
56
  }));
@@ -432,7 +432,11 @@ var pagination_default = /* @__PURE__ */ defineComponent({
432
432
  return () => {
433
433
  var _slots$total, _slots$total2, _mergedPageSizeOption;
434
434
  if (props.hideOnSinglePage && pages.value <= 1) return null;
435
- return createVNode("div", { "class": cls.value }, [
435
+ return createVNode("div", {
436
+ "role": "navigation",
437
+ "aria-label": t("a11y.pagination"),
438
+ "class": cls.value
439
+ }, [
436
440
  mergedShowTotal.value && createVNode("span", { "class": `${prefixCls}-total` }, [(_slots$total = (_slots$total2 = slots.total) === null || _slots$total2 === void 0 ? void 0 : _slots$total2.call(slots, { total: props.total })) !== null && _slots$total !== void 0 ? _slots$total : t("pagination.total", props.total)]),
437
441
  renderPager(),
438
442
  mergedShowPageSize.value && createVNode(page_options_default, {
@@ -41,7 +41,13 @@
41
41
  border-radius: var(--sd-border-radius-small);
42
42
  outline: 0;
43
43
  cursor: pointer;
44
+ 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), transform 0.1s cubic-bezier(0.34, 0.69, 0.1, 1);
44
45
  user-select: none;
46
+ }
47
+ .sd-pagination-item:active:not(.sd-pagination-item-disabled) {
48
+ transform: scale(0.97);
49
+ }
50
+ .sd-pagination-item {
45
51
  min-width: 32px;
46
52
  height: 32px;
47
53
  font-size: 14px;
@@ -59,7 +65,6 @@
59
65
  color: rgb(var(--sd-primary-6));
60
66
  background-color: var(--sd-color-primary-light-1);
61
67
  border-color: transparent;
62
- transition: color 0.2s cubic-bezier(0, 0, 1, 1), background-color 0.2s cubic-bezier(0, 0, 1, 1);
63
68
  }
64
69
  .sd-pagination-item-disabled, .sd-pagination-item-disabled:hover {
65
70
  color: var(--sd-color-text-4);