@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
@@ -40,7 +40,8 @@ $table-cls-td: string.unquote('#{$table-prefix-cls}-td');
40
40
  border-radius: $table-border-radius-expand-button;
41
41
  outline: none;
42
42
  cursor: pointer;
43
- transition: background-color theme.$transition-duration-1 theme.$transition-timing-function-linear;
43
+ transition: background-color theme.$transition-duration-1
44
+ theme.$transition-timing-function-standard;
44
45
 
45
46
  &:hover {
46
47
  color: $table-color-expand-icon_hover;
@@ -318,7 +319,7 @@ $table-cls-td: string.unquote('#{$table-prefix-cls}-td');
318
319
  width: $table-size-shadow-wrapper-width;
319
320
  box-shadow: none;
320
321
  transform: translateX(-100%);
321
- transition: box-shadow theme.$transition-duration-1 theme.$transition-timing-function-linear;
322
+ transition: box-shadow theme.$transition-duration-1 theme.$transition-timing-function-standard;
322
323
  content: '';
323
324
  pointer-events: none;
324
325
  }
@@ -342,7 +343,8 @@ $table-cls-td: string.unquote('#{$table-prefix-cls}-td');
342
343
  border: $table-border-width solid $table-color-editable-body-cell-border;
343
344
  border-radius: $table-border-radius;
344
345
  cursor: pointer;
345
- transition: all theme.$transition-duration-1 theme.$transition-timing-function-linear;
346
+ transition: border-color theme.$transition-duration-1
347
+ theme.$transition-timing-function-standard;
346
348
  }
347
349
 
348
350
  &:hover {
@@ -457,7 +459,7 @@ $table-cls-td: string.unquote('#{$table-prefix-cls}-td');
457
459
 
458
460
  &-th {
459
461
  transition: background-color theme.$transition-duration-1
460
- theme.$transition-timing-function-linear;
462
+ theme.$transition-timing-function-standard;
461
463
  }
462
464
 
463
465
  &-cell-with-sorter {
@@ -516,7 +518,7 @@ $table-cls-td: string.unquote('#{$table-prefix-cls}-td');
516
518
  top: 50%;
517
519
  color: $table-color-header-sorter-icon;
518
520
  font-size: $table-font-size-header-sorter-icon;
519
- transition: all theme.$transition-duration-1 theme.$transition-timing-function-linear;
521
+ transition: color theme.$transition-duration-1 theme.$transition-timing-function-standard;
520
522
  }
521
523
 
522
524
  .#{theme.$prefix}-icon-caret-up {
@@ -549,7 +551,8 @@ $table-cls-td: string.unquote('#{$table-prefix-cls}-td');
549
551
  vertical-align: 0;
550
552
  background-color: transparent;
551
553
  cursor: pointer;
552
- transition: all theme.$transition-duration-1 theme.$transition-timing-function-linear;
554
+ transition: background-color theme.$transition-duration-1
555
+ theme.$transition-timing-function-standard;
553
556
 
554
557
  &:hover,
555
558
  &-open {
@@ -559,7 +562,7 @@ $table-cls-td: string.unquote('#{$table-prefix-cls}-td');
559
562
  svg {
560
563
  color: $table-color-header-filters-icon;
561
564
  font-size: $table-font-size-filters-icon;
562
- transition: all theme.$transition-duration-1 theme.$transition-timing-function-linear;
565
+ transition: color theme.$transition-duration-1 theme.$transition-timing-function-standard;
563
566
  }
564
567
 
565
568
  &-active {
@@ -633,7 +636,7 @@ $table-cls-td: string.unquote('#{$table-prefix-cls}-td');
633
636
  width: $table-size-shadow-wrapper-width;
634
637
  height: 100%;
635
638
  box-shadow: none;
636
- transition: box-shadow theme.$transition-duration-1 theme.$transition-timing-function-linear;
639
+ transition: box-shadow theme.$transition-duration-1 theme.$transition-timing-function-standard;
637
640
  content: '';
638
641
  pointer-events: none;
639
642
  }
@@ -100,6 +100,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
100
100
  type: BooleanConstructor;
101
101
  default: boolean;
102
102
  };
103
+ tabindex: {
104
+ type: (StringConstructor | NumberConstructor)[];
105
+ default: undefined;
106
+ };
103
107
  uninjectGroupContext: {
104
108
  type: BooleanConstructor;
105
109
  default: boolean;
@@ -115,6 +119,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
115
119
  modelValue: boolean | (string | number | boolean)[];
116
120
  defaultChecked: boolean;
117
121
  indeterminate: boolean;
122
+ tabindex: string | number;
118
123
  uninjectGroupContext: boolean;
119
124
  }, true, {}, {}, {
120
125
  IconCheck: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -217,6 +222,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
217
222
  type: BooleanConstructor;
218
223
  default: boolean;
219
224
  };
225
+ tabindex: {
226
+ type: (StringConstructor | NumberConstructor)[];
227
+ default: undefined;
228
+ };
220
229
  uninjectGroupContext: {
221
230
  type: BooleanConstructor;
222
231
  default: boolean;
@@ -229,6 +238,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
229
238
  modelValue: boolean | (string | number | boolean)[];
230
239
  defaultChecked: boolean;
231
240
  indeterminate: boolean;
241
+ tabindex: string | number;
232
242
  uninjectGroupContext: boolean;
233
243
  }>;
234
244
  __isFragment?: never;
@@ -254,6 +264,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
254
264
  type: BooleanConstructor;
255
265
  default: boolean;
256
266
  };
267
+ tabindex: {
268
+ type: (StringConstructor | NumberConstructor)[];
269
+ default: undefined;
270
+ };
257
271
  uninjectGroupContext: {
258
272
  type: BooleanConstructor;
259
273
  default: boolean;
@@ -269,6 +283,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
269
283
  modelValue: boolean | (string | number | boolean)[];
270
284
  defaultChecked: boolean;
271
285
  indeterminate: boolean;
286
+ tabindex: string | number;
272
287
  uninjectGroupContext: boolean;
273
288
  }, {}, string, {}, {
274
289
  IconCheck: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -1,12 +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 Checkbox from "../checkbox/index.js";
4
- import Radio from "../radio/index.js";
5
3
  import IconMinus from "../icon/icon-minus/index.js";
6
4
  import IconPlus from "../icon/icon-plus/index.js";
7
- import IconDragDotVertical from "../icon/icon-drag-dot-vertical/index.js";
8
5
  import { tableInjectionKey } from "./context.js";
9
6
  import { getGridSpanStyle, getLeafKeys, getOperationFixedCls, getOperationStyle, getSelectionStatus } from "./utils.js";
7
+ import Checkbox from "../checkbox/index.js";
8
+ import IconDragDotVertical from "../icon/icon-drag-dot-vertical/index.js";
9
+ import Radio from "../radio/index.js";
10
10
  import { computed, createVNode, defineComponent, inject } from "vue";
11
11
  //#region components/table/table-operation-td.tsx
12
12
  var table_operation_td_default = /* @__PURE__ */ defineComponent({
@@ -1,9 +1,9 @@
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 { isFunction } from "../_utils/is.js";
4
- import Checkbox from "../checkbox/index.js";
5
4
  import { tableInjectionKey } from "./context.js";
6
5
  import { getGridSpanStyle, getOperationFixedCls, getOperationStyle } from "./utils.js";
6
+ import Checkbox from "../checkbox/index.js";
7
7
  import { computed, createVNode, defineComponent, inject } from "vue";
8
8
  //#region components/table/table-operation-th.tsx
9
9
  var table_operation_th_default = /* @__PURE__ */ defineComponent({
@@ -7,7 +7,10 @@ var table_tbody_default = /* @__PURE__ */ defineComponent({
7
7
  const prefixCls = getPrefixCls("table");
8
8
  return () => {
9
9
  var _slots$tbody$, _slots$tbody;
10
- return createVNode((_slots$tbody$ = (_slots$tbody = slots.tbody) === null || _slots$tbody === void 0 ? void 0 : _slots$tbody.call(slots)[0]) !== null && _slots$tbody$ !== void 0 ? _slots$tbody$ : "div", { class: `${prefixCls}-tbody` }, { default: slots.default });
10
+ return createVNode((_slots$tbody$ = (_slots$tbody = slots.tbody) === null || _slots$tbody === void 0 ? void 0 : _slots$tbody.call(slots)[0]) !== null && _slots$tbody$ !== void 0 ? _slots$tbody$ : "div", {
11
+ class: `${prefixCls}-tbody`,
12
+ role: "rowgroup"
13
+ }, { default: slots.default });
11
14
  };
12
15
  }
13
16
  });
@@ -184,7 +184,8 @@ var table_td_default = /* @__PURE__ */ defineComponent({
184
184
  rowIndex: (_props$rowIndex2 = props.rowIndex) !== null && _props$rowIndex2 !== void 0 ? _props$rowIndex2 : -1
185
185
  })[0]) !== null && _slots$td$ !== void 0 ? _slots$td$ : "div", {
186
186
  class: cls.value,
187
- style: style.value
187
+ style: style.value,
188
+ role: "cell"
188
189
  }, { default: () => [renderCell()] });
189
190
  };
190
191
  }
@@ -32,8 +32,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
32
32
  resizable: BooleanConstructor;
33
33
  }>> & Readonly<{}>, {
34
34
  column: TableColumnData;
35
- resizable: boolean;
36
35
  dataColumns: TableColumnData[];
37
36
  operations: TableOperationColumn[];
37
+ resizable: boolean;
38
38
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
39
39
  export default _default;
@@ -5,12 +5,12 @@ import icon_hover_default from "../_components/icon-hover.js";
5
5
  import { useI18n } from "../locale/index.js";
6
6
  import Trigger from "../trigger/index.js";
7
7
  import Button from "../button/index.js";
8
- import Checkbox from "../checkbox/index.js";
9
- import Radio from "../radio/index.js";
10
- import IconCaretDown from "../icon/icon-caret-down/index.js";
11
8
  import { tableInjectionKey } from "./context.js";
12
9
  import { getFixedCls, getGridSpanStyle, getStyle } from "./utils.js";
10
+ import Checkbox from "../checkbox/index.js";
11
+ import Radio from "../radio/index.js";
13
12
  import auto_tooltip_default from "../_components/auto-tooltip/auto-tooltip.js";
13
+ import IconCaretDown from "../icon/icon-caret-down/index.js";
14
14
  import IconCaretUp from "../icon/icon-caret-up/index.js";
15
15
  import IconFilter from "../icon/icon-filter/index.js";
16
16
  import { useColumnFilter } from "./hooks/use-column-filter.js";
@@ -207,8 +207,10 @@ var table_th_default = /* @__PURE__ */ defineComponent({
207
207
  return () => {
208
208
  var _slots$th$, _slots$th;
209
209
  return createVNode((_slots$th$ = (_slots$th = slots.th) === null || _slots$th === void 0 ? void 0 : _slots$th.call(slots, { column: props.column })[0]) !== null && _slots$th$ !== void 0 ? _slots$th$ : "div", {
210
- class: cls.value,
211
- style: style.value
210
+ "class": cls.value,
211
+ "style": style.value,
212
+ "role": "columnheader",
213
+ "aria-sort": hasSorter.value ? sortOrder.value === "ascend" ? "ascending" : sortOrder.value === "descend" ? "descending" : "none" : void 0
212
214
  }, { default: () => [
213
215
  renderCell(),
214
216
  !filterIconAlignLeft.value && renderFilter(),
@@ -7,7 +7,10 @@ var table_thead_default = /* @__PURE__ */ defineComponent({
7
7
  const prefixCls = getPrefixCls("table");
8
8
  return () => {
9
9
  var _slots$thead$, _slots$thead;
10
- return createVNode((_slots$thead$ = (_slots$thead = slots.thead) === null || _slots$thead === void 0 ? void 0 : _slots$thead.call(slots)[0]) !== null && _slots$thead$ !== void 0 ? _slots$thead$ : "div", { class: `${prefixCls}-thead` }, { default: slots.default });
10
+ return createVNode((_slots$thead$ = (_slots$thead = slots.thead) === null || _slots$thead === void 0 ? void 0 : _slots$thead.call(slots)[0]) !== null && _slots$thead$ !== void 0 ? _slots$thead$ : "div", {
11
+ class: `${prefixCls}-thead`,
12
+ role: "rowgroup"
13
+ }, { default: slots.default });
11
14
  };
12
15
  }
13
16
  });
@@ -25,7 +25,10 @@ var table_tr_default = /* @__PURE__ */ defineComponent({
25
25
  return createVNode((_slots$tr$ = (_slots$tr = slots.tr) === null || _slots$tr === void 0 ? void 0 : _slots$tr.call(slots, {
26
26
  rowIndex: props.rowIndex,
27
27
  record: (_props$record = props.record) === null || _props$record === void 0 ? void 0 : _props$record.raw
28
- })[0]) !== null && _slots$tr$ !== void 0 ? _slots$tr$ : "div", { class: cls.value }, { default: slots.default });
28
+ })[0]) !== null && _slots$tr$ !== void 0 ? _slots$tr$ : "div", {
29
+ class: cls.value,
30
+ role: "row"
31
+ }, { default: slots.default });
29
32
  };
30
33
  }
31
34
  });
@@ -400,12 +400,12 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
400
400
  bordered: boolean | TableBorder;
401
401
  columns: TableColumnData[];
402
402
  hoverable: boolean;
403
- pagination: boolean | PaginationProps;
404
403
  defaultExpandAllRows: boolean;
405
404
  indentSize: number;
406
405
  filterIconAlignLeft: boolean;
407
406
  stripe: boolean;
408
407
  tableLayoutFixed: boolean;
408
+ pagination: boolean | PaginationProps;
409
409
  pagePosition: "top" | "tl" | "tr" | "bottom" | "bl" | "br";
410
410
  rowKey: string | ((record: TableData) => BaseType);
411
411
  showHeader: boolean;
package/es/table/table.js CHANGED
@@ -10,12 +10,12 @@ import { useComponentRef } from "../_hooks/use-component-ref.js";
10
10
  import { useScrollbar } from "../_hooks/use-scrollbar.js";
11
11
  import Scrollbar from "../scrollbar/index.js";
12
12
  import Spin from "../spin/index.js";
13
- import Empty from "../empty/index.js";
14
13
  import { useChildrenComponents } from "../_hooks/use-children-components.js";
15
14
  import { debounce } from "../_utils/debounce.js";
15
+ import { getValueByPath, setValueByPath } from "../_utils/get-value-by-path.js";
16
+ import Empty from "../empty/index.js";
16
17
  import IconMinus from "../icon/icon-minus/index.js";
17
18
  import IconPlus from "../icon/icon-plus/index.js";
18
- import { getValueByPath, setValueByPath } from "../_utils/get-value-by-path.js";
19
19
  import Pagination from "../pagination/index.js";
20
20
  import { tableInjectionKey } from "./context.js";
21
21
  import { useColumnResize } from "./hooks/use-column-resize.js";
@@ -1502,11 +1502,15 @@ var table_default = /* @__PURE__ */ defineComponent({
1502
1502
  });
1503
1503
  const render = () => {
1504
1504
  var _slots$columns;
1505
- if (slots.default) return createVNode("div", { "class": cls.value }, [renderTable(slots.default)]);
1505
+ if (slots.default) return createVNode("div", {
1506
+ "class": cls.value,
1507
+ "role": "table"
1508
+ }, [renderTable(slots.default)]);
1506
1509
  children.value = (_slots$columns = slots.columns) === null || _slots$columns === void 0 ? void 0 : _slots$columns.call(slots);
1507
1510
  return createVNode("div", {
1508
1511
  "class": cls.value,
1509
- "style": style.value
1512
+ "style": style.value,
1513
+ "role": "table"
1510
1514
  }, [children.value, createVNode(Spin, spinProps.value, { default: () => [
1511
1515
  props.pagination !== false && (flattenData.value.length > 0 || sortedData.value.length > 0) && isPaginationTop.value && renderPagination(),
1512
1516
  renderTable(),
@@ -9,5 +9,6 @@ export interface TabsContext {
9
9
  removeItem: (id: number) => void;
10
10
  trigger: TabTriggerEvent;
11
11
  scrollbar: ScrollbarProps | false;
12
+ tabsId: string;
12
13
  }
13
14
  export declare const tabsInjectionKey: InjectionKey<TabsContext>;
@@ -113,7 +113,7 @@
113
113
  line-height: 1.5715;
114
114
  outline: none;
115
115
  cursor: pointer;
116
- transition: color 0.2s cubic-bezier(0, 0, 1, 1);
116
+ transition: color 0.2s cubic-bezier(0.34, 0.69, 0.1, 1);
117
117
  }
118
118
  .sd-tabs-tab-title {
119
119
  display: inline-block;
@@ -169,7 +169,7 @@
169
169
  background-color: transparent;
170
170
  border-radius: var(--sd-border-radius-small);
171
171
  opacity: 1;
172
- transition: background-color 0.2s cubic-bezier(0, 0, 1, 1), opacity 0.2s cubic-bezier(0, 0, 1, 1);
172
+ transition: background-color 0.2s cubic-bezier(0.34, 0.69, 0.1, 1), opacity 0.2s cubic-bezier(0.34, 0.69, 0.1, 1);
173
173
  content: "";
174
174
  }
175
175
  .sd-tabs-nav-type-line .sd-tabs-tab:hover .sd-tabs-tab-title::before {
@@ -195,7 +195,7 @@
195
195
  padding: 4px 16px;
196
196
  font-size: 14px;
197
197
  border: 1px solid var(--sd-color-neutral-3);
198
- transition: padding 0.2s cubic-bezier(0, 0, 1, 1), color 0.2s cubic-bezier(0, 0, 1, 1);
198
+ transition: padding 0.2s cubic-bezier(0.34, 0.69, 0.1, 1), color 0.2s cubic-bezier(0.34, 0.69, 0.1, 1);
199
199
  }
200
200
  .sd-tabs-nav-type-card .sd-tabs-tab-closable, .sd-tabs-nav-type-card-gutter .sd-tabs-tab-closable {
201
201
  padding-right: 12px;
@@ -370,7 +370,7 @@
370
370
  height: 14px;
371
371
  background-color: var(--sd-color-fill-3);
372
372
  transform: translateY(-50%);
373
- transition: all 0.2s cubic-bezier(0, 0, 1, 1);
373
+ transition: opacity 0.2s cubic-bezier(0.34, 0.69, 0.1, 1);
374
374
  content: "";
375
375
  }
376
376
 
@@ -407,7 +407,7 @@
407
407
  border-top: none;
408
408
  }
409
409
  .sd-tabs-content-animation {
410
- transition: all 0.2s cubic-bezier(0.34, 0.69, 0.1, 1);
410
+ transition: margin 0.2s cubic-bezier(0.34, 0.69, 0.1, 1);
411
411
  }
412
412
  .sd-tabs-horizontal.sd-tabs-justify {
413
413
  display: flex;
@@ -181,7 +181,7 @@ $tabs-prefix-cls: string.unquote('#{theme.$prefix}-tabs');
181
181
  line-height: 1.5715;
182
182
  outline: none;
183
183
  cursor: pointer;
184
- transition: color theme.$transition-duration-2 theme.$transition-timing-function-linear;
184
+ transition: color theme.$transition-duration-2 theme.$transition-timing-function-standard;
185
185
 
186
186
  &-title {
187
187
  display: inline-block;
@@ -261,8 +261,8 @@ $tabs-prefix-cls: string.unquote('#{theme.$prefix}-tabs');
261
261
  border-radius: $tabs-line-border-radius;
262
262
  opacity: 1;
263
263
  transition:
264
- background-color theme.$transition-duration-2 theme.$transition-timing-function-linear,
265
- opacity theme.$transition-duration-2 theme.$transition-timing-function-linear;
264
+ background-color theme.$transition-duration-2 theme.$transition-timing-function-standard,
265
+ opacity theme.$transition-duration-2 theme.$transition-timing-function-standard;
266
266
  content: '';
267
267
  }
268
268
  }
@@ -318,8 +318,8 @@ $tabs-prefix-cls: string.unquote('#{theme.$prefix}-tabs');
318
318
  font-size: $tabs-size-default-font-size_card;
319
319
  border: $tabs-card-border-width solid $tabs-card-color-title-border;
320
320
  transition:
321
- padding theme.$transition-duration-2 theme.$transition-timing-function-linear,
322
- color theme.$transition-duration-2 theme.$transition-timing-function-linear;
321
+ padding theme.$transition-duration-2 theme.$transition-timing-function-standard,
322
+ color theme.$transition-duration-2 theme.$transition-timing-function-standard;
323
323
 
324
324
  &-closable {
325
325
  padding-right: $tabs-card-padding-title-right_editable;
@@ -574,7 +574,7 @@ $tabs-prefix-cls: string.unquote('#{theme.$prefix}-tabs');
574
574
  height: $tabs-capsule-size-separator-height;
575
575
  background-color: $tabs-capsule-color-separator-bg;
576
576
  transform: translateY(-50%);
577
- transition: all theme.$transition-duration-2 theme.$transition-timing-function-linear;
577
+ transition: opacity theme.$transition-duration-2 theme.$transition-timing-function-standard;
578
578
  content: '';
579
579
  }
580
580
  }
@@ -627,7 +627,7 @@ $tabs-prefix-cls: string.unquote('#{theme.$prefix}-tabs');
627
627
  }
628
628
 
629
629
  &-content-animation {
630
- transition: all theme.$transition-duration-2 theme.$transition-timing-function-standard;
630
+ transition: margin theme.$transition-duration-2 theme.$transition-timing-function-standard;
631
631
  }
632
632
 
633
633
  &-horizontal#{&}-justify {
@@ -4,6 +4,13 @@ import Scrollbar from "../scrollbar/index.js";
4
4
  import { tabsInjectionKey } from "./context.js";
5
5
  import { computed, createBlock, createCommentVNode, createElementBlock, defineComponent, getCurrentInstance, inject, mergeProps, normalizeClass, onBeforeUnmount, onUpdated, openBlock, reactive, ref, renderSlot, toRefs, unref, useSlots, watch, withCtx } from "vue";
6
6
  //#region components/tabs/tab-pane.vue?vue&type=script&setup=true&lang.ts
7
+ var _hoisted_1 = [
8
+ "id",
9
+ "aria-labelledby",
10
+ "aria-hidden",
11
+ "tabindex",
12
+ "inert"
13
+ ];
7
14
  var tab_pane_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, { name: "TabPane" }), {}, {
8
15
  __name: "tab-pane",
9
16
  props: {
@@ -53,6 +60,12 @@ var tab_pane_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
53
60
  const itemRef = ref();
54
61
  const key = computed(() => instance === null || instance === void 0 ? void 0 : instance.vnode.key);
55
62
  const active = computed(() => key.value === tabsCtx.activeKey);
63
+ const tabsId = computed(() => {
64
+ var _tabsCtx$tabsId;
65
+ return (_tabsCtx$tabsId = tabsCtx.tabsId) !== null && _tabsCtx$tabsId !== void 0 ? _tabsCtx$tabsId : "";
66
+ });
67
+ const panelId = computed(() => `${tabsId.value}-${key.value}-panel`);
68
+ const tabLabelledBy = computed(() => `${tabsId.value}-${key.value}-tab`);
56
69
  const mounted = ref(tabsCtx.lazyLoad ? active.value : true);
57
70
  const paneScrollbarProps = computed(() => {
58
71
  const { scrollbar } = tabsCtx;
@@ -92,7 +105,13 @@ var tab_pane_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
92
105
  return openBlock(), createElementBlock("div", {
93
106
  ref_key: "itemRef",
94
107
  ref: itemRef,
95
- class: normalizeClass([`${unref(prefixCls)}-content-item`, { [`${unref(prefixCls)}-content-item-active`]: active.value }])
108
+ class: normalizeClass([`${unref(prefixCls)}-content-item`, { [`${unref(prefixCls)}-content-item-active`]: active.value }]),
109
+ role: "tabpanel",
110
+ id: panelId.value,
111
+ "aria-labelledby": tabLabelledBy.value,
112
+ "aria-hidden": active.value ? void 0 : "true",
113
+ tabindex: active.value ? 0 : void 0,
114
+ inert: active.value ? void 0 : true
96
115
  }, [mounted.value ? (openBlock(), createElementBlock("div", {
97
116
  key: 0,
98
117
  class: normalizeClass(paneCls.value)
@@ -102,7 +121,7 @@ var tab_pane_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
102
121
  }, paneScrollbarProps.value), {
103
122
  default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
104
123
  _: 3
105
- }, 16, ["outer-class"])) : renderSlot(_ctx.$slots, "default", { key: 1 })], 2)) : createCommentVNode("", true)], 2);
124
+ }, 16, ["outer-class"])) : renderSlot(_ctx.$slots, "default", { key: 1 })], 2)) : createCommentVNode("", true)], 10, _hoisted_1);
106
125
  };
107
126
  }
108
127
  }));
@@ -1,8 +1,8 @@
1
1
  import { getPrefixCls } from "../_utils/global-config.js";
2
2
  import icon_hover_default from "../_components/icon-hover.js";
3
+ import IconLeft from "../icon/icon-left/index.js";
3
4
  import IconRight from "../icon/icon-right/index.js";
4
5
  import IconDown from "../icon/icon-down/index.js";
5
- import IconLeft from "../icon/icon-left/index.js";
6
6
  import IconUp from "../icon/icon-up/index.js";
7
7
  import { computed, createVNode, defineComponent, isVNode } from "vue";
8
8
  //#region components/tabs/tabs-button.tsx
@@ -4,6 +4,7 @@ import { isNumber, isUndefined } from "../_utils/is.js";
4
4
  import resize_observer_default from "../_components/resize-observer.js";
5
5
  import { off, on } from "../_utils/dom.js";
6
6
  import icon_hover_default from "../_components/icon-hover.js";
7
+ import { KEYBOARD_KEY } from "../_utils/keyboard.js";
7
8
  import IconPlus from "../icon/icon-plus/index.js";
8
9
  import tabs_button_default from "./tabs-button.js";
9
10
  import tabs_nav_ink_default from "./tabs-nav-ink.js";
@@ -171,6 +172,35 @@ var tabs_nav_default = /* @__PURE__ */ defineComponent({
171
172
  const scrollDirection = type === "previous" !== isRtlHorizontal.value ? -1 : 1;
172
173
  setOffset(offset.value + scrollDirection * wrapperLength.value);
173
174
  };
175
+ const focusAndActivate = (key, ev) => {
176
+ const el = tabsRef.value[key];
177
+ if (el instanceof HTMLElement) el.focus();
178
+ emit("click", key, ev);
179
+ };
180
+ const handleListKeydown = (ev) => {
181
+ const enabled = props.tabs.filter((t) => !t.disabled);
182
+ if (enabled.length === 0) return;
183
+ const len = enabled.length;
184
+ const currentIdx = Math.max(0, enabled.findIndex((t) => t.key === activeKey.value));
185
+ let nextIdx = currentIdx;
186
+ const key = ev.key;
187
+ if (direction.value === "vertical") if (key === KEYBOARD_KEY.ARROW_DOWN) nextIdx = currentIdx + 1;
188
+ else if (key === KEYBOARD_KEY.ARROW_UP) nextIdx = currentIdx - 1;
189
+ else if (key === KEYBOARD_KEY.HOME) nextIdx = 0;
190
+ else if (key === KEYBOARD_KEY.END) nextIdx = len - 1;
191
+ else return;
192
+ else {
193
+ const rtl = isRtlHorizontal.value;
194
+ if (key === KEYBOARD_KEY.ARROW_RIGHT) nextIdx = rtl ? currentIdx - 1 : currentIdx + 1;
195
+ else if (key === KEYBOARD_KEY.ARROW_LEFT) nextIdx = rtl ? currentIdx + 1 : currentIdx - 1;
196
+ else if (key === KEYBOARD_KEY.HOME) nextIdx = 0;
197
+ else if (key === KEYBOARD_KEY.END) nextIdx = len - 1;
198
+ else return;
199
+ }
200
+ ev.preventDefault();
201
+ nextIdx = (nextIdx % len + len) % len;
202
+ focusAndActivate(enabled[nextIdx].key, ev);
203
+ };
174
204
  const handleResize = () => {
175
205
  getSize();
176
206
  if (inkRef.value) inkRef.value.$forceUpdate();
@@ -229,7 +259,10 @@ var tabs_nav_default = /* @__PURE__ */ defineComponent({
229
259
  }, [createVNode(resize_observer_default, { "onResize": handleResize }, { default: () => [createVNode("div", {
230
260
  "ref": listRef,
231
261
  "class": listCls.value,
232
- "style": listStyle.value
262
+ "style": listStyle.value,
263
+ "role": "tablist",
264
+ "aria-orientation": direction.value === "vertical" ? "vertical" : "horizontal",
265
+ "onKeydown": handleListKeydown
233
266
  }, [props.tabs.map((tab) => createVNode(tabs_tab_default, {
234
267
  "key": tab.key,
235
268
  "ref": (component) => {
@@ -1,10 +1,18 @@
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 { KEYBOARD_KEY } from "../_utils/keyboard.js";
4
5
  import IconClose from "../icon/icon-close/index.js";
5
6
  import { tabsInjectionKey } from "./context.js";
6
7
  import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, inject, mergeProps, normalizeClass, openBlock, renderSlot, unref, withCtx, withModifiers } from "vue";
7
8
  //#region components/tabs/tabs-tab.vue?vue&type=script&setup=true&lang.ts
9
+ var _hoisted_1 = [
10
+ "id",
11
+ "tabindex",
12
+ "aria-selected",
13
+ "aria-disabled",
14
+ "aria-controls"
15
+ ];
8
16
  var tabs_tab_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, { name: "TabsTab" }), {}, {
9
17
  __name: "tabs-tab",
10
18
  props: {
@@ -21,11 +29,21 @@ var tabs_tab_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
21
29
  const emit = __emit;
22
30
  const prefixCls = getPrefixCls("tabs-tab");
23
31
  const tabsCtx = inject(tabsInjectionKey, {});
32
+ const tabsId = computed(() => {
33
+ var _tabsCtx$tabsId;
34
+ return (_tabsCtx$tabsId = tabsCtx.tabsId) !== null && _tabsCtx$tabsId !== void 0 ? _tabsCtx$tabsId : "";
35
+ });
36
+ const tabId = computed(() => `${tabsId.value}-${props.tab.key}-tab`);
37
+ const panelId = computed(() => `${tabsId.value}-${props.tab.key}-panel`);
24
38
  const handleClick = (e) => {
25
39
  if (!props.tab.disabled) emit("click", props.tab.key, e);
26
40
  };
27
41
  const onKeyDown = (ev) => {
28
- if (ev.key === "Enter") handleClick(ev);
42
+ if (ev.key === KEYBOARD_KEY.ENTER) handleClick(ev);
43
+ else if (ev.key === KEYBOARD_KEY.SPACE) {
44
+ ev.preventDefault();
45
+ handleClick(ev);
46
+ }
29
47
  };
30
48
  const eventHandlers = computed(() => {
31
49
  return Object.assign(tabsCtx.trigger === "click" ? { onClick: handleClick } : { onMouseover: handleClick }, { onKeydown: onKeyDown });
@@ -40,8 +58,13 @@ var tabs_tab_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
40
58
  }]);
41
59
  return (_ctx, _cache) => {
42
60
  return openBlock(), createElementBlock("div", mergeProps({
43
- tabindex: "0",
44
- class: cls.value
61
+ id: tabId.value,
62
+ class: cls.value,
63
+ role: "tab",
64
+ tabindex: __props.active && !__props.tab.disabled ? 0 : -1,
65
+ "aria-selected": __props.active,
66
+ "aria-disabled": __props.tab.disabled || void 0,
67
+ "aria-controls": panelId.value
45
68
  }, eventHandlers.value), [createElementVNode("span", { class: normalizeClass(`${unref(prefixCls)}-title`) }, [renderSlot(_ctx.$slots, "default")], 2), __props.editable && __props.tab.closable ? (openBlock(), createBlock(icon_hover_default, {
46
69
  key: 0,
47
70
  class: normalizeClass(`${unref(prefixCls)}-close-btn`),
@@ -49,7 +72,7 @@ var tabs_tab_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
49
72
  }, {
50
73
  default: withCtx(() => [createVNode(unref(IconClose))]),
51
74
  _: 1
52
- }, 8, ["class"])) : createCommentVNode("", true)], 16);
75
+ }, 8, ["class"])) : createCommentVNode("", true)], 16, _hoisted_1);
53
76
  };
54
77
  }
55
78
  }));
package/es/tabs/tabs.js CHANGED
@@ -6,7 +6,7 @@ import { useScrollbar } from "../_hooks/use-scrollbar.js";
6
6
  import { useChildrenComponents } from "../_hooks/use-children-components.js";
7
7
  import { tabsInjectionKey } from "./context.js";
8
8
  import tabs_nav_default from "./tabs-nav.js";
9
- import { computed, createVNode, defineComponent, inject, nextTick, provide, reactive, ref, toRef, toRefs } from "vue";
9
+ import { computed, createVNode, defineComponent, getCurrentInstance, inject, nextTick, provide, reactive, ref, toRef, toRefs } from "vue";
10
10
  //#region components/tabs/tabs.tsx
11
11
  var tabs_default = /* @__PURE__ */ defineComponent({
12
12
  name: "Tabs",
@@ -208,6 +208,7 @@ var tabs_default = /* @__PURE__ */ defineComponent({
208
208
  setup(props, { emit, slots }) {
209
209
  const { size, lazyLoad, destroyOnHide, trigger } = toRefs(props);
210
210
  const prefixCls = getPrefixCls("tabs");
211
+ const tabsId = `${prefixCls}-${getCurrentInstance().uid}`;
211
212
  const { mergedSize } = useSize(size);
212
213
  const mergedPosition = computed(() => props.direction === "vertical" ? "left" : props.position);
213
214
  const mergedDirection = computed(() => ["left", "right"].includes(mergedPosition.value) ? "vertical" : "horizontal");
@@ -248,7 +249,8 @@ var tabs_default = /* @__PURE__ */ defineComponent({
248
249
  addItem,
249
250
  removeItem,
250
251
  trigger,
251
- scrollbar: computed(() => props.fullHeight && props.scrollbar !== false ? scrollbarProps.value : false)
252
+ scrollbar: computed(() => props.fullHeight && props.scrollbar !== false ? scrollbarProps.value : false),
253
+ tabsId
252
254
  }));
253
255
  const handleChange = (key) => {
254
256
  if (key !== computedActiveKey.value) {